Performs stereo calibration (fisheye)
S = cv.fisheyeStereoCalibrate(objectPoints, imagePoints1, imagePoints2, imageSize)
[...] = cv.fisheyeStereoCalibrate(..., 'OptionName',optionValue, ...)
Input
- objectPoints A cell array of cells of the calibration pattern points
{{[x,y,z], ..}, ...}.
- imagePoints1 A cell array of cells of the projections of the
calibration pattern points
{{[x,y], ..}, ...}, observed by the first
camera.
- imagePoints2 A cell array of cells of the projections of the
calibration pattern points
{{[x,y], ..}, ...}, observed by the second
camera.
- imageSize Size of the image used only to initialize intrinsic camera
matrix
[w,h].
Output
- S scalar struct having the following fields:
- cameraMatrix1 Output first camera matrix
[fx1 0 cx1; 0 fy1 cy1; 0 0 1].
- distCoeffs1 Output vector of distortion coefficients
[k1, k2, k3, k4] of 4 elements.
- cameraMatrix2 Output second camera matrix
[fx2 0 cx2; 0 fy2 cy2; 0 0 1]. The parameter is similar to K1.
- distCoeffs2 Output lens distortion coefficients for the second
camera. The parameter is similar to
D1.
- R Output 3x3 rotation matrix between the 1st and the 2nd camera
coordinate systems.
- T Output 3x1 translation vector between the coordinate systems of
the cameras.
- reprojErr output final re-projection error (scalar).
Options
- CameraMatrix1, CameraMatrix2 Initial camera matrices. If any of
UseIntrinsicGuess, FixIntrinsic (default) are specified, some or all
of the matrix components must be initialized. See the flags description
for details.
- DistCoeffs1, DistCoeffs2 Initial lens distortion coefficients.
- FixIntrinsic Fix
K1, K2 and D1, D2 so that only R, T
matrices are estimated. default true
- UseIntrinsicGuess
K1, K2 contains valid initial values of fx,
fy, cx, cy that are optimized further. Otherwise, (cx,cy) is
initially set to the image center (imageSize is used), and focal
distances are computed in a least-squares fashion. default false
- RecomputeExtrinsic Extrinsic will be recomputed after each iteration
of intrinsic optimization. default false
- CheckCond The functions will check validity of condition number.
default false
- FixSkew Skew coefficient (alpha) is set to zero and stay zero.
default false
- FixK1, ..., FixK4 Selected distortion coefficients are set to
zeros and stay zero. default false
- Criteria Termination criteria for the iterative optimization algorithm.
default
struct('type','Count+EPS', 'maxCount',100, 'epsilon',eps)