إشعار: يجب
إثبات أهلية جميع المشاريع غير التجارية المسجّلة لاستخدام Earth Engine قبل
15 أبريل 2025 من أجل الحفاظ على إمكانية الوصول إلى Earth Engine.
ee.Image.reduceNeighborhood
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تطبِّق هذه الدالة المخفِّض المحدّد على الجوار المحيط بكل وحدة بكسل، وذلك على النحو الذي تحدده النواة المحددة. إذا كان المخفّض يتضمّن إدخالاً واحدًا، سيتم تطبيقه بشكل منفصل على كل نطاق من المجموعة، وإلا يجب أن يتضمّن العدد نفسه من المدخلات التي تحتوي عليها صورة الإدخال.
تحدّد أسماء الإخراج الخاصة ببرنامج تقليل البيانات أسماء النطاقات الناتجة: ستستخدم برامج تقليل البيانات التي تتضمّن مدخلات متعددة أسماء الإخراج مباشرةً، بينما ستضيف برامج تقليل البيانات التي تتضمّن مدخلاً واحدًا بادئة إلى اسم الإخراج تتضمّن اسم نطاق الإدخال (مثلاً، '10_mean' و'20_mean').
يمكن أن تحتوي المخفّضات التي تتضمّن مدخلات مرجّحة على وزن الإدخال استنادًا إلى قناع الإدخال أو قيمة النواة أو القيمة الأصغر بين هاتين القيمتَين.
الاستخدام | المرتجعات |
---|
Image.reduceNeighborhood(reducer, kernel, inputWeight, skipMasked, optimization) | صورة |
الوسيطة | النوع | التفاصيل |
---|
هذا: image | صورة | الصورة المدخَلة |
reducer | Reducer | الدالة المخفِّضة التي سيتم تطبيقها على وحدات البكسل ضمن المنطقة المجاورة |
kernel | Kernel | النواة التي تحدّد الحي |
inputWeight | سلسلة، القيمة التلقائية: "kernel" | إحدى القيم "mask" أو "kernel" أو "min". |
skipMasked | قيمة منطقية، القيمة التلقائية: true | إخفاء وحدات البكسل الناتجة إذا تم إخفاء وحدة البكسل المقابلة في الصورة الأصلية |
optimization | سلسلة، القيمة التلقائية: null | استراتيجية التحسين الخيارات المتاحة هي boxcar وwindow. طريقة "القطار" هي طريقة سريعة لاحتساب العدد أو المجموع أو المتوسط. تتطلّب هذه الدالة نواة متجانسة ومخفّضًا ذا إدخال واحد، بالإضافة إلى MASK أو KERNEL أو عدم استخدام الترجيح. تستخدم طريقة "الفترة الزمنية" فترة زمنية متواصلة، ولها المتطلبات نفسها التي تنطبق على طريقة "التحويل"، ولكن يمكنها استخدام أي أداة تقليل إدخال فردية. تتطلّب كلتا الطريقتَين ذاكرة إضافية كبيرة. |
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eApplies a given reducer function to the neighborhood of each pixel, defined by a kernel.\u003c/p\u003e\n"],["\u003cp\u003eOutput band names are determined by the reducer's output names, prefixed with the input band name for single-input reducers.\u003c/p\u003e\n"],["\u003cp\u003eInput weight for reducers can be based on the mask, kernel value, or the minimum of the two.\u003c/p\u003e\n"],["\u003cp\u003eOffers optimization strategies like 'boxcar' and 'window' for specific reducer and kernel types to improve performance.\u003c/p\u003e\n"],["\u003cp\u003eAllows skipping computation on masked pixels for efficiency.\u003c/p\u003e\n"]]],["This operation applies a reducer to pixel neighborhoods defined by a kernel. The reducer can have single or multiple inputs, with output band names determined accordingly. Weighted inputs are supported based on the input mask, kernel value, or their minimum. Options are available to skip masked pixels and optimize the process. The `Image.reduceNeighborhood` function takes a reducer, kernel, input weight, skip masked option, and an optimization method, returning a new image.\n"],null,["# ee.Image.reduceNeighborhood\n\nApplies the given reducer to the neighborhood around each pixel, as determined by the given kernel. If the reducer has a single input, it will be applied separately to each band of the collection; otherwise it must have the same number of inputs as the input image has bands.\n\n\u003cbr /\u003e\n\nThe reducer output names determine the names of the output bands: reducers with multiple inputs will use the output names directly, while reducers with a single input will prefix the output name with the input band name (e.g., '10_mean', '20_mean').\n\nReducers with weighted inputs can have the input weight based on the input mask, the kernel value, or the smaller of those two.\n\n| Usage | Returns |\n|--------------------------------------------------------------------------------------------------|---------|\n| Image.reduceNeighborhood`(reducer, kernel, `*inputWeight* `, `*skipMasked* `, `*optimization*`)` | 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 neighborhood. |\n| `kernel` | Kernel | The kernel defining the neighborhood. |\n| `inputWeight` | String, default: \"kernel\" | One of 'mask', 'kernel', or 'min'. |\n| `skipMasked` | Boolean, default: true | Mask output pixels if the corresponding input pixel is masked. |\n| `optimization` | String, default: null | Optimization strategy. Options are 'boxcar' and 'window'. The 'boxcar' method is a fast method for computing count, sum or mean. It requires a homogeneous kernel, a single-input reducer and either MASK, KERNEL or no weighting. The 'window' method uses a running window, and has the same requirements as 'boxcar', but can use any single input reducer. Both methods require considerable additional memory. |"]]