Skip to content

fisheye_stereoRectify

stereofunctionOpenCV 5.0.0
import { fisheye_stereoRectify } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSK1, D1, K2, D2
FUNCTIONfisheye_stereoRectify
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

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;
K1

First camera intrinsic matrix.

D1

First camera distortion parameters.

K2

Second camera intrinsic matrix.

D2

Second camera distortion parameters.

imageSize

Size of the image used for stereo calibration.

R

Rotation matrix between the coordinate systems of the first and the second cameras.

tvec

Translation vector between coordinate systems of the cameras.

R1

Output destination, filled by the native operation. Output 3x3 rectification transform (rotation matrix) for the first camera.

R2

Output destination, filled by the native operation. Output 3x3 rectification transform (rotation matrix) for the second camera.

P1

Output destination, filled by the native operation. Output 3x4 projection matrix in the new (rectified) coordinate systems for the first camera.

P2

Output destination, filled by the native operation. Output 3x4 projection matrix in the new (rectified) coordinate systems for the second camera.

Q

Output destination, filled by the native operation. Output 4 \times 4 disparity-to-depth mapping matrix (see reprojectImageTo3D ).

flags

Operation 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.

newImageSize

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

Sets the new focal length in range between the min focal length and the max focal length. Balance is in range of [0, 1].

fov_scale

Divisor 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.