공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
ee.Image.reduceConnectedComponents
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
각 '객체' 내의 모든 픽셀에 리듀서를 적용합니다. 픽셀이 연결되어 있고 (8방향) '라벨' 밴드의 값이 동일하면 픽셀이 객체에 속한 것으로 간주됩니다. 라벨 밴드는 연결성을 식별하는 데만 사용되며 나머지는 리듀서에 입력으로 제공됩니다.
사용 | 반환 값 |
---|
Image.reduceConnectedComponents(reducer, labelBand, maxSize) | 이미지 |
인수 | 유형 | 세부정보 |
---|
다음과 같은 경우: image | 이미지 | 입력 이미지입니다. |
reducer | 감소기 | 연결된 구성요소 내의 픽셀에 적용할 리듀서입니다. |
labelBand | 문자열, 기본값: null | 연결 상태를 감지하는 데 사용할 밴드의 이름입니다. 지정하지 않으면 첫 번째 밴드가 사용됩니다. |
maxSize | 정수, 기본값: 256 | 값을 집계할 때 고려할 이웃의 크기입니다. 객체의 일부가 이웃 범위 밖에 있을 수 있으므로 가로 또는 세로 크기가 maxSize보다 큰 객체는 마스크 처리됩니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\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. |"]]