公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ee.Image.neighborhoodToBands
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
將像素的鄰域轉換為一組波段。鄰域是使用 Kernel 指定,且只會使用非零權重的 Kernel 值。否則會忽略核心的權重。
每個輸入頻帶都會產生 x * y 個輸出頻帶。每個輸出頻帶都會命名為「input_x_y」,其中 x 和 y 代表核心中的像素位置。舉例來說,對 2 個頻帶的圖片執行 3x3 核心作業,會產生 18 個輸出頻帶。
用量 | 傳回 |
---|
Image.neighborhoodToBands(kernel) | 圖片 |
引數 | 類型 | 詳細資料 |
---|
這個:image | 圖片 | 要從中取得像素的圖片。 |
kernel | 核心 | 指定鄰域的 Kernel。系統會忽略權重為零的值。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eTransforms image pixels by considering their neighboring pixels defined by a kernel.\u003c/p\u003e\n"],["\u003cp\u003eGenerates multiple output bands for each input band, representing the pixel values within the kernel's neighborhood.\u003c/p\u003e\n"],["\u003cp\u003eThe output bands are named based on the input band and the pixel's position in the kernel.\u003c/p\u003e\n"],["\u003cp\u003eKernel weights are only used to define the neighborhood, their actual values are not used in the calculation.\u003c/p\u003e\n"]]],[],null,["# ee.Image.neighborhoodToBands\n\nTurns the neighborhood of a pixel into a set of bands. The neighborhood is specified using a Kernel and only non-zero-weight kernel values are used. The weights of the kernel is otherwise ignored.\n\n\u003cbr /\u003e\n\nEach input band produces x \\* y output bands. Each output band is named 'input_x_y' where x and y indicate the pixel's location in the kernel. For example, a 3x3 kernel operating on a 2-band image produces 18 output bands.\n\n| Usage | Returns |\n|-------------------------------------|---------|\n| Image.neighborhoodToBands`(kernel)` | Image |\n\n| Argument | Type | Details |\n|---------------|--------|-------------------------------------------------------------------------|\n| this: `image` | Image | The image to get pixels from. |\n| `kernel` | Kernel | The kernel specifying the neighborhood. Zero-weight values are ignored. |"]]