Configure StereoSGBM for Disparity map on Android
What are the best values? I tried different values to StereoSGBM. For instance, I tried several values:
private StereoSGBM stsgbm = new StereoSGBM();//0, 32, 3, 128, 256, 20, 16, 1, 100, 20, true); //private StereoSGBM stsgbm = new StereoSGBM(0, 64, 5, 128, 256, 200, 16, 1, 100, 20, true); //private StereoSGBM stsgbm = new StereoSGBM(-39, 112, 9, 128, 256, 1, 61, 0, 0, 8, true); //private StereoSGBM stsgbm = new StereoSGBM(-64, 192, 5, 600, 2400, 10, 4, 1, 150, 2, false);
But neither worked good. The default calculator worked a lot of time and I kicked the process. Other values gave bad results:! input image 1 input image 2 out disparity
How to get good values?
The best way to understand what values you should be passing for arguments is to read the paper.
Accurate and Efficient Stereo Processing by Semi-Global Matching and Mutual Information by Heiko Hirschmuller
http://www.dlr.de/Rm/En/Portaldata/3/Resources/Papers/Modeler/Cvpr05hh.Pdf