ee.Algorithms.CrossCorrelation
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Podaje informacje o jakości rejestracji obrazu między 2 (teoretycznie) zarejestrowanymi obrazami. Dane wejściowe to 2 obrazy z tą samą liczbą pasm. Ta funkcja generuje obraz składający się z 4 pasm informacji. Pierwsze 3 wartości to odległości: deltaX, deltaY i odległość euklidesowa dla każdego piksela na obrazie A do piksela, który ma najwyższy odpowiedni współczynnik korelacji na obrazie B. Czwarty pas to wartość współczynnika korelacji dla danego piksela [-1 : +1].
Wykorzystanie | Zwroty |
---|
ee.Algorithms.CrossCorrelation(imageA, imageB, maxGap, windowSize, maxMaskedFrac) | Obraz |
Argument | Typ | Szczegóły |
---|
imageA | Obraz | Pierwszy obraz z N pasmami. |
imageB | Obraz | Drugi obraz musi mieć taką samą liczbę pasm jak obrazA. |
maxGap | Liczba całkowita | Największa odległość, o jaką piksel może się przesunąć w osi X lub Y. |
windowSize | Liczba całkowita | Rozmiar okna do porównania. |
maxMaskedFrac | Liczba zmiennoprzecinkowa, domyślnie: 0 | Maksymalny ułamek pikseli w oknie korelacji, które mogą być zamaskowane. Test ten jest przeprowadzany w każdej lokalizacji przesunięcia w regionie wyszukiwania. Dla każdego przesunięcia porównywane są nakładające się fragmenty obrazu i obliczany jest wynik korelacji. Piksel w tych nakładających się fragmentach jest uznawany za zamaskowany, jeśli w tym miejscu jest zamaskowany którykolwiek z tych fragmentów. Jeśli test zakończy się niepowodzeniem w dowolnej lokalizacji w regionie wyszukiwania, piksel wyjściowy, dla którego obliczana jest korelacja, zostanie uznany za nieprawidłowy i zamaskowany. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["\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. |"]]