ee.Algorithms.CrossCorrelation
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Cung cấp thông tin về chất lượng đăng ký hình ảnh giữa hai hình ảnh được đăng ký cùng nhau (về mặt lý thuyết). Đầu vào là hai hình ảnh có cùng số lượng dải tần. Hàm này xuất ra một hình ảnh bao gồm 4 dải thông tin. Ba giá trị đầu tiên là khoảng cách: deltaX, deltaY và khoảng cách Euclid cho mỗi pixel trong imageA đến pixel có hệ số tương quan tương ứng cao nhất trong imageB. Dải thứ tư là giá trị của hệ số tương quan cho pixel đó [-1 : +1].
Cách sử dụng | Giá trị trả về |
---|
ee.Algorithms.CrossCorrelation(imageA, imageB, maxGap, windowSize, maxMaskedFrac) | Hình ảnh |
Đối số | Loại | Thông tin chi tiết |
---|
imageA | Hình ảnh | Hình ảnh đầu tiên, có N dải tần. |
imageB | Hình ảnh | Hình ảnh thứ hai phải có cùng số lượng dải tần như imageA. |
maxGap | Số nguyên | Khoảng cách lớn nhất mà một pixel có thể dịch chuyển theo hướng X hoặc Y. |
windowSize | Số nguyên | Kích thước của cửa sổ cần so sánh. |
maxMaskedFrac | Độ chính xác đơn, mặc định: 0 | Phân số tối đa của các pixel trong cửa sổ tương quan được phép che. Thử nghiệm này được áp dụng tại mỗi vị trí chênh lệch trong vùng tìm kiếm. Đối với mỗi độ lệch, các mảng hình ảnh chồng chéo sẽ được so sánh và tính toán điểm tương quan. Một pixel trong các mảng chồng chéo này được coi là bị che nếu một trong hai mảng bị che tại đó. Nếu kiểm thử không thành công ở bất kỳ vị trí nào trong vùng tìm kiếm, thì pixel đầu ra mà hệ thống đang tính toán mối tương quan sẽ được coi là không hợp lệ và sẽ bị che. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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. |"]]