Nodes/opencv-comfyui/OpenCV circle_1
ComfyUI Node

OpenCV circle_1

Circle_1 — the same drawing node, same BGR traps, different number

By geroldmeisinger·Created about a year ago·Updated about a year ago· 35
OpenCV circle_1
  • img
  • nparray
center
radius
color
thickness
lineType
shift

circle_1 is a duplicate of circle_0 - same seven inputs, same single image output, same behavior. The opencv-comfyui pack mints one node per overload in OpenCV's type definitions, and the MatLike/UMat variants come out as identical _0/_1 twins. There is no version with extra features. If you've read the circle_0 page, you've read this one. For anyone landing here first, here's the whole story.

This node wraps cv2.circle, the drawing primitive: hand it an image plus a center point, radius, and color, and it returns the image with a circle drawn on it. Use it to annotate frames - marking a detected region, circling a face, adding a reticle - or to build overlay geometry for masks and sketches.

The inputs (all required): img (NPARRAY, the BGR uint8 image), center (STRING, a (x, y) literal like (512, 512)), radius (INT), color (STRING, a BGR tuple literal like (0, 0, 255) for red), thickness (INT; negative fills), lineType (INT; 8 or 16 for anti-aliased), shift (INT, leave at 0). Output is the drawn-on nparray. Because OpenCV draws in-place, you can chain circles and other drawing nodes by feeding each output into the next.

The traps, worth repeating since they're the ones that bite. Composite strings are parsed with literal_eval - so (100, 100) for center and (0, 0, 255) for color work, but stray syntax throws the pack's invalid syntax (unknown, line 0) error. And the color is BGR: the pack lives on the OpenCV side where Image2Nparray has already flipped your RGB IMAGE to BGR, so (0, 0, 255) is red and (255, 0, 0) is blue. Pick a color, see it swapped, don't panic - flip the tuple. Also batch_size == 1 only: multi-image batches make Image2Nparray throw, so use ImageFromBatch first.

Install: ComfyUI Manager → search "OpenCV", or:

cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
pip install opencv-python-contrib

Restart after, no model files. And remember the pack's standing disclaimer: auto-generated, ugly, "expect dragons." This is one of the friendlier ones - a circle-drawing twin that works exactly like its sibling.

Categoryimage/OpenCV

Inputs (7)

NameTypeDefaultDescription
imgNPARRAY
centerSTRING
radiusINT
colorSTRING
thicknessINT
lineTypeINT
shiftINT

Outputs (1)

NameTypeDescription
nparrayNPARRAY