Skip to content

findHomography1

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

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

example: samples/cpp/tutorial_code/features/Homography/pose_from_homography.cpp An example program about pose estimation from coplanar points

Check tutorial_homography "the corresponding tutorial" for more details Finds a perspective transformation between two planes.

Note: Whenever an H matrix cannot be estimated, an empty one will be returned.

See: getAffineTransform, estimateAffine2D, estimateAffinePartial2D, getPerspectiveTransform, warpPerspective, perspectiveTransform

findHomography1(srcPoints: Mat, dstPoints: Mat, mask: Mat, params: UsacParams): Mat;
srcPoints

Coordinates of the points in the original plane, a matrix of the type CV_32FC2 or vector<Point2f> .

dstPoints

Coordinates of the points in the target plane, a matrix of the type CV_32FC2 or a vector<Point2f> .

mask

Output destination, filled by the native operation. Optional output mask set by a robust method ( RANSAC or LMeDS ). Note that the input mask values are ignored.

params

params argument (UsacParams).

Returns

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.