Nodes/comfyui_cv/cv2.findTransformECC (2/2)
ComfyUI Node

cv2.findTransformECC (2/2)

Raw wrapper of cv2.findTransformECC(templateImage, inputImage, warpMatrix, motionType?, criteria?, inputMask?). Parameters marked '?' are optional; blank means OpenCV default. See the OpenCV documentation for details.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
cv2.findTransformECC (2/2)
  • templateImage
  • inputImage
  • warpMatrix
  • inputMask
  • float
  • nparray
motionTypeMOTION_AFFINE
criteria_typemax count or epsilon (whichever first)
criteria_max_count30
criteria_epsilon0.00
Categoryimage/CV/low-level/cv2 F

Inputs (8)

NameTypeDefaultDescription
templateImageNPARRAY,IMAGE,MASK1 or 3 channel template image; CV_8U, CV_16U, CV_32F, CV_64F type. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size.
inputImageNPARRAY,IMAGE,MASKinput image which should be warped with the final warpMatrix in order to provide an image similar to templateImage, same type as templateImage. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size.
warpMatrixNPARRAYfloating-point $2\times 3$ or $3\times 3$ mapping matrix (warp). A data array (points / matrix), NOT an image - only an NPARRAY link is accepted here.
motionTypeoptCOMBOMOTION_AFFINEparameter, specifying the type of motion: - **MOTION_TRANSLATION** sets a translational motion model; warpMatrix is $2\times 3$ with the first $2\times 2$ part 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$.
criteria_typeoptCOMBOmax count or epsilon (whichever first)When to stop iterating: after max_count iterations, when the change drops below epsilon, or whichever comes first.
criteria_max_countoptINT301–2147483647Maximum iterations (ignored when 'epsilon only').
criteria_epsilonoptFLOAT0.000–1e+38Target accuracy / smallest change worth continuing for (ignored when 'max count only').
inputMaskoptNPARRAY,IMAGE,MASKAn optional single channel mask to indicate valid values of inputImage. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size.

Outputs (2)

NameTypeDescription
floatFLOAT
nparrayNPARRAY