Nodes/ComfyUI CV/CV Split Point
ComfyUI Node

CV Split Point

Getting x and y out of a point so you can actually use them

By bmad4ever·Created 3 months ago·Updated 14 days ago· 1
CV Split Point
  • point
  • x
  • y
◄dtypeint►

OpenCV is full of functions that return a point: cv2.minMaxLoc gives you min_loc and max_loc, cv2.minEnclosingCircle gives you a center. That's the answer you wanted, in a package you can't use. Almost nothing downstream takes a "point" - it takes an x and a y, two separate numbers, because that's what sockets are.

CV Split Point is the adapter. Two numbers out, ready to drive anything.

How it works

It reads a point and emits x and y as two separate outputs. What it accepts is worth knowing, because it tells you something about the pack's history:

  • A CV_TUPLE - the type a cv2 node's point output emits.
  • A plain string literal, "(30, 12)". This is compatibility: per the description, those cv2 point outputs used to be emitted as literal strings, so the node still parses them. Old workflows and screenshots get searched for, and a node that breaks on the old format would be a support burden - so it accepts both.
  • And dtype - int truncates floats, for pixel indices; float preserves fractions, for subpixel coordinates. That choice is the one decision on the node, and it has a real consequence: a subpixel corner truncated to int is up to half a pixel off, which is nothing when you're drawing a dot and everything when you're feeding a calibration pipeline.

Two outputs, x and y, typed * - so they'll connect to an INT or a FLOAT input and the dtype you selected is what arrives.

Where it goes

The most useful destination in the pack is a probe point. CV Select Component At Point takes x and y as FLOAT inputs - "which blob is under this pixel" - and the coordinate usually arrives as a point from somewhere else, so Split Point sits in front of it in nearly every graph that uses both.

The rest is the ordinary plumbing case the KB's node-plumbing doc describes: a value that exists inside one node's output has to become a socket before it can drive another node. A crop origin, a probe point, a pivot, a math expression argument. Same shape of problem as turning a widget into an input, one level further in.

CV Split Tuple is the general-arity version. If your value isn't a two-component point, use that one instead.

Install

ComfyUI Manager → ComfyUI CV → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/bmad4ever/comfyui_cv
pip install "opencv-contrib-python-headless~=5.0.0.93"

Python ≥ 3.12, recent ComfyUI on the V3 node API. No models, no GPU, nothing to download. This is a pure data node from the pack's image/CV/low-level category.

Common issues

  • Coordinates look rounded when you needed subpixel. dtype defaults to int. Switch it to float - this is the one setting that silently costs you precision.
  • Nothing connects to the outputs. They're typed *, so they should connect to INT or FLOAT inputs both. If a wire won't attach, the problem is on the receiving end.
  • You're feeding it a four-value thing, not a point. That's CV Split Tuple, which also handles a BOUNDING_BOX (a cv2 Rect: x, y, width, height).
  • The whole image/CV category vanished after another pack's install. A non-contrib OpenCV wheel overwrote the contrib one - all four OpenCV distributions share one site-packages/cv2. python tools/repair_opencv_contrib.py --check, then --apply.
Categoryimage/CV/low-level

Inputs (2)

NameTypeDefaultDescription
pointCV_TUPLE,STRINGA point - wire it from a cv2 node's point output (min_loc/max_loc, center, ...) or type the "(30, 12)" literal.
dtypeCOMBOintOutput type: 'int' truncates to integer (for pixel indices), 'float' preserves fractional values (for subpixel coordinates).

Outputs (2)

NameTypeDescription
x*X coordinate - int or float per dtype selection.
y*Y coordinate - int or float per dtype selection.