How do I replicate the error values of OpenCV SGBM on KITTI dataset?

Viewed 197

I've recently been working on the KITTI dataset- specifically the stereo subsection. I tried to replicate the results using the OpenCV SGBM method. I have used all the same parameters as specified on the OpenCV results page in the KITTI website.

http://www.cvlibs.net/datasets/kitti/eval_scene_flow_detail.php?benchmark=stereo&result=67877bd6fcc43163421fa0108c7df83bbc69fea3

Visually the disparity map looks fine and is fairly similar to the result posted on the KITTI-OpenCV evaluation page. But when I try to calculate the error on the training dataset using the ground truth, the error is always at 100%.

The maximum pixel values from the OpenCV SGBM- stereo compute function are coming out to be ~1000 ish with a couple of images(around 5 image pairs) having higher values. I believe that the output returned by the function is of int16 type. I'm computing the error using the evaluation functions given in the devkit and when I read the ground truth(GT) and print out the max values they range upto ~32k . The evaluation function divides the GT and the estimated disparity image by 256 and then computes the absolute difference. If difference is grater than 3 and if the individual error is greater than 5% of the GT value then the pixel is counted as a bad/error pixel and the total error is given as a percentage of such bad pixls to the total pixels. Since the ranges are so different, If I use the above mentioned procedure usually all pixels end up being above the error threshold. So, Do I need to do any scaling of the output from OpenCV SGBM or is there anything that I'm missing while generating disparity/calculating error?

0 Answers
Related