ee.Image.cluster

Applies a clusterer to an image. Returns a new image with a single band containing values from 0 to N, indicating the cluster each pixel is assigned to.

UsageReturns
Image.cluster(clusterer, outputName)Image
ArgumentTypeDetails
this: imageImage

The image to cluster. Must contain all the bands in the clusterer's schema.

clustererClusterer

The clusterer to use.

outputNameString, default: "cluster"

The name of the output band.

Examples

JavaScript

// Your example goes here!

Python

# Your example goes here!