Jackie-Chou / MC-CNN-python

a python implementation of MC-CNN
MIT License
47 stars 19 forks source link

the range of disparity is wrong #5

Open Archerwz opened 4 years ago

Archerwz commented 4 years ago

In your code, you seem to set the range of disparity from 0 to ndisp-1, which is convenient when using it as indices and have no problem. However, the real disparity should be from 1 to ndisp, because the disparity shouldn't be zero. For instance, when you start looping from d = 0, the corresponding point for the left image point (h,w) should be point (h,w-1) from right image, while in your code you write (h,w-d) which is (h,w), and I think it is incorrect.

Also, from the interpolation function, your output is also the indices along the disp dimension, you return the indices d which has the smallest cost, but it should be the real disparity value but not indices.

hurricane2018 commented 4 years ago

Could you share your code here ? @Archerwz