ee.Image.connectedComponents

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.

UsageReturns
Image.connectedComponents(connectedness, maxSize)Image
ArgumentTypeDetails
this: imageImage

The image to label.

connectednessKernel

Connectedness kernel.

maxSizeInteger

Maximum size of objects to be labeled.

Examples

JavaScript

// Your example goes here!

Python

# Your example goes here!