公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Algorithms.CrossCorrelation
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
提供有关两个(理论上)共同注册的图像之间图像配准质量的信息。输入是两个具有相同波段数的图像。此函数会输出由四个信息波段组成的图像。前三个是距离:deltaX、deltaY 以及 imageA 中每个像素与 imageB 中具有最高相应相关系数的像素之间的欧氏距离。第四个波段是相应像素的相关系数值 [-1 : +1]。
用法 | 返回 |
---|
ee.Algorithms.CrossCorrelation(imageA, imageB, maxGap, windowSize, maxMaskedFrac) | 图片 |
参数 | 类型 | 详细信息 |
---|
imageA | 图片 | 第一张图片,包含 N 个波段。 |
imageB | 图片 | 第二张图片,必须具有与 imageA 相同的波段数。 |
maxGap | 整数 | 像素在 X 或 Y 方向上可能移动的最大距离。 |
windowSize | 整数 | 要比较的窗口的大小。 |
maxMaskedFrac | 浮点数,默认值:0 | 相关性窗口内允许被遮盖的像素的最大比例。此测试在搜索区域内的每个偏移位置进行。对于每个偏移量,系统会比较重叠的图片块并计算相关性得分。如果重叠的这两个补丁中有一个在某个像素处被遮盖,则该像素会被视为被遮盖。如果测试在搜索区域中的任何单个位置失败,则计算相关性的输出像素将被视为无效,并将被遮盖。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eDetermines the image registration quality between two images with the same number of bands by calculating pixel displacement and correlation.\u003c/p\u003e\n"],["\u003cp\u003eOutputs a four-band image representing deltaX, deltaY, Euclidean distance, and correlation coefficient for each pixel.\u003c/p\u003e\n"],["\u003cp\u003eUsers can define the maximum pixel shift (\u003ccode\u003emaxGap\u003c/code\u003e), comparison window size (\u003ccode\u003ewindowSize\u003c/code\u003e), and the allowed fraction of masked pixels (\u003ccode\u003emaxMaskedFrac\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThe algorithm identifies the pixel in the second image with the highest correlation to the corresponding pixel in the first image.\u003c/p\u003e\n"],["\u003cp\u003eInvalid pixels are masked if the maximum allowed fraction of masked pixels is exceeded during correlation calculations.\u003c/p\u003e\n"]]],[],null,["# ee.Algorithms.CrossCorrelation\n\nGives information on the quality of image registration between two (theoretically) co-registered images. The input is two images with the same number of bands. This function outputs an image composed of four bands of information. The first three are distances: the deltaX, deltaY, and the Euclidean distance for each pixel in imageA to the pixel which has the highest corresponding correlation coefficient in imageB. The fourth band is the value of the correlation coefficient for that pixel \\[-1 : +1\\].\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------------------------------------------------------------------------|---------|\n| `ee.Algorithms.CrossCorrelation(imageA, imageB, maxGap, windowSize, `*maxMaskedFrac*`)` | Image |\n\n| Argument | Type | Details |\n|-----------------|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `imageA` | Image | First image, with N bands. |\n| `imageB` | Image | Second image, must have the same number of bands as imageA. |\n| `maxGap` | Integer | The greatest distance a pixel may shift in either X or Y. |\n| `windowSize` | Integer | Size of the window to be compared. |\n| `maxMaskedFrac` | Float, default: 0 | The maximum fraction of pixels within the correlation window that are allowed to be masked. This test is applied at each offset location within the search region. For each offset, the overlapping image patches are compared and a correlation score computed. A pixel within these overlapping patches is considered masked if either of the patches is masked there. If the test fails at any single location in the search region, the output pixel for which the correlation is being computed is considered invalid, and will be masked. |"]]