Skip to content

convertPointsFromHomogeneous

geometryfunctionOpenCV 5.0.0
import { convertPointsFromHomogeneous } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSsrc, dst, dtype
FUNCTIONconvertPointsFromHomogeneous
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

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;
src

Input vector of N-dimensional points.

dst

Output destination, filled by the native operation. Output vector of N-1-dimensional points.

dtype

The 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.