Pengumuman: Semua project nonkomersial yang terdaftar untuk menggunakan Earth Engine sebelum
15 April 2025 harus
memverifikasi kelayakan nonkomersial untuk mempertahankan akses Earth Engine.
ee.Image.connectedPixelCount
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Buat gambar yang setiap pikselnya berisi jumlah tetangga yang terhubung 4 atau 8 (termasuk dirinya sendiri).
Penggunaan | Hasil |
---|
Image.connectedPixelCount(maxSize, eightConnected) | Gambar |
Argumen | Jenis | Detail |
---|
ini: input | Gambar | Gambar input. |
maxSize | Bilangan bulat, default: 100 | Ukuran maksimum lingkungan dalam piksel. |
eightConnected | Boolean, default: benar (true) | Apakah akan menggunakan aturan 8-terhubung, bukan 4-terhubung. |
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-26 UTC.
[null,null,["Terakhir diperbarui pada 2025-07-26 UTC."],[[["\u003cp\u003eThis function creates an image where each pixel's value represents the number of neighboring pixels within a specified range, including itself.\u003c/p\u003e\n"],["\u003cp\u003eUsers can define the neighborhood size using the \u003ccode\u003emaxSize\u003c/code\u003e parameter, with a default value of 100 pixels.\u003c/p\u003e\n"],["\u003cp\u003eThe connectivity type can be controlled with the \u003ccode\u003eeightConnected\u003c/code\u003e parameter, allowing for either 4-connected or 8-connected neighborhood calculations, defaulting to 8-connected.\u003c/p\u003e\n"]]],[],null,["# ee.Image.connectedPixelCount\n\nGenerate an image where each pixel contains the number of 4- or 8-connected neighbors (including itself).\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------------------------------------------------|---------|\n| Image.connectedPixelCount`(`*maxSize* `, `*eightConnected*`)` | Image |\n\n| Argument | Type | Details |\n|------------------|------------------------|------------------------------------------------------|\n| this: `input` | Image | The input image. |\n| `maxSize` | Integer, default: 100 | The maximum size of the neighborhood in pixels. |\n| `eightConnected` | Boolean, default: true | Whether to use 8-connected rather 4-connected rules. |"]]