initCameraMatrix2D
import { initCameraMatrix2D } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Finds an initial camera intrinsic matrix from 3D-2D point correspondences.
initCameraMatrix2D(objectPoints: MatVector, imagePoints: MatVector, imageSize: Size, aspectRatio: number): Mat;2 available overloads
initCameraMatrix2D(objectPoints: MatVector, imagePoints: MatVector, imageSize: Size): Mat;initCameraMatrix2D(objectPoints: MatVector, imagePoints: MatVector, imageSize: Size, aspectRatio: number): Mat;objectPointsVector of vectors of the calibration pattern points in the calibration pattern coordinate space. In the old interface all the per-view vectors are concatenated. See #calibrateCamera for details.
imagePointsVector of vectors of the projections of the calibration pattern points. In the old interface all the per-view vectors are concatenated.
imageSizeImage size in pixels used to initialize the principal point.
aspectRatioIf it is zero or negative, both
f_xandf_yare estimated independently. Otherwise,f_x = f_y \cdot \texttt{aspectRatio}.The function estimates and returns an initial camera intrinsic matrix for the camera calibration process. Currently, the function only supports planar calibration patterns, which are patterns where each object point has z-coordinate =0.
The Mat result. Release returned native handles with using or delete(), including handles nested in results.
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.