Skip to content

reg_MapProjec

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

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

ARGUMENTSConstructor or factory
CLASSreg_MapProjec
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. Inherits reg_Map.

Defines an transformation that consists on a projective transformation

Constructors and members

static new

Default constructor builds an identity map

new(projTr: Mat): reg_MapProjec;
2 available overloads
new(): reg_MapProjec;
new(projTr: Mat): reg_MapProjec;
projTr

Projective transformation

Returns

The reg_MapProjec result.

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.

inverseWarp

Warps image to a new coordinate frame. The calculation is img2(x)=img1(T(x)), so in fact this is the inverse warping as we are taking the value of img1 with the forward transformation of the points.

inverseWarp(img1: Mat, img2: Mat): void;
img1

Original image

img2

Output destination, filled by the native operation. Warped image

inverseMap

Calculates the inverse map

inverseMap(): reg_Map | null;
Returns

Inverse map

compose

Changes the map composing the current transformation with the one provided in the call. The order is first the current transformation, then the input argument.

compose(map: reg_Map | null): void;
map

Transformation to compose with.

scale

Scales the map by a given factor as if the coordinates system is expanded/compressed by that factor.

scale(factor: number): void;
factor

Expansion if bigger than one, compression if smaller than one

getProjTr

Returns projection matrix

getProjTr(projTr: Mat): void;
projTr

Output destination, filled by the native operation. proj tr argument (Mat).

normalize

Normalizes object's homography

normalize(): void;

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.