convertPointsFromHomogeneous
import { convertPointsFromHomogeneous } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Converts points from homogeneous to Euclidean space.
convertPointsFromHomogeneous(src: Mat, dst: Mat, dtype: number): void;2 available overloads
convertPointsFromHomogeneous(src: Mat, dst: Mat): void;convertPointsFromHomogeneous(src: Mat, dst: Mat, dtype: number): void;srcInput vector of N-dimensional points.
dstOutput destination, filled by the native operation. Output vector of N-1-dimensional points.
dtypeThe desired output array depth (either CV_32F or CV_64F are currently supported). If it's -1, then it's set automatically to CV_32F or CV_64F, depending on the input depth.
The function converts points homogeneous to Euclidean space using perspective projection. That is, each point (x1, x2, ... x(n-1), xn) is converted to (x1/xn, x2/xn, ..., x(n-1)/xn). When xn=0, the output point coordinates will be (0,0,0,...).
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.