公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Image.focalMean
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
使用命名或自定义内核对图像的每个波段应用形态学平均值滤波器。
用法 | 返回 |
---|
Image.focalMean(radius, kernelType, units, iterations, kernel) | 图片 |
参数 | 类型 | 详细信息 |
---|
此:image | 图片 | 要对其应用操作的图片。 |
radius | 浮点数,默认值:1.5 | 要使用的内核的半径。 |
kernelType | 字符串,默认值:“circle” | 要使用的内核类型。选项包括:'circle'、'square'、'cross'、'plus'、'octagon' 和 'diamond'。 |
units | 字符串,默认值:“pixels” | 如果未指定内核,此参数用于确定内核的单位是米还是像素。 |
iterations | 整数,默认值:1 | 应用给定内核的次数。 |
kernel | 内核,默认值:null | 自定义内核。如果使用,则忽略 kernelType 和 radius。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eApplies a morphological mean filter to each band of an image.\u003c/p\u003e\n"],["\u003cp\u003eOffers various kernel types including circle, square, cross, plus, octagon, and diamond or a custom kernel.\u003c/p\u003e\n"],["\u003cp\u003eAllows control over kernel radius, units (pixels or meters), and number of iterations the filter is applied.\u003c/p\u003e\n"],["\u003cp\u003eUses a default circular kernel with a radius of 1.5 pixels when no specific kernel is defined.\u003c/p\u003e\n"]]],[],null,["# ee.Image.focalMean\n\nApplies a morphological mean filter to each band of an image using a named or custom kernel.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|------------------------------------------------------------------------------------------|---------|\n| Image.focalMean`(`*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. |"]]