fisheye_stereoRectify
import { fisheye_stereoRectify } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Stereo rectification for fisheye camera model
fisheye_stereoRectify(K1: Mat, D1: Mat, K2: Mat, D2: Mat, imageSize: Size, R: Mat, tvec: Mat, R1: Mat, R2: Mat, P1: Mat, P2: Mat, Q: Mat, flags: number, newImageSize: Size, balance: number, fov_scale: number): void;4 available overloads
fisheye_stereoRectify(K1: Mat, D1: Mat, K2: Mat, D2: Mat, imageSize: Size, R: Mat, tvec: Mat, R1: Mat, R2: Mat, P1: Mat, P2: Mat, Q: Mat, flags: number): void;fisheye_stereoRectify(K1: Mat, D1: Mat, K2: Mat, D2: Mat, imageSize: Size, R: Mat, tvec: Mat, R1: Mat, R2: Mat, P1: Mat, P2: Mat, Q: Mat, flags: number, newImageSize: Size): void;fisheye_stereoRectify(K1: Mat, D1: Mat, K2: Mat, D2: Mat, imageSize: Size, R: Mat, tvec: Mat, R1: Mat, R2: Mat, P1: Mat, P2: Mat, Q: Mat, flags: number, newImageSize: Size, balance: number): void;fisheye_stereoRectify(K1: Mat, D1: Mat, K2: Mat, D2: Mat, imageSize: Size, R: Mat, tvec: Mat, R1: Mat, R2: Mat, P1: Mat, P2: Mat, Q: Mat, flags: number, newImageSize: Size, balance: number, fov_scale: number): void;K1First camera intrinsic matrix.
D1First camera distortion parameters.
K2Second camera intrinsic matrix.
D2Second camera distortion parameters.
imageSizeSize of the image used for stereo calibration.
RRotation matrix between the coordinate systems of the first and the second cameras.
tvecTranslation vector between coordinate systems of the cameras.
R1Output destination, filled by the native operation. Output 3x3 rectification transform (rotation matrix) for the first camera.
R2Output destination, filled by the native operation. Output 3x3 rectification transform (rotation matrix) for the second camera.
P1Output destination, filled by the native operation. Output 3x4 projection matrix in the new (rectified) coordinate systems for the first camera.
P2Output destination, filled by the native operation. Output 3x4 projection matrix in the new (rectified) coordinate systems for the second camera.
QOutput destination, filled by the native operation. Output
4 \times 4disparity-to-depth mapping matrix (see reprojectImageTo3D ).flagsOperation flags that may be zero or
cv::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.newImageSizeNew 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.
balanceSets the new focal length in range between the min focal length and the max focal length. Balance is in range of [0, 1].
fov_scaleDivisor for new focal length.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.