omnidir_initUndistortRectifyMap
import { omnidir_initUndistortRectifyMap } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Computes undistortion and rectification maps for omnidirectional camera image transform by a rotation R. It output two maps that are used for cv::remap(). If D is empty then zero distortion is used, if R or P is empty then identity matrices are used.
omnidir_initUndistortRectifyMap(K: Mat, D: Mat, xi: Mat, R: Mat, P: Mat, size: Size, m1type: number, map1: Mat, map2: Mat, flags: number): void;KCamera matrix
K = \vecthreethree{f_x}{s}{c_x}{0}{f_y}{c_y}{0}{0}{_1}, with depth CV_32F or CV_64FDInput vector of distortion coefficients
(k_1, k_2, p_1, p_2), with depth CV_32F or CV_64FxiThe parameter xi for CMei's model
RRotation transform between the original and object space : 3x3 1-channel, or vector: 3x1/1x3, with depth CV_32F or CV_64F
PNew camera matrix (3x3) or new projection matrix (3x4)
sizeUndistorted image size.
m1typeType of the first output map that can be CV_32FC1 or CV_16SC2 . See convertMaps() for details.
map1Output destination, filled by the native operation. The first output map.
map2Output destination, filled by the native operation. The second output map.
flagsFlags indicates the rectification type, RECTIFY_PERSPECTIVE, RECTIFY_CYLINDRICAL, RECTIFY_LONGLATI and RECTIFY_STEREOGRAPHIC are supported.
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.