Skip to content

convertPointsToHomogeneous

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

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

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

Converts points from Euclidean to homogeneous space.

convertPointsToHomogeneous(src: Mat, dst: Mat, dtype: number): void;
2 available overloads
convertPointsToHomogeneous(src: Mat, dst: Mat): void;
convertPointsToHomogeneous(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 from Euclidean to homogeneous space by appending 1's to the tuple of point coordinates. That is, each point (x1, x2, ..., xn) is converted to (x1, x2, ..., xn, 1).

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.