triangulatePoints
import { triangulatePoints } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
This function reconstructs 3-dimensional points (in homogeneous coordinates) by using their observations with a stereo camera.
Note: Keep in mind that all input data should be of float type in order for this function to work.
Note: If the projection matrices from stereoRectify are used, then the returned points are
represented in the first camera's rectified coordinate system.
See: reprojectImageTo3D
triangulatePoints(projMatr1: Mat, projMatr2: Mat, projPoints1: Mat, projPoints2: Mat, points4D: Mat): void;projMatr13x4 projection matrix of the first camera, i.e. this matrix projects 3D points given in the world's coordinate system into the first image.
projMatr23x4 projection matrix of the second camera, i.e. this matrix projects 3D points given in the world's coordinate system into the second image.
projPoints12xN array of feature points in the first image. In the case of the c++ version, it can be also a vector of feature points or two-channel matrix of size 1xN or Nx1.
projPoints22xN array of corresponding points in the second image. In the case of the c++ version, it can be also a vector of feature points or two-channel matrix of size 1xN or Nx1.
points4DOutput destination, filled by the native operation. 4xN array of reconstructed points in homogeneous coordinates. These points are returned in the world's coordinate system.
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.