Start » Filter Reference » OpenCV » Camera Calibration And 3D Reconstruction » cvStereoRectify
Module: | OpenCV |
---|
Computes rectification transforms for each head of a calibrated stereo camera.
Name | Type | Range | Description | |
---|---|---|---|---|
inCameraMatrix1 | Matrix | First camera matrix. | ||
inDistCoeffs1 | Matrix | First camera distortion parameters. | ||
inCameraMatrix2 | Matrix | Second camera matrix. | ||
inDistCoeffs2 | Matrix | Second camera distortion parameters. | ||
inImageWidth | Integer | Width of images used for stereo calibration. | ||
inImageHeight | Integer | Height of images used for stereo calibration. | ||
inR | Matrix | Rotation matrix between the coordinate systems of the first and the second cameras. | ||
inT | Matrix | Translation vector between coordinate systems of the cameras. | ||
inZeroDisparity | Bool | 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 to maximize the useful image area. | ||
inAlpha | Real | -1.0 - 1.0 | Free scaling parameter. If it is -1 or absent, the function performs the default scaling. Otherwise, the parameter should be between 0 and 1. inAlpha=0 means that the rectified images are zoomed and shifted so that only valid pixels are visible. inAlpha=1 means that the rectified image is decimated and shifted so that all the pixels from the original images from the cameras are retained in the rectified images. Obviously, any intermediate value yields an intermediate result between those two extreme cases. | |
inNewImageWidth | Integer | New image width after rectification. If both inNewImageWidth and inNewImageHeight equal 0, new size is set to original image size. | ||
inNewImageHeight | Integer | New image height after rectification. If both inNewImageWidth and inNewImageHeight equal 0, new size is set to original image size. | ||
outR1 | Matrix | Output 3x3 rectification transform, rotation matrix, for the first camera. | ||
outR2 | Matrix | Output 3x3 rectification transform, rotation matrix, for the second camera. | ||
outP1 | Matrix | Output 3x4 projection matrix in the new, rectified, coordinate systems for the first camera. | ||
outP2 | Matrix | Output 3x4 projection matrix in the new, rectified, coordinate systems for the second camera. | ||
outQ | Matrix | Output disparity-to-depth mapping matrix. | ||
outRoi1 | Region | Output region inside first rectified image where all the pixels are valid. | ||
outRoi2 | Region | Output region inside second rectified image where all the pixels are valid. |
Errors
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
Error type | Description |
---|---|
DomainError | inAlpha must be -1 or between 0 and 1 in cvStereoRectify. |
DomainError | inCameraMatrix1 must be 3x3 matrix in cvStereoRectify. |
DomainError | inCameraMatrix2 must be 3x3 matrix in cvStereoRectify. |
DomainError | inR must be 3x3 or 1x3 matrix in cvStereoRectify |
DomainError | inT must be 1x3 matrix in cvStereoRectify |
DomainError | Supported matrix sizes for inDistCoeffs1 are: 1x4, 4x1, 1x5, 5x1, 1x8, 8x1, 1x12, 12x1 in cvStereoRectify. |
DomainError | Supported matrix sizes for inDistCoeffs2 are: 1x4, 4x1, 1x5, 5x1, 1x8, 8x1, 1x12, 12x1 in cvStereoRectify. |
Complexity Level
This filter is available on Basic Complexity Level.