Closed oleg-alexandrov closed 10 months ago
It is only the census cost modes that are restricted, you can use larger kernels with the other cost modes such as normalized cross correlation.
It would be nice when the census cost mode throws an error to suggest the user which switch with which value to use to avoid this limitation, so the user can still use MGM with a larger kernel (which may be needed if the images have poor quality or if MGM shows diagonal artifacts).
It would be nice if this restriction is lifted, though that would be more work.
SGM/MGM with a correlation kernel from 3 to 9 works adequately enough. The opencv_sgbm algorithm allows a larger kernel size. The msmw algorithm also allows control of this, as does the original mgm that ASP ships (https://stereopipeline.readthedocs.io/en/latest/stereo_algorithms.html).
SGM/MGM was designed to work with a small correlation window, yet a bigger one may be useful for very noisy images or at least for experimentation. Currently, only kernels of size 3-9 are supported, and it would be nice if bigger numbers would work too.