Erroor on image correlation

49 views
Skip to first unread message

diego.cus...@gmail.com

unread,
Jul 18, 2022, 12:28:17 PM7/18/22
to Ames Stereo Pipeline Support
Hi Oleg, I hope everything is ok from you side.

I am using ASP to perform image correlation for surface displacements analysis wit hthe recent developpments ('--correlator-mode'). Below an exemple of the used command:

parallel_stereo --correlator-mode 20030715.tif 20130814.tif run_mgm7_xc10/run --threads-multiprocess 6 --processes 1 --stereo-algorithm 2 --corr-kernel 7 7 --xcorr-threshold 10 --corr-tile-size 2048 --corr-memory-limit-mb 8000 --save-left-right-disparity-difference

However, when I changed the kernel size to 15x15 or 21x21, I got the following error:
```
Stereo file ./stereo.default could not be found. Will use default settings and command line options only.
num_stereo_pairs,1
Using session: rpc
For this kernel size, use --cost-mode 2, 1, or 0, with 2 preferred.

None
Traceback (most recent call last):
  File "/home/cusicand/ASP_install/StereoPipeline-3.1.0-2022-05-18-x86_64-Linux/libexec/parallel_stereo", line 815, in <module>
    settings = run_and_parse_output("stereo_parse", args, sep, opt.verbose)
  File "/home/cusicand/ASP_install/StereoPipeline-3.1.0-2022-05-18-x86_64-Linux/libexec/asp_system_utils.py", line 294, in run_and_parse_output
    raise Exception('Failed executing: ' + " ".join(call))
Exception: Failed executing: /home/cusicand/ASP_install/StereoPipeline-3.1.0-2022-05-18-x86_64-Linux/libexec/stereo_parse --correlator-mode 20030715.tif 20130814.tif run_mgm15_xc10/run --stereo-algorithm 2 --corr-kernel 15 15 --xcorr-threshold 10 --corr-tile-size 2048 --corr-memory-limit-mb 8000 --save-left-right-disparity-difference --corr-seed-mode 1
```
I verified the stereo.default for "shifted text" as mentioned in this previous discussion, but everything seems to be OK.

Thank you very much for your help.
Best regards
Diego

diego.cus...@gmail.com

unread,
Jul 18, 2022, 12:36:12 PM7/18/22
to Ames Stereo Pipeline Support
Hello again, I want just to confirm that the algorithm even works with 9x9 corr-kernel. But, since the number is two digits long, it fails....

Thanks a lot
Diego

Oleg Alexandrov

unread,
Jul 18, 2022, 12:57:11 PM7/18/22
to diego.cus...@gmail.com, Ames Stereo Pipeline Support
Hello Diego,

The reason for that is that is because ASP's --stereo-algorithm 2, which is the MGM algorithm, does not support kernels size beyond 9 with its default cost mode, which is 4. The MGM and SGM algorithms were developed primarily for small kernels, to ensure higher resolution of the resulting DEM. So, if you want to use higher kernels, you will have to switch to --stereo-algorithm 0 (that is, --stereo-algorithm asp_bm), which is the old block-matching, or otherwise switch --cost-mode to some other value, such as 2. There is more info on these here: https://stereopipeline.readthedocs.io/en/latest/stereodefault.html

Normally I think the MGM algorithm should not give better results with higher kernel, so while that restriction could be removed, it is likely not a high priority for us.

Now, we do have another implementation of MGM, the one by the original author. That one is slow, and requires --alignment-method local_epipolar, so it won't work with --correlator-mode, but if you are in experimentation mode, it could be tried. It may support bigger kernels. There's more info here: https://stereopipeline.readthedocs.io/en/latest/stereo_algorithms.html#original-implementation-of-mgm



--
You received this message because you are subscribed to the Google Groups "Ames Stereo Pipeline Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ames-stereo-pipeline...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ames-stereo-pipeline-support/47af6a74-7a12-462a-b0f8-cdafec53351dn%40googlegroups.com.

Cusicanqui Diego

unread,
Jul 19, 2022, 10:27:51 AM7/19/22
to Oleg Alexandrov, Ames Stereo Pipeline Support

Thank you for your quick reply Oleg.

OK, It very important to know as maximum kernel values are not indicated in the documentation.
I have also tried with `asp_bm` algorithm with --cost-mode 2, but the results are very noisy. However, the images are not in the best quality.

I am currently testing several configurations. Once i have some results, i could share with you if you are interested.

Best
Diego

Oleg Alexandrov

unread,
Jul 19, 2022, 12:12:59 PM7/19/22
to Cusicanqui Diego, Ames Stereo Pipeline Support
I added a clarification in the doc that the kernel size is at most 9 x 9 for MGM. (It will make it to the online doc in a bit.)

Happy to hear what results you find. 
Reply all
Reply to author
Forward
0 new messages