$search
Public Member Functions | |
def | __init__ |
def | calibrate_stereo_camera |
Public Attributes | |
calibration_object | |
calibration_object_detector | |
folder | |
image_prefix_left | |
image_prefix_right | |
Private Member Functions | |
def | _rectify |
Calibrates a stereo camera pair with parallel cameras
Definition at line 213 of file calibrator.py.
def cob_camera_calibration::calibrator::StereoCalibrator::__init__ | ( | self, | ||
calibration_object, | ||||
calibration_object_detector, | ||||
folder, | ||||
image_prefix_left, | ||||
image_prefix_right | ||||
) |
Initialize object @param calibration_object: Calibration object to work with. @type calibration_object: must implement CalibrationObject interface @param calibration_object_detector: Calibration object detector to work with. Must be compatible to CalibrationObject @type calibration_object_detector: must implement CalibrationObjectDetector interface @param folder: Folder from where the images are located @type folder: string @param image_prefix_left: Prefix the left camera's image files which are loaded must have @type image_prefix_left: string @param image_prefix_right: Prefix the right camera's image files which are loaded must have @type image_prefix_right: string
Definition at line 217 of file calibrator.py.
def cob_camera_calibration::calibrator::StereoCalibrator::_rectify | ( | self, | ||
camera_matrix_l, | ||||
dist_coeffs_l, | ||||
camera_matrix_r, | ||||
dist_coeffs_r, | ||||
h, | ||||
w, | ||||
R, | ||||
T, | ||||
alpha | ||||
) | [private] |
Helper function, wraps cv2.cv.StereoRectify with cv2 input/output types as this function is missing in new opencv python cv2 interface see https://code.ros.org/trac/opencv/changeset/6843
Definition at line 332 of file calibrator.py.
def cob_camera_calibration::calibrator::StereoCalibrator::calibrate_stereo_camera | ( | self, | ||
alpha = 0.0 | ||||
) |
Run stereo calibration Returns calibration rms error (float), image height, width and camera_matrix, dist_coeffs, projection_matrix and rectification_matrix for right and left camera (as np.ndarray() type) as well as baseline R and T @param alpha: Set zoom, alpha = 0.0 results in cropped image with all pixels valid in undistorted image, alpha = 1.0 preserves all pixels from original image @type alpha: float (0.0 < alpha < 1.0)
Definition at line 242 of file calibrator.py.
Definition at line 236 of file calibrator.py.
Definition at line 237 of file calibrator.py.
Definition at line 238 of file calibrator.py.
Definition at line 239 of file calibrator.py.
Definition at line 240 of file calibrator.py.