ee.Image.connectedPixelCount
Generate an image where each pixel contains the number of 4- or 8-connected neighbors (including itself).
Usage | Returns |
---|
Image.connectedPixelCount(maxSize, eightConnected) | Image |
Argument | Type | Details |
---|
this: input | Image | The input image. |
maxSize | Integer, default: 100 | The maximum size of the neighborhood in pixels. |
eightConnected | Boolean, default: true | Whether to use 8-connected rather 4-connected rules. |
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 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["This function creates an image where each pixel's value represents the number of neighboring pixels within a specified range, including itself."],["Users can define the neighborhood size using the `maxSize` parameter, with a default value of 100 pixels."],["The connectivity type can be controlled with the `eightConnected` parameter, allowing for either 4-connected or 8-connected neighborhood calculations, defaulting to 8-connected."]]],[]]