ee.Image.neighborhoodToBands
Turns the neighborhood of a pixel into a set of bands. The neighborhood is specified using a Kernel and only non-zero-weight kernel values are used. The weights of the kernel is otherwise ignored.
Each input band produces x * y output bands. Each output band is named 'input_x_y' where x and y indicate the pixel's location in the kernel. For example, a 3x3 kernel operating on a 2-band image produces 18 output bands.
Usage | Returns |
---|
Image.neighborhoodToBands(kernel) | Image |
Argument | Type | Details |
---|
this: image | Image | The image to get pixels from. |
kernel | Kernel | The kernel specifying the neighborhood. Zero-weight values 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-09-19 UTC.
[null,null,["Last updated 2024-09-19 UTC."],[[["Transforms image pixels by considering their neighboring pixels defined by a kernel."],["Generates multiple output bands for each input band, representing the pixel values within the kernel's neighborhood."],["The output bands are named based on the input band and the pixel's position in the kernel."],["Kernel weights are only used to define the neighborhood, their actual values are not used in the calculation."]]],[]]