Skip to content

reg_Mapper

regclassOpenCV 5.0.0
import { reg_Mapper } from '@banou/opencv-wasm'

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

ARGUMENTSConstructor or factory
CLASSreg_Mapper
RETURN TYPEOwned native handle
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Native object: release it with using or delete(). Factories can return null; check before calling methods.

Base class for modelling an algorithm for calculating a map

The class is only used to define the common interface for any possible mapping algorithm.

Constructors and members

clone

Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.

clone(): this;
Returns

The this result.

calculate

Calculate mapping between two images

calculate(img1: Mat, img2: Mat, init: reg_Map | null): reg_Map | null;
2 available overloads
calculate(img1: Mat, img2: Mat): reg_Map | null;
calculate(img1: Mat, img2: Mat, init: reg_Map | null): reg_Map | null;
img1

Reference image

img2

Warped image

init

init argument (reg_Map | null).

Returns

Map from img1 to img2, stored in a smart pointer.

getMap

Returns a map compatible with the Mapper class

getMap(): reg_Map | null;
Returns

Pointer to identity Map

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.