ComfyUI Node
Connected Components With Stats π¦
OpenCV Connected Components With Stats. Labels connected components in a binary image and computes statistics for each component.
Connected Components With Stats π¦
- Np_bin
- num_labels
- labels
- stats
- centroids
βconnectivity8βΊ
βremoveSurroundingtrueβΊ
Categoryπ¦βπ₯ ArchiGraph/π OpenCV
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| Np_bin | NPARRAY | Single batch binary image. Non-zero pixels are treated as 1's. You can use compare(), threshold(), inRange(), Canny() etc. to create a binary image. | |
| connectivity | COMBO | 8 | Pixel connectivity to use. |
| removeSurrounding | BOOLEAN | true | If true, the surrounding part (different from background) will be removed from output. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| num_labels | INT | β |
| labels | NPARRAY | β |
| stats | * | β |
| centroids | * | β |