OpenCV drawMarker_1
DrawMarker, second overload — same markers, still BGR
- img
- nparray
Let's get the naming out of the way first: drawMarker_1 and drawMarker_0 are the same node. OpenCV declares cv2.drawMarker twice in its type stubs - once for MatLike, once for UMat - and the opencv-comfyui generator emitted one node per signature. The _1 is not newer, not better, not a different marker style. It's the second overload, functionally identical, and you can use whichever one your workflow already has in it.
What it's for
It draws a small marker - cross, star, diamond, square, triangle - at a specific point on an image. If you have detection points (keypoints, corners, landmarks) from another OpenCV node and you want to render them visibly, this is the direct tool. The inputs:
img- yourNPARRAY.position- aSTRINGliteral,(x, y). Python literal syntax required;50, 120without parens will throwinvalid syntax (<unknown>, line 0).color- aSTRINGliteral in BGR. Red is(0, 0, 255). This trips up more people than anything else about this node, because every other image tool you've used is RGB.markerType- int 0–6: cross, tilted cross, star, diamond, square, triangle up, triangle down.markerSize,thickness,line_type- size in pixels, stroke thickness, and 8 (normal) vs. 16 (LINE_AAanti-aliased).
One nparray output.
Install
Part of opencv-comfyui. ComfyUI Manager → search OpenCV, or:
cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
pip install opencv-python-contrib
Restart ComfyUI. requirements.txt: opencv-contrib-python, numpy, torch. No weights, no downloads.
The house rules, once more
Everything in this pack is NPARRAY-based: in through Image2Nparray, out through Nparrays2Image, and only batch_size==1 is supported (else Image2Nparray throws Only images with batch_size==1 are supported! - fix with an ImageFromBatch at length 1). Literal fields are parsed with ast.literal_eval, so keep them valid Python. And because the whole pipeline is BGR, your (0, 255, 0) really is green - trust the flip.
Verdict: _1 is a perfectly fine choice for a simple, useful job. There's nothing to choose between it and _0 except which one you happened to drag in first.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| img | NPARRAY | — | |
| position | STRING | — | |
| color | STRING | — | |
| markerType | INT | — | |
| markerSize | INT | — | |
| thickness | INT | — | |
| line_type | INT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | — |