findTransformECC1
import { findTransformECC1 } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
example: samples/cpp/image_alignment.cpp An example using the image alignment ECC algorithm Finds the geometric transform (warp) between two images in terms of the ECC criterion [EP08] .
See: computeECC, estimateAffine2D, estimateAffinePartial2D, findHomography
findTransformECC1(templateImage: Mat, inputImage: Mat, warpMatrix: Mat, motionType: number, criteria: TermCriteria, inputMask: Mat): number;4 available overloads
findTransformECC1(templateImage: Mat, inputImage: Mat, warpMatrix: Mat): number;findTransformECC1(templateImage: Mat, inputImage: Mat, warpMatrix: Mat, motionType: number): number;findTransformECC1(templateImage: Mat, inputImage: Mat, warpMatrix: Mat, motionType: number, criteria: TermCriteria): number;findTransformECC1(templateImage: Mat, inputImage: Mat, warpMatrix: Mat, motionType: number, criteria: TermCriteria, inputMask: Mat): number;templateImage1 or 3 channel template image; CV_8U, CV_16U, CV_32F, CV_64F type.
inputImageinput image which should be warped with the final warpMatrix in order to provide an image similar to templateImage, same type as templateImage.
warpMatrixInput/output value, modified by the native operation. floating-point
2\times 3or3\times 3mapping matrix (warp).motionTypeparameter, specifying the type of motion:
- MOTION_TRANSLATION sets a translational motion model; warpMatrix is
2\times 3with the first2\times 2part being the unity matrix and the rest two parameters being estimated. - MOTION_EUCLIDEAN sets a Euclidean (rigid) transformation as motion model; three
parameters are estimated; warpMatrix is
2\times 3. - MOTION_AFFINE sets an affine motion model (DEFAULT); six parameters are estimated;
warpMatrix is
2\times 3. - MOTION_HOMOGRAPHY sets a homography as a motion model; eight parameters are
estimated;`warpMatrix` is
3\times 3.
- MOTION_TRANSLATION sets a translational motion model; warpMatrix is
criteriaparameter, specifying the termination criteria of the ECC algorithm; criteria.epsilon defines the threshold of the increment in the correlation coefficient between two iterations (a negative criteria.epsilon makes criteria.maxcount the only termination criterion). Default values are shown in the declaration above.
inputMaskAn optional single channel mask to indicate valid values of inputImage.
The number result.
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.