Ask Your Question

Revision history [back]

The PinholeCameraModel from image_geometry supports either the 5 parameter "Plumb Bob" model or the 8 parameter "Rational Polynomial" model. This is specified in REP 104, and implemented using cv::initUndistortRectifyMap in the image_geometry package.

The extrinsic calibration should be included in either the left.yaml or right.yaml file via the R and P parameters in the copmuted camera information. From the sensor_msgs/CameraInfo documentation:

# Projection/camera matrix
#     [fx'  0  cx' Tx]
# P = [ 0  fy' cy' Ty]
#     [ 0   0   1   0]
# ...snip...
# For a stereo pair, the fourth column [Tx Ty 0]' is related to the
#  position of the optical center of the second camera in the first
#  camera's frame. We assume Tz = 0 so both cameras are in the same
#  stereo image plane. The first camera always has Tx = Ty = 0. For
#  the right (second) camera of a horizontal stereo pair, Ty = 0 and
#  Tx = -fx' * B, where B is the baseline between the cameras.