Nodes/comfyui_cv/cv2.cornerSubPix
ComfyUI Node

cv2.cornerSubPix

Raw wrapper of cv2.cornerSubPix(image, corners, winSize, zeroZone, criteria). 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.cornerSubPix
  • image
  • corners
  • winSize
  • zeroZone
  • nparray
criteria_typemax count or epsilon (whichever first)
criteria_max_count30
criteria_epsilon0.00
Categoryimage/CV/low-level/cv2 C

Inputs (7)

NameTypeDefaultDescription
imageNPARRAY,IMAGE,MASKInput single-channel, 8-bit or float image. 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.
cornersNPARRAYInitial coordinates of the input corners and refined coordinates provided for output. A data array (points / matrix), NOT an image - only an NPARRAY link is accepted here.
winSizeCV_TUPLE0,0Half of the side length of the search window. For example, if winSize=Size(5,5) , then a $(5*2+1) \times (5*2+1) = 11 \times 11$ search window is used. One value with 2 components (w, h) - it travels as a whole, so it cannot arrive half-connected. Wire it from 'CV Tuple' or type the components in place.
zeroZoneCV_TUPLE-1,-1Half of the size of the dead region in the middle of the search zone over which the summation in the formula below is not done. It is used sometimes to avoid possible singularities of the autocorrelation matrix. The value of (-1,-1) indicates that there is no such a size. One value with 2 components (w, h) - it travels as a whole, so it cannot arrive half-connected. Wire it from 'CV Tuple' or type the components in place.
criteria_typeCOMBOmax 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_countINT301–2147483647Maximum iterations (ignored when 'epsilon only').
criteria_epsilonFLOAT0.000–1e+38Target accuracy / smallest change worth continuing for (ignored when 'max count only').

Outputs (1)

NameTypeDescription
nparrayNPARRAY