__init__.py
Go to the documentation of this file.
1 from camera_calibration_parsers.camera_calibration_parsers_wrapper import __readCalibrationWrapper
2 from sensor_msgs.msg import CameraInfo
3 
4 def readCalibration(file_name):
5  """Read .ini or .yaml calibration file and return (camera name and cameraInfo message).
6 
7  @param file_name: camera calibration file name
8  @type file_name: str
9  @return: (camera name, cameraInfo message) or None on Error
10  @rtype: tuple(str, sensor_msgs.msg.CameraInfo | None
11  """
12  ret, cn, ci = __readCalibrationWrapper(file_name)
13  if not ret:
14  return None
15  c = CameraInfo()
16  c.deserialize(ci)
17  return cn, c
camera_calibration_parsers::readCalibration
bool readCalibration(const std::string &file_name, std::string &camera_name, sensor_msgs::CameraInfo &cam_info)
Read calibration parameters from a file.
Definition: parse.cpp:86


camera_calibration_parsers
Author(s): Patrick Mihelich
autogenerated on Sat Jan 20 2024 03:14:48