Stay organized with collections
Save and categorize content based on your preferences.
Earth Engine implements morphological operations as focal operations, specifically
focalMax(), focalMin(), focalMedian(), and
focalMode() instance methods in the Image class. (These are
shortcuts for the more general reduceNeighborhood(), which can input the
pixels in a kernel to any reducer with a numeric output. See
this page for more information on reducing
neighborhoods). The morphological operators are useful for performing operations such
as erosion, dilation, opening and closing. For example, to perform an
opening operation,
use focalMin() followed by focalMax():
Note that in the previous example, a kernel argument is provided to the morphological
operator. The pixels covered by non-zero elements of the kernel are used in the
computation. The iterations argument indicates how many times to apply the operator.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["Earth Engine uses focal operations like `focalMax()`, `focalMin()`, `focalMedian()`, and `focalMode()` to implement morphological operations for image processing."],["Morphological operations, such as erosion, dilation, opening, and closing, can be performed using these focal operations to modify image structures."],["Users can define kernels to specify the shape and size of the neighborhood used in the operations and control the number of times the operation is applied with the iterations argument."],["An opening operation, for example, can be achieved by applying `focalMin()` followed by `focalMax()` with a defined kernel."]]],[]]