Back to FabImage Studio website

You are here: Start » Filter Reference » OpenCV » Camera Calibration And 3D Reconstruction » cvStereoCalibrate

cvStereoCalibrate


Module: OpenCV

Performs stereo calibration of two cameras.

Name Type Range Description
Input value inObjectPoints Point3DArrayArray Input object points array
Input value inImagePoints1 Point2DArrayArray Input image points observed by the first camera.
Input value inImagePoints2 Point2DArrayArray Input image points observed by the second camera.
Input value inImageWidth Integer 1 - + Width of image
Input value inImageHeight Integer 1 - + Height of image
Input value inPrecisionEpsilon Real* Criteria of termination of the iterative optimization. Process stops when either after inMaxIterations iterations or when the corner position moves by less than inPrecisionEpsilon.
Input value inMaxIterations Integer* Criteria of termination of the iterative optimization. Process stops when either after inMaxIterations iterations or when the corner position moves by less than inPrecisionEpsilon.
Input value inInitialCameraMatrix1 Matrix* Initial first camera matrix, requires inInitialCameraMatrix2.
Input value inInitialCameraMatrix2 Matrix* Initial second camera matrix, requires inInitialCameraMatrix1.
Input value inInitialDistCoeffs1 Matrix* Initial first camera distortion coefficients, see inFixIntrinsic.
Input value inInitialDistCoeffs2 Matrix* Initial second camera distortion coefficients, see inFixIntrinsic.
Input value inFixIntrinsic Bool Fix cameraMatrix and distCoeffs to initial values, so that only R, T, E , and F matrices are estimated.
Input value inFixPrincipalPoint Bool The principal point is not changed during the global optimization. It stays at the center or at a different location specified in inInitialCameraMatrix1/2.
Input value inFixFocalLength Bool Fix f_x and f_y for both cameras.
Input value inFixAspectRatio Bool Consider only fy as a free parameter. The ratio fx/fy stays the same as in inInitialCameraMatrix1/2.
Input value inSameFocalLength Bool Enforce f_x(1)=f_x(2) and f_y(1)=f_y(2) - same focal lengths for both cameras.
Input value inZeroTangentDist Bool Tangential distortion coefficients (p_1, p_2) are set to zeros and stay zero.
Input value inRationalModel Bool Enable additional distortion coefficients (k_4, k_5, k_6).
Output value outCameraMatrix1 Matrix Matrix with part of intrinsic parameters of first camera.
Output value outDistCoeffs1 Matrix Coefficients of distortion of first camera.
Output value outCameraMatrix2 Matrix Matrix with part of intrinsic parameters of second camera.
Output value outDistCoeffs2 Matrix Coefficients of distortion of second camera.
Output value outR Matrix Output rotation matrix between the first and second camera coordinate systems.
Output value outT Matrix Output translation vector between the coordinate systems of the cameras.
Output value outE Matrix Output essential matrix.
Output value outF Matrix Output fundamental matrix.
Output value outError Real Final re-projection error value

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 Inconsistent sizes of inImagePoints1, inImagePoints2 and inObjectPoints in cvStereoCalibrate.
DomainError Initial camera matrices not specified with inFixIntrinsic.
DomainError Initial distortion coefficients matrices not specified with inFixIntrinsic.
DomainError Missing inObjectPoints in cvStereoCalibrate.
DomainError Only one initial camera matrix given. Either both or neither initial camera matrices should be specified in cvStereoCalibrate.

Complexity Level

This filter is available on Basic Complexity Level.