AlignMTB
import { AlignMTB } 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 AlignExposures.
This algorithm converts images to median threshold bitmaps (1 for pixels brighter than median luminance and 0 otherwise) and than aligns the resulting bitmaps using bit operations.
It is invariant to exposure, so exposure values and camera response are not necessary.
In this implementation new image regions are filled with zeros.
For more information see [GW03] .
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;The this result.
process
AlignMTB.process: Aligns images
process(src: MatVector, dst: MatVector, times: Mat, response: Mat): void;srcvector of input images
dstvector of aligned images
timesvector of exposure time values for each image
response256x1 matrix with inverse camera response function for each pixel value, it should have the same number of channels as images.
process1
Short version of process, that doesn't take extra arguments.
process1(src: MatVector, dst: MatVector): void;srcvector of input images
dstvector of aligned images
calculateShift
Calculates shift between two images, i. e. how to shift the second image to correspond it with the first.
calculateShift(img0: Mat, img1: Mat): Point;img0first image
img1second image
The Point result.
shiftMat
Helper function, that shift Mat filling new regions with zeros.
shiftMat(src: Mat, dst: Mat, shift: Point): void;srcinput image
dstOutput destination, filled by the native operation. result image
shiftshift value
computeBitmaps
Computes median threshold and exclude bitmaps of given image.
computeBitmaps(img: Mat, tb: Mat, eb: Mat): void;imginput image
tbOutput destination, filled by the native operation. median threshold bitmap
ebOutput destination, filled by the native operation. exclude bitmap
getMaxBits
Return the max bits configured on this AlignMTB object.
getMaxBits(): number;The number result.
setMaxBits
Set the max bits used by this AlignMTB object.
setMaxBits(max_bits: number): void;max_bitsmax bits argument (number).
getExcludeRange
Return the exclude range configured on this AlignMTB object.
getExcludeRange(): number;The number result.
setExcludeRange
Set the exclude range used by this AlignMTB object.
setExcludeRange(exclude_range: number): void;exclude_rangeexclude range argument (number).
getCut
Return the cut configured on this AlignMTB object.
getCut(): boolean;The boolean result.
setCut
Set the cut used by this AlignMTB object.
setCut(value: boolean): void;valuevalue argument (boolean).
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.