omnidir_undistortImage
import { omnidir_undistortImage } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Undistort omnidirectional images to perspective images
omnidir_undistortImage(distorted: Mat, undistorted: Mat, K: Mat, D: Mat, xi: Mat, flags: number, Knew: Mat, new_size: Size, R: Mat): void;4 available overloads
omnidir_undistortImage(distorted: Mat, undistorted: Mat, K: Mat, D: Mat, xi: Mat, flags: number): void;omnidir_undistortImage(distorted: Mat, undistorted: Mat, K: Mat, D: Mat, xi: Mat, flags: number, Knew: Mat): void;omnidir_undistortImage(distorted: Mat, undistorted: Mat, K: Mat, D: Mat, xi: Mat, flags: number, Knew: Mat, new_size: Size): void;omnidir_undistortImage(distorted: Mat, undistorted: Mat, K: Mat, D: Mat, xi: Mat, flags: number, Knew: Mat, new_size: Size, R: Mat): void;distortedThe input omnidirectional image.
undistortedOutput destination, filled by the native operation. The output undistorted image.
KCamera matrix
K = \vecthreethree{f_x}{s}{c_x}{0}{f_y}{c_y}{0}{0}{_1}.DInput vector of distortion coefficients
(k_1, k_2, p_1, p_2).xiThe parameter xi for CMei's model.
flagsFlags indicates the rectification type, RECTIFY_PERSPECTIVE, RECTIFY_CYLINDRICAL, RECTIFY_LONGLATI and RECTIFY_STEREOGRAPHIC
KnewCamera matrix of the distorted image. If it is not assigned, it is just K.
new_sizeThe new image size. By default, it is the size of distorted.
RRotation matrix between the input and output images. By default, it is identity matrix.
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.