Nodes/opencv-comfyui/OpenCV fillConvexPoly_1
ComfyUI Node

OpenCV fillConvexPoly_1

Same drawing node, second overload, zero differences

By geroldmeisinger·Created about a year ago·Updated about a year ago· 35
OpenCV fillConvexPoly_1
  • img
  • points
  • nparray
color
lineType
shift

fillConvexPoly_1 is the second auto-generated overload of cv2.fillConvexPoly, and it is, as far as the graph is concerned, the same node as fillConvexPoly_0. Identical inputs - img, points, color, lineType, shift - identical single nparray output, identical underlying function. The pack generator numbers overloads from OpenCV's type stubs; when the overloads produce matching schemas you get matching nodes. There is no scenario in which one behaves differently from the other. Pick one, wire it up, and forget you ever saw this page.

For the substance - what the node does, how the color string literal works, the BGR-vs-RGB trap, and how to feed points from sibling nodes like convexHull or approxPolyDP - read the fillConvexPoly_0 article. The useful bits in one breath: it fills a convex polygon onto a BGR nparray; color is a Python-literal tuple string like (0, 0, 255) (remember: BGR, and missing the parentheses triggers the pack's documented invalid syntax error); points must be a numpy array of vertices you get from another node; and it's the cheap deterministic way to build masks, censor regions, or stamp regions before compositing.

Installing it

It's part of geroldmeisinger/opencv-comfyui, so it comes with the whole ~600-node pack. ComfyUI Manager → search opencv-comfyui, or:

cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui

then restart. Requirements are opencv-contrib-python, numpy, torch. If ComfyUI won't start with Cannot import name 'guidedFilter' from 'cv2.ximgproc', two OpenCV installs are colliding - consolidate to one.

Pack-wide rules apply as ever: nparrays in BGR 0–255 in and out (Image2Nparray → node → Nparrays2Image), batch size 1 only (use ImageFromBatch with length 1 otherwise).

Short version: this node exists because auto-generation is thorough, not because it adds anything. Save yourself the comparison shopping - fillConvexPoly_0 is the canonical page, this one is its shadow.

Categoryimage/OpenCV

Inputs (5)

NameTypeDefaultDescription
imgNPARRAY
pointsNPARRAY
colorSTRING
lineTypeINT
shiftINT

Outputs (1)

NameTypeDescription
nparrayNPARRAY