공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
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'입니다. 'boxcar' 메서드는 개수, 합계 또는 평균을 빠르게 계산하는 방법입니다. 동질 커널, 단일 입력 리듀서, 마스크, 커널 또는 가중치가 필요하지 않습니다. 'window' 메서드는 실행 중인 창을 사용하며 'boxcar'와 동일한 요구사항이 있지만 단일 입력 리듀서를 사용할 수 있습니다. 두 방법 모두 상당한 추가 메모리가 필요합니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 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. |"]]