Nodes/comfyui_cv/cv2.estimateAffine2D
ComfyUI Node

cv2.estimateAffine2D

Raw wrapper of cv2.estimateAffine2D(from_, to, method?, ransacReprojThreshold?, maxIters?, confidence?, refineIters?). 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.estimateAffine2D
  • from_
  • to
  • out
  • inliers
methodRANSAC
ransacReprojThreshold3.0000
maxIters2000
confidence0.9900
refineIters10
Categoryimage/CV/low-level/cv2 E

Inputs (7)

NameTypeDefaultDescription
from_NPARRAY - - - A data array (points / matrix), NOT an image - only an NPARRAY link is accepted here.
toNPARRAYSecond input 2D point set containing $(x,y)$. A data array (points / matrix), NOT an image - only an NPARRAY link is accepted here.
methodoptCOMBORANSACRobust method used to compute transformation. The following methods are possible: - - RANSAC-based robust method - - Least-Median robust method RANSAC is the default method.
ransacReprojThresholdoptFLOAT3.0000-1e+38–1e+38Maximum reprojection error in the RANSAC algorithm to consider a point as an inlier. Applies only to RANSAC. Preset to the OpenCV default (3.0).
maxItersoptINT2000-2147483648–2147483647The maximum number of robust method iterations. Preset to the OpenCV default (2000).
confidenceoptFLOAT0.9900-1e+38–1e+38Confidence level, between 0 and 1, for the estimated transformation. Anything between 0.95 and 0.99 is usually good enough. Values too close to 1 can slow down the estimation significantly. Values lower than 0.8-0.9 can result in an incorrectly estimated transformation. Preset to the OpenCV default (0.99).
refineItersoptINT10-2147483648–2147483647Maximum number of iterations of refining algorithm (Levenberg-Marquardt). Passing 0 will disable refining, so the output matrix will be output of robust method. Preset to the OpenCV default (10).

Outputs (2)

NameTypeDescription
outNPARRAY
inliersNPARRAY