ee.Image.focal_mode

Applies a morphological reducer() filter to each band of an image using a named or custom kernel.

UsageReturns
Image.focal_mode(radius, kernelType, units, iterations, kernel)Image
ArgumentTypeDetails
this: imageImage

The image to which to apply the operations.

radiusFloat, default: 1.5

The radius of the kernel to use.

kernelTypeString, default: "circle"

The type of kernel to use. Options include: 'circle', 'square', 'cross', 'plus', octagon' and 'diamond'.

unitsString, default: "pixels"

If a kernel is not specified, this determines whether the kernel is in meters or pixels.

iterationsInteger, default: 1

The number of times to apply the given kernel.

kernelKernel, default: null

A custom kernel. If used, kernelType and radius are ignored.

Examples

JavaScript

// Your example goes here!

Python

# Your example goes here!