ee.Image.connectedPixelCount
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
תמונה שבה כל פיקסל מכיל את המספר של השכנים שמחוברים אליו ב-4 או ב-8 כיוונים (כולל הפיקסל עצמו).
שימוש | החזרות |
---|
Image.connectedPixelCount(maxSize, eightConnected) | תמונה |
ארגומנט | סוג | פרטים |
---|
זה: input | תמונה | תמונת הקלט. |
maxSize | מספר שלם, ברירת מחדל: 100 | הגודל המקסימלי של השכונה בפיקסלים. |
eightConnected | בוליאני, ברירת מחדל: true | האם להשתמש בכללים של 8 חיבורים במקום 4 חיבורים. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 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. |"]]