ee.Image.focalMax
Applies a morphological reducer() filter to each band of an image using a named or custom kernel.
Usage | Returns |
---|
Image.focalMax(radius, kernelType, units, iterations, kernel) | Image |
Argument | Type | Details |
---|
this: image | Image | The image to which to apply the operations. |
radius | Float, default: 1.5 | The radius of the kernel to use. |
kernelType | String, default: "circle" | The type of kernel to use. Options include: 'circle', 'square', 'cross', 'plus', 'octagon', and 'diamond'. |
units | String, default: "pixels" | If a kernel is not specified, this determines whether the kernel is in meters or pixels. |
iterations | Integer, default: 1 | The number of times to apply the given kernel. |
kernel | Kernel, default: null | A custom kernel. If used, kernelType and radius are ignored. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-13 UTC.
[null,null,["Last updated 2024-07-13 UTC."],[[["Applies a morphological reducer, such as focalMax, to an image to alter pixel values based on neighboring pixels within a specified kernel."],["Offers flexibility in kernel selection with predefined shapes like circle, square, cross, plus, octagon, and diamond or allows custom kernels."],["Users can control the kernel size using radius and specify whether the unit is in pixels or meters."],["Enables iterative application of the kernel for intensified effects using the iterations parameter."],["Modifies each band of the input image independently, returning a new image with the transformed values."]]],["The `focalMax()` function applies a morphological reducer filter to each image band. It utilizes either a predefined kernel type (circle, square, cross, plus, octagon, diamond) or a user-defined custom kernel. The operation is applied iteratively, with the number of iterations specifiable. The kernel's size is determined by the `radius` parameter (in pixels or meters) or by the dimensions of the custom kernel. The method returns the processed image.\n"]]