스칼라 이미지의 각 픽셀의 이웃을 2D 배열로 변환합니다. 출력 배열의 축 0과 1은 각각 이미지의 Y축과 X축에 해당합니다. 출력 이미지에는 입력과 동일한 수의 밴드가 있으며 각 출력 밴드에는 해당 입력 밴드와 동일한 마스크가 있습니다. 입력 이미지의 설치 공간과 메타데이터가 보존됩니다.
사용
반환 값
Image.neighborhoodToArray(kernel, defaultValue)
이미지
인수
유형
세부정보
다음과 같은 경우: image
이미지
픽셀을 가져올 이미지입니다. 스칼라 값이어야 합니다.
kernel
커널
이웃의 모양을 지정하는 커널입니다. 고정된 정사각형 및 직사각형 커널만 지원됩니다. 가중치는 무시되고 커널의 모양만 사용됩니다.
defaultValue
부동 소수점 수, 기본값: 0
출력 배열에서 입력의 잘못된 (마스크 처리된) 픽셀을 대체하는 데 사용할 값입니다. 대역 유형이 정수인 경우 이 값의 소수 부분이 삭제됩니다. 모든 경우에 값이 대역의 값 범위로 제한됩니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-26(UTC)"],[],["Transforms a scalar image by converting each pixel's neighborhood into a 2D array. The output array's axes 0 and 1 correspond to the image's Y and X axes, respectively. The method uses a `kernel` to define the neighborhood's shape (fixed, square, or rectangle). Invalid pixels within the input are replaced using a `defaultValue`. The input image's footprint, metadata, and mask are retained, but kernel weights are not considered. The method returns a new `Image`.\n"]]