Stereo rectification for fisheye camera model
S = cv.fisheyeStereoRectify(K1, D1, K2, D2, imageSize, R, T)
[...] = cv.fisheyeStereoRectify(..., 'OptionName',optionValue, ...)
Input
- K1 First camera matrix 3x3.
- D1 First camera distortion parameters of 4 elements.
- K2 Second camera matrix 3x3.
- D2 Second camera distortion parameters of 4 elements.
- imageSize Size of the image used for stereo calibration
[w,h]
.
- R Rotation matrix between the coordinate systems of the first and the
second cameras, 3x3/3x1 (see cv.Rodrigues).
- T Translation vector between coordinate systems of the cameras, 3x1.
Output
- S scalar struct having the following fields:
- R1 3x3 rectification transform (rotation matrix) for the first
camera.
- R2 3x3 rectification transform (rotation matrix) for the second
camera.
- P1 3x4 projection matrix in the new (rectified) coordinate systems
for the first camera.
- P2 3x4 projection matrix in the new (rectified) coordinate systems
for the second camera.
- Q 4x4 disparity-to-depth mapping matrix (see cv.reprojectImageTo3D).
Options
- ZeroDisparity If the flag is set, the function makes the principal
points of each camera have the same pixel coordinates in the rectified
views. And if the flag is not set, the function may still shift the images
in the horizontal or vertical direction (depending on the orientation of
epipolar lines) to maximize the useful image area. default true
- NewImageSize New image resolution after rectification. The same size
should be passed to cv.fisheyeInitUndistortRectifyMap. When [0,0] is
passed (default), it is set to the original
imageSize
. Setting it to
larger value can help you preserve details in the original image,
especially when there is a big radial distortion.
- Balance Sets the new focal length in range between the min focal
length and the max focal length. Balance is in range of [0,1]. default 0
- FOVScale Divisor for new focal length. default 1.0