公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Image.neighborhoodToBands
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
将像素的邻域转换为一组波段。邻域使用内核指定,并且仅使用非零权重内核值。否则,系统会忽略内核的权重。
每个输入频段都会生成 x * y 个输出频段。每个输出频段都命名为“input_x_y”,其中 x 和 y 表示像素在内核中的位置。例如,对双波段图像运行的 3x3 内核会生成 18 个输出波段。
用法 | 返回 |
---|
Image.neighborhoodToBands(kernel) | 图片 |
参数 | 类型 | 详细信息 |
---|
此:image | 图片 | 要从中获取像素的图片。 |
kernel | 内核 | 指定邻域的内核。系统会忽略零权重值。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):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. |"]]