Click or drag to resize

Cv2.FishEye.StereoRectify 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: OpenCvSharp.InputArray
First camera matrix.
d1
Type: OpenCvSharp.InputArray
First camera distortion parameters.
k2
Type: OpenCvSharp.InputArray
Second camera matrix.
d2
Type: OpenCvSharp.InputArray
Second camera distortion parameters.
imageSize
Type: OpenCvSharp.Size
Size of the image used for stereo calibration.
r
Type: OpenCvSharp.InputArray
Rotation matrix between the coordinate systems of the first and the second cameras.
tvec
Type: OpenCvSharp.InputArray
Translation vector between coordinate systems of the cameras.
r1
Type: OpenCvSharp.OutputArray
Output 3x3 rectification transform (rotation matrix) for the first camera.
r2
Type: OpenCvSharp.OutputArray
Output 3x3 rectification transform (rotation matrix) for the second camera.
p1
Type: OpenCvSharp.OutputArray
Output 3x4 projection matrix in the new (rectified) coordinate systems for the first camera.
p2
Type: OpenCvSharp.OutputArray
Output 3x4 projection matrix in the new (rectified) coordinate systems for the second camera.
q
Type: OpenCvSharp.OutputArray
Output 4x4 disparity-to-depth mapping matrix (see reprojectImageTo3D ).
flags
Type: OpenCvSharp.FishEyeCalibrationFlags
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: OpenCvSharp.Size
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: System.Double
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: System.Double
Divisor for new focal length.
See Also