reg_MapAffine
import { reg_MapAffine } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Native object: release it with using or delete(). Factories can return null; check before calling methods. Inherits reg_Map.
Defines an affine transformation
Constructors and members
static new
Default constructor builds an identity map
new(linTr: Mat, shift: Mat): reg_MapAffine;linTrLinear part of the affine transformation
shiftDisplacement part of the affine transformation
The reg_MapAffine 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;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;img1Original image
img2Output destination, filled by the native operation. Warped image
inverseMap
Calculates the inverse map
inverseMap(): reg_Map | null;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;mapTransformation 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;factorExpansion if bigger than one, compression if smaller than one
getLinTr
Return linear part of the affine transformation
getLinTr(linTr: Mat): void;linTrOutput destination, filled by the native operation. lin tr argument (Mat).
getShift
Return displacement part of the affine transformation
getShift(shift: Mat): void;shiftOutput destination, filled by the native operation. shift argument (Mat).
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.