Finds connected components with the same value of the first band of the input and labels them with a globally unique value. Connectedness is specified by the given kernel. Objects larger than maxSize are considered background, and are masked.
The image to label.
Maximum size of objects to be labeled.