Announcement: All noncommercial projects registered to use Earth Engine beforeApril 15, 2025 mustverify noncommercial eligibility to maintain access. If you have not verified by September 26, 2025, your access may be on hold.

ee.Image.focalMax

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

UsageReturns
Image.focalMax(radius,kernelType,units,iterations,kernel)Image
ArgumentTypeDetails
this:imageImageThe image to which to apply the operations.
radiusFloat, default: 1.5The 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: 1The number of times to apply the given kernel.
kernelKernel, default: nullA custom kernel. If used, kernelType and radius are ignored.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-07-13 UTC.