公告:凡是在
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 | 相關視窗內可遮蓋的像素比例上限。這項測試會套用至搜尋區域內的每個偏移位置。系統會比較每個偏移的重疊圖像修補程式,並計算相關分數。如果其中一個修補區域遮蓋了重疊區域內的像素,該像素就會視為遮蓋。如果搜尋區域中的任何單一位置測試失敗,系統會將計算相關性的輸出像素視為無效,並遮蓋該像素。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間: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. |"]]