إشعار: يجب
إثبات أهلية جميع المشاريع غير التجارية المسجّلة لاستخدام Earth Engine قبل
15 أبريل 2025 من أجل الحفاظ على إمكانية الوصول إلى Earth Engine.
ee.Image.reduceConnectedComponents
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تطبِّق هذه السمة أداة تقليل على جميع وحدات البكسل داخل كل "كائن". تُعتبر وحدات البكسل تابعةً لعنصر إذا كانت متصلة (في 8 اتجاهات) وكانت لها القيمة نفسها في النطاق "التصنيف". يتم استخدام نطاق التصنيف لتحديد مستوى الاتصال فقط، ويتم تقديم الباقي كمدخلات إلى أداة الاختزال.
الاستخدام | المرتجعات |
---|
Image.reduceConnectedComponents(reducer, labelBand, maxSize) | صورة |
الوسيطة | النوع | التفاصيل |
---|
هذا: image | صورة | الصورة المدخَلة |
reducer | Reducer | الدالة المخفّضة التي سيتم تطبيقها على وحدات البكسل ضمن المكوّن المرتبط |
labelBand | سلسلة، القيمة التلقائية: null | اسم النطاق الذي سيتم استخدامه لرصد الاتصال. إذا لم يتم تحديدها، يتم استخدام النطاق الأول. |
maxSize | عدد صحيح، القيمة التلقائية: 256 | حجم المنطقة المجاورة المطلوب أخذها في الاعتبار عند تجميع القيم. سيتم إخفاء أي عناصر أكبر من maxSize في البُعد الأفقي أو العمودي، لأنّ أجزاءً من العنصر قد تكون خارج الحي. |
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eReduces pixel values within connected regions (objects) of an image based on a user-provided reducer function.\u003c/p\u003e\n"],["\u003cp\u003eObjects are identified by contiguous pixels sharing the same value in a specified label band (defaults to the first band if not provided).\u003c/p\u003e\n"],["\u003cp\u003eThe reducer function receives all image bands except the label band as input and aggregates pixel values within each object.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003emaxSize\u003c/code\u003e parameter limits the size of objects considered for reduction, masking larger objects to avoid edge effects.\u003c/p\u003e\n"]]],[],null,["# ee.Image.reduceConnectedComponents\n\nApplies a reducer to all of the pixels inside of each 'object'. Pixels are considered to belong to an object if they are connected (8-way) and have the same value in the 'label' band. The label band is only used to identify the connectedness; the rest are provided as inputs to the reducer.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------------------------------------------------------------|---------|\n| Image.reduceConnectedComponents`(reducer, `*labelBand* `, `*maxSize*`)` | Image |\n\n| Argument | Type | Details |\n|---------------|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `image` | Image | The input image. |\n| `reducer` | Reducer | The reducer to apply to pixels within the connected component. |\n| `labelBand` | String, default: null | The name of the band to use to detect connectedness. If unspecified, the first band is used. |\n| `maxSize` | Integer, default: 256 | Size of the neighborhood to consider when aggregating values. Any objects larger than maxSize in either the horizontal or vertical dimension will be masked, since portions of the object might be outside of the neighborhood. |"]]