ee.Image.reduceNeighborhood
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
यह फ़ंक्शन, दिए गए कर्नल के हिसाब से, हर पिक्सल के आस-पास के पिक्सल पर दिए गए रिड्यूसर को लागू करता है. अगर रिड्यूसर में एक ही इनपुट है, तो इसे कलेक्शन के हर बैंड पर अलग-अलग लागू किया जाएगा. अगर रिड्यूसर में एक से ज़्यादा इनपुट हैं, तो यह ज़रूरी है कि इनपुट इमेज में मौजूद बैंड की संख्या और रिड्यूसर में मौजूद इनपुट की संख्या एक जैसी हो.
रिड्यूसर के आउटपुट के नाम से, आउटपुट बैंड के नाम तय होते हैं: एक से ज़्यादा इनपुट वाले रिड्यूसर, आउटपुट के नामों का सीधे तौर पर इस्तेमाल करेंगे.वहीं, एक इनपुट वाले रिड्यूसर, आउटपुट के नाम से पहले इनपुट बैंड का नाम जोड़ेंगे. उदाहरण के लिए, '10_mean', '20_mean').
वज़न वाले इनपुट के साथ काम करने वाले रिड्यूसर के लिए, इनपुट का वज़न इनपुट मास्क, कर्नल वैल्यू या इन दोनों में से छोटी वैल्यू के आधार पर तय किया जा सकता है.
इस्तेमाल | रिटर्न |
---|
Image.reduceNeighborhood(reducer, kernel, inputWeight, skipMasked, optimization) | इमेज |
आर्ग्यूमेंट | टाइप | विवरण |
---|
यह: image | इमेज | इनपुट इमेज. |
reducer | रेड्यूसर | आस-पास के पिक्सल पर लागू किया जाने वाला रिड्यूसर. |
kernel | कर्नेल | आस-पास के इलाके को तय करने वाला कर्नल. |
inputWeight | स्ट्रिंग, डिफ़ॉल्ट: "kernel" | 'मास्क', 'कर्नल' या 'मिन' में से कोई एक. |
skipMasked | बूलियन, डिफ़ॉल्ट: true | अगर इनपुट पिक्सल को मास्क किया गया है, तो आउटपुट पिक्सल को मास्क करें. |
optimization | स्ट्रिंग, डिफ़ॉल्ट: null | ऑप्टिमाइज़ेशन की रणनीति. इसके विकल्प 'boxcar' और 'window' हैं. 'बॉक्सकार' तरीके से, गिनती, योग या औसत का हिसाब तेज़ी से लगाया जा सकता है. इसके लिए, एक जैसे कर्नेल, सिंगल-इनपुट रिड्यूसर, और MASK, KERNEL या नो वेटिंग में से किसी एक की ज़रूरत होती है. 'विंडो' तरीके में रनिंग विंडो का इस्तेमाल किया जाता है. इसमें 'बॉक्सकार' तरीके की तरह ही ज़रूरी शर्तें होती हैं. हालांकि, इसमें किसी भी सिंगल इनपुट रिड्यूसर का इस्तेमाल किया जा सकता है. दोनों तरीकों के लिए, काफ़ी ज़्यादा मेमोरी की ज़रूरत होती है. |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\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. |"]]