OpenCV arrowedLine_1
The twin of the arrow-drawing node (yes, they're identical)
- img
- nparray
arrowedLine_1 and arrowedLine_0 are the same node. OpenCV's type stubs list cv2.arrowedLine twice - a MatLike overload and a UMat overload - and this pack auto-generates a wrapper for every overload it finds, so you get two badges for one function. Same inputs, same drawing, same output. If you already read arrowedLine_0, you know everything here.
For the record, here's what the node does: it paints a line with an arrowhead onto an image, in place. That's your tool for annotating outputs - pointing at a detected region, marking direction, labeling a crop.
The inputs, briefly
- img - the
NPARRAYto draw on. The output is the same image with the arrow painted over it. - pt1 / pt2 - start and end points as string literals:
"(30, 40)"in(x, y)order. - color - string literal in BGR:
"(0, 0, 255)"is red. This is OpenCV, so R and B are flipped relative to what you might expect from ComfyUI. - thickness, line_type, shift - line width, drawing mode (
16= anti-aliasedLINE_AA, the nice one), and fractional-pixel shift (leave at0). - tipLength - arrowhead size as a fraction of line length;
0.1is the sensible default. - Output: one nparray.
The two things that will actually bite you
String literals. Points and colors are parsed with ast.literal_eval, so "(30, 40)" is valid and "(30, 40" is not - the latter throws the pack's invalid syntax (<unknown>, line 0) error. Parens and commas, every time.
BGR color. Ask for "(255, 0, 0)" and you'll get a blue arrow, because OpenCV orders channels B, G, R. Want red? "(0, 0, 255)".
Plumbing and install
This is an NPARRAY-world node. Feed it through Image2Nparray, convert back with Nparrays2Image to preview, and use cvtColor if you need to swap channels. The pack is opencv-comfyui, installed via ComfyUI Manager (search "opencv-comfyui") or:
cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
pip install opencv-python-contrib
Restart ComfyUI, no models needed. The one pack-level install trap is a conflicting OpenCV (Cannot import name 'guidedFilter' from 'cv2.ximgproc'), fixed by a clean reinstall.
The _0/_1 twin thing is a recurring quirk of this pack - the generator just doesn't dedupe overloads. Treat them as interchangeable and move on.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| img | NPARRAY | — | |
| pt1 | STRING | — | |
| pt2 | STRING | — | |
| color | STRING | — | |
| thickness | INT | — | |
| line_type | INT | — | |
| shift | INT | — | |
| tipLength | FLOAT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | — |