nasa-jpl / autoRIFT

A Python module of a fast and intelligent algorithm for finding the pixel displacement between two images
Apache License 2.0
213 stars 52 forks source link

Correlation coefficient as an output from autoRIFT + destriping #43

Closed arimue closed 2 years ago

arimue commented 2 years ago

Hi all,

I am attempting to use autoRIFT for offset tracking across a slow-moving landslide using optical satellite imagery. autoRIFT is running fine, however, I get a lot of unnaturally high offsets in high-relief areas which I assume are caused by shadow effects and are only partially removed by the NDC filter. Here is an example from correlating two SPOT-5 scenes: Offset_example

I have thus been thinking about alternative ways to filter the estimated pixel displacement and was wondering if it would be possible to retrieve the correlation coefficient for every matched template as an output from autoRIFT to assess how reliable each match is?

Another problem that occurs when I use Landsat 5 imagery as an input is that I get a regular stripe pattern in the offset imagery, especially for the horizontal pixel displacement. Offset_example2

Have you had similar experiences or perhaps any suggestions on how to deal with this in autoRIFT? I have attempted to destripe the output by subtracting the mean in the line direction of the image, similar to what was described by Scherler et al. (2008) (doi:10.1016/j.rse.2008.05.018), but I wonder if there is a different way to approach this.

alex-s-gardner commented 2 years ago

Hi @arimue arimue

Glad you've got autoRIFT up and running and are finding it useful and thanks a ton for posting the figures... that helps a ton with diagnosing issues.So to your questions:

  1. It looks to me like the two images that you are correlating have some orthorectification issues... you can clearly see residual parallax in the offset map... if you plotted the offset as a function of slope and aspect (https://tc.copernicus.org/articles/5/271/2011/) you'll probably see a strong relation. Improved filtering will not help. Also the patterns of offset are very coherent in space which tells me that the offsets are real, not spurious.

  2. The striping is due to banding in the input imagery... for glaciers is handled this issue using and fft decomposition and removing power in the along-track direction then reconstructing the image but we have not yet implimented this in autoRIFT (on the to-do list). A simple fix might be simply to test alternate image bands.

Hope that helps.

Alex

arimue commented 2 years ago

Thank you so much for all the suggestions, @alex-s-gardner. I will take another look at orthorectification. However, would it generally be possible to get the correlation coefficient as an output from autoRIFT, or do you just not think that it would be a good filter criterion?

alex-s-gardner commented 2 years ago

@arimue using correlation coefficient is a totally logical thing to suggest. We played around with using the correlation coefficient as a filter quite a bit in the early days but found that the NDC filter was far superior and including information on the correlation coefficient had little added value. For this reason we decided not to export the correlation coefficient. The CC is buried deep in the code (CPP implementation of the NCC kernel) so it would take considerable work to pass this back to the user.

arimue commented 2 years ago

Alright, good to know. I will stick to the NDC filter then and close this issue. Thanks again @alex-s-gardner