Stay organized with collections Save and categorize content based on your preferences.
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.

Image.connectedComponents(connectedness, maxSize)Image
this: imageImageThe image to label.
connectednessKernelConnectedness kernel.
maxSizeIntegerMaximum size of objects to be labeled.