公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Image.focalMax
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
使用命名或自定义内核对图片的每个波段应用形态学缩减器() 过滤条件。
用法 | 返回 |
---|
Image.focalMax(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 reducer, such as focalMax, to an image to alter pixel values based on neighboring pixels within a specified kernel.\u003c/p\u003e\n"],["\u003cp\u003eOffers flexibility in kernel selection with predefined shapes like circle, square, cross, plus, octagon, and diamond or allows custom kernels.\u003c/p\u003e\n"],["\u003cp\u003eUsers can control the kernel size using radius and specify whether the unit is in pixels or meters.\u003c/p\u003e\n"],["\u003cp\u003eEnables iterative application of the kernel for intensified effects using the iterations parameter.\u003c/p\u003e\n"],["\u003cp\u003eModifies each band of the input image independently, returning a new image with the transformed values.\u003c/p\u003e\n"]]],["The `focalMax()` function applies a morphological reducer filter to each image band. It utilizes either a predefined kernel type (circle, square, cross, plus, octagon, diamond) or a user-defined custom kernel. The operation is applied iteratively, with the number of iterations specifiable. The kernel's size is determined by the `radius` parameter (in pixels or meters) or by the dimensions of the custom kernel. The method returns the processed image.\n"],null,["# ee.Image.focalMax\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.focalMax`(`*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. |"]]