公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ee.Image.focalMedian
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
使用具名或自訂核心,將形態縮減器() 篩選器套用至圖片的每個頻帶。
用量 | 傳回 |
---|
Image.focalMedian(radius, kernelType, units, iterations, kernel) | 圖片 |
引數 | 類型 | 詳細資料 |
---|
這個:image | 圖片 | 要套用作業的圖片。 |
radius | 浮點數,預設值為 1.5 | 要使用的核心半徑。 |
kernelType | 字串,預設值為「circle」 | 要使用的核心類型。選項包括:圓形、正方形、十字、加號、八邊形和菱形。 |
units | 字串,預設值為「pixels」 | 如果未指定核心,這會決定核心是以公尺還是像素為單位。 |
iterations | 整數,預設值為 1 | 套用指定核心的次數。 |
kernel | 核心,預設值:null | 自訂核心。如果使用,系統會忽略 kernelType 和 radius。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eApplies a morphological reducer filter to each band of an image using a kernel.\u003c/p\u003e\n"],["\u003cp\u003eOffers options for kernel type including circle, square, cross, plus, octagon, and diamond, or allows for a custom kernel.\u003c/p\u003e\n"],["\u003cp\u003eThe radius of the kernel, units (pixels or meters), and number of iterations can be specified.\u003c/p\u003e\n"],["\u003cp\u003eThe filter is applied using the \u003ccode\u003efocalMedian()\u003c/code\u003e function, accepting arguments for radius, kernel type, units, iterations, and a custom kernel if desired.\u003c/p\u003e\n"]]],[],null,["# ee.Image.focalMedian\n\nApplies a morphological reducer() filter to each band of an image using a named or custom kernel.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|--------------------------------------------------------------------------------------------|---------|\n| Image.focalMedian`(`*radius* `, `*kernelType* `, `*units* `, `*iterations* `, `*kernel*`)` | Image |\n\n| Argument | Type | Details |\n|---------------|---------------------------|------------------------------------------------------------------------------------------------------------|\n| this: `image` | Image | The image to which to apply the operations. |\n| `radius` | Float, default: 1.5 | The radius of the kernel to use. |\n| `kernelType` | String, default: \"circle\" | The type of kernel to use. Options include: 'circle', 'square', 'cross', 'plus', 'octagon', and 'diamond'. |\n| `units` | String, default: \"pixels\" | If a kernel is not specified, this determines whether the kernel is in meters or pixels. |\n| `iterations` | Integer, default: 1 | The number of times to apply the given kernel. |\n| `kernel` | Kernel, default: null | A custom kernel. If used, kernelType and radius are ignored. |"]]