ComfyUI Node
CV Reduce Points By Label
Collapses a labeled point set (from 'CV K-Means Points') to one representative point per cluster: the centroid, or the member farthest from / closest to an origin (e.g. the tip of each clock hand, the innermost match of each group). Rows follow the label order (0, 1, ...), so outputs of several reductions over the same labels stay aligned. The distances output (representative-to-origin) doubles as a sort key for 'CV Pick Value'.
CV Reduce Points By Label
- points
- labels
- points
- distances
- count
◄reductioncentroid►
◄origin_x0.00►
◄origin_y0.00►
Categoryimage/CV/points
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| points | NPARRAY | Nx1x2 labeled points (same order as 'labels'). | |
| labels | NPARRAY | (N,) integer label per point. | |
| reduction | COMBO | centroid | Representative per cluster: its centroid (mean), or the member farthest from / closest to the origin. |
| origin_x | FLOAT | 0.00-1000000–1000000 | X pixel coordinate of the reference origin (e.g. the dial center, anchor, or ray start). |
| origin_y | FLOAT | 0.00-1000000–1000000 | Y pixel coordinate of the reference origin (e.g. the dial center, anchor, or ray start). |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| points | NPARRAY | Kx1x2 float32, one point per label. |
| distances | NPARRAY | (K,) float32 distance of each representative to the origin. |
| count | INT | K, the number of labels. |