39 #include <boost/algorithm/string/predicate.hpp> 44 const sensor_msgs::CameraInfo& cam_info)
46 if (boost::iends_with(file_name,
".ini"))
48 if (boost::iends_with(file_name,
".yml") || boost::iends_with(file_name,
".yaml"))
55 sensor_msgs::CameraInfo& cam_info)
57 if (boost::iends_with(file_name,
".ini"))
59 if (boost::iends_with(file_name,
".yml") || boost::iends_with(file_name,
".yaml"))
66 std::string& camera_name, sensor_msgs::CameraInfo& cam_info)
bool readCalibrationYml(std::istream &in, std::string &camera_name, sensor_msgs::CameraInfo &cam_info)
Read calibration parameters from a YAML file.
bool readCalibration(const std::string &file_name, std::string &camera_name, sensor_msgs::CameraInfo &cam_info)
Read calibration parameters from a file.
bool parseCalibration(const std::string &buffer, const std::string &format, std::string &camera_name, sensor_msgs::CameraInfo &cam_info)
Parse calibration parameters from a string in memory.
bool writeCalibration(const std::string &file_name, const std::string &camera_name, const sensor_msgs::CameraInfo &cam_info)
Write calibration parameters to a file.
bool writeCalibrationIni(std::ostream &out, const std::string &camera_name, const sensor_msgs::CameraInfo &cam_info)
Write calibration parameters to a file in INI format.
bool parseCalibrationIni(const std::string &buffer, std::string &camera_name, sensor_msgs::CameraInfo &cam_info)
Parse calibration parameters from a string in memory of INI format.
bool writeCalibrationYml(std::ostream &out, const std::string &camera_name, const sensor_msgs::CameraInfo &cam_info)
Write calibration parameters to a file in YAML format.
bool readCalibrationIni(std::istream &in, std::string &camera_name, sensor_msgs::CameraInfo &cam_info)
Read calibration parameters from an INI file.