Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The input is a binary image. Any contiguous area (with connectivity 4 or 8, as per the argument) is given a label.

label is the same size as the input image, and of type CV_32S, as you passed the argument. Each pixel in label contains the number of the blob it belongs to, with 0 being no blob. You have a maximum label value of the return value - 1.