Click or drag to resize

Cv2FishEyeStereoRectify Method

Stereo rectification for fisheye camera model

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public static void StereoRectify(
	InputArray k1,
	InputArray d1,
	InputArray k2,
	InputArray d2,
	Size imageSize,
	InputArray r,
	InputArray tvec,
	OutputArray r1,
	OutputArray r2,
	OutputArray p1,
	OutputArray p2,
	OutputArray q,
	FishEyeCalibrationFlags flags,
	Size newImageSize = null,
	double balance = 0,
	double fovScale = 1
)

Parameters

k1
Type: OpenCvSharpInputArray
First camera matrix.
d1
Type: OpenCvSharpInputArray
First camera distortion parameters.
k2
Type: OpenCvSharpInputArray
Second camera matrix.
d2
Type: OpenCvSharpInputArray
Second camera distortion parameters.
imageSize
Type: OpenCvSharpSize
Size of the image used for stereo calibration.
r
Type: OpenCvSharpInputArray
Rotation matrix between the coordinate systems of the first and the second cameras.
tvec
Type: OpenCvSharpInputArray
Translation vector between coordinate systems of the cameras.
r1
Type: OpenCvSharpOutputArray
Output 3x3 rectification transform (rotation matrix) for the first camera.
r2
Type: OpenCvSharpOutputArray
Output 3x3 rectification transform (rotation matrix) for the second camera.
p1
Type: OpenCvSharpOutputArray
Output 3x4 projection matrix in the new (rectified) coordinate systems for the first camera.
p2
Type: OpenCvSharpOutputArray
Output 3x4 projection matrix in the new (rectified) coordinate systems for the second camera.
q
Type: OpenCvSharpOutputArray
Output 4x4 disparity-to-depth mapping matrix (see reprojectImageTo3D ).
flags
Type: OpenCvSharpFishEyeCalibrationFlags
Operation flags that may be zero or CALIB_ZERO_DISPARITY . 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.
newImageSize (Optional)
Type: OpenCvSharpSize
New image resolution after rectification. The same size should be passed to initUndistortRectifyMap(see the stereo_calib.cpp sample in OpenCV samples directory). 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 (Optional)
Type: SystemDouble
Sets the new focal length in range between the min focal length and the max focal length.Balance is in range of[0, 1].
fovScale (Optional)
Type: SystemDouble
Divisor for new focal length.
See Also