ee.Image.connectedPixelCount
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
تصویری ایجاد کنید که در آن هر پیکسل شامل تعداد همسایه های متصل به 4 یا 8 (از جمله خودش) باشد.
استفاده | برمی گرداند | Image. connectedPixelCount ( maxSize , eightConnected ) | تصویر |
استدلال | تایپ کنید | جزئیات | این: input | تصویر | تصویر ورودی |
maxSize | عدد صحیح، پیش فرض: 100 | حداکثر اندازه همسایگی بر حسب پیکسل. |
eightConnected | بولی، پیش فرض: درست است | آیا از قوانین 8 متصل به جای 4 متصل استفاده می شود یا خیر. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\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. |"]]