Nodes/comfyui_cv/CV Term Criteria
ComfyUI Node

CV Term Criteria

Builds the (type, max_count, epsilon) iteration-stop tuple that cv2's iterative algorithms expect (cornerSubPix, kmeans, calcOpticalFlowPyrLK, findTransformECC, meanShift, solvePnPRefine*...). Wire its output into those nodes' 'criteria' input instead of typing the magic type integer (3 = count|eps). Same spirit as 'CV Scalar' / 'CV Array Size' for composite literals.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Term Criteria
    • criteria
    stop_onmax count or epsilon (whichever first)
    max_count30
    epsilon0.0010
    Categoryimage/CV/low-level

    Inputs (3)

    NameTypeDefaultDescription
    stop_onCOMBOmax count or epsilon (whichever first)When to stop iterating: after max_count iterations, when the change drops below epsilon, or whichever comes first.
    max_countINT301–100000Maximum iterations (ignored when 'epsilon only').
    epsilonFLOAT0.00100–1000000Target accuracy / smallest change worth continuing for (ignored when 'max count only').

    Outputs (1)

    NameTypeDescription
    criteriaSTRING'(type, max_count, epsilon)' literal - feed it into a cv2 node's criteria input (convert that widget to an input).