公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Image.displacement
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
确定将图像注册到参考图像所需的位移,同时允许局部橡皮膜变形。位移是在参考图像的 CRS 中计算的,其缩放比例由以下三种投影的最低分辨率决定:输入图像投影、参考图像投影和请求的投影。然后,将位移转换为用户指定的投影以供输出。
用法 | 返回 |
---|
Image.displacement(referenceImage, maxOffset, projection, patchWidth, stiffness) | 图片 |
参数 | 类型 | 详细信息 |
---|
此:image | 图片 | 要注册的图片。 |
referenceImage | 图片 | 要注册到的图片。 |
maxOffset | 浮点数 | 尝试对齐输入图片时允许的最大偏移量(以米为单位)。使用较小的值可以显著缩短计算时间,但该值仍必须足够大,才能覆盖整个图像区域内的最大位移。 |
projection | 投影,默认值:null | 用于输出位移值的投影。默认值为参考影像的第一个波段的投影。 |
patchWidth | 浮点数,默认值:null | 用于检测图片偏移的补丁大小(以米为单位)。此值应设置得足够大,以捕获纹理,并且足够大,以使可忽略的对象在补丁中较小。默认值为 null。如果未提供,系统会自动确定补丁大小。 |
stiffness | 浮点数,默认值:5 | 对解强制执行刚度约束。有效值介于 [0,10] 范围内。在确定相邻网格点处的位移时,刚度用于离群值拒绝。值越高,解决方案越接近刚性转换。值越低,在配准期间允许的图像变形或扭曲程度就越大。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThis method calculates the displacements needed to align an image with a reference image, allowing for localized, flexible deformations.\u003c/p\u003e\n"],["\u003cp\u003eDisplacements are determined in the reference image's coordinate system and at a resolution based on the input, reference, and requested projections.\u003c/p\u003e\n"],["\u003cp\u003eUsers can specify a maximum offset for alignment, a projection for outputting displacements, a patch size for offset detection, and a stiffness parameter to control deformation.\u003c/p\u003e\n"],["\u003cp\u003eThe output is an image containing the calculated displacement values, which can be used to warp or transform the input image to match the reference image.\u003c/p\u003e\n"],["\u003cp\u003eUsing a smaller \u003ccode\u003emaxOffset\u003c/code\u003e value can speed up computation but must be sufficient to cover the largest displacement within the image.\u003c/p\u003e\n"]]],[],null,["# ee.Image.displacement\n\nDetermines displacements required to register an image to a reference image while allowing local, rubber sheet deformations. Displacements are computed in the CRS of the reference image, at a scale dictated by the lowest resolution of the following three projections: input image projection, reference image projection, and requested projection. The displacements are then transformed into the user-specified projection for output.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|--------------------------------------------------------------------------------------------------|---------|\n| Image.displacement`(referenceImage, maxOffset, `*projection* `, `*patchWidth* `, `*stiffness*`)` | Image |\n\n| Argument | Type | Details |\n|------------------|---------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `image` | Image | The image to register. |\n| `referenceImage` | Image | The image to register to. |\n| `maxOffset` | Float | The maximum offset allowed when attempting to align the input images, in meters. Using a smaller value can reduce computation time significantly, but it must still be large enough to cover the greatest displacement within the entire image region. |\n| `projection` | Projection, default: null | The projection in which to output displacement values. The default is the projection of the first band of the reference image. |\n| `patchWidth` | Float, default: null | Patch size for detecting image offsets, in meters. This should be set large enough to capture texture, as well as large enough that ignorable objects are small within the patch. Default is null. Patch size will be determined automatically if not provided. |\n| `stiffness` | Float, default: 5 | Enforces a stiffness constraint on the solution. Valid values are in the range \\[0,10\\]. The stiffness is used for outlier rejection when determining displacements at adjacent grid points. Higher values move the solution towards a rigid transformation. Lower values allow more distortion or warping of the image during registration. |"]]