In my stereo-rectified camera pair (not physical, but two positions of the same camera), when I project some 3D points in both images to find a rough disparity range, I often get a range that goes from negative to positive (e.g. -11, 24). I have no problem with ranges like (-22, -10) or (10, 15).

Is that kind of range even possible? When I do stereo matching how should I treat negative values? And what about the depth calculated from that disparity that can have negative values (and possibly areas with lowest cost at 0 disparity)?


2 Answers 2


It was the way I was setting principal points during rectification, to center the images back for the warping. If I have same principal points in both cameras I only get positive disparities, as expected. If cameras are parallel, it is not possible to have both negative and positive disparities. That only happens with converging stereo cameras (negative disparities for objects in front of point of convergence and positive for objects in the back).


Yes, it is possible. It often happens when you do uncalibrated stereo rectification. To calculate the depth, you would have to add the minimum disparity value to you disparity map, to shift the range so that it starts with 0.

  • $\begingroup$ In my case I would call it calibrated for the fact I use the pose from SLAM to rectify. I understand that you can shift the range, but what is the meaning in geometrical terms of having both negative and positive disparities with two parallel cameras? If I shift the range will it affect my baseline? $\endgroup$ Sep 13, 2015 at 20:26
  • $\begingroup$ I mean with a static scene if you move a camera horizontally to the right without any rotation, wouldn't all the points in the camera move to the left? $\endgroup$ Sep 13, 2015 at 20:38
  • $\begingroup$ Are you actually using the calibrated rectification algorithm? $\endgroup$
    – Dima
    Sep 13, 2015 at 20:43
  • $\begingroup$ I am currently using the algorithm from Fusiello et al. $\endgroup$ Sep 13, 2015 at 20:43
  • $\begingroup$ My rectified cameras projection matrices have same rotation component, same translation on y and z, different x translation. Also focal lengths are the same, but principal points are different on the x (I use that to center the rectified images). Might be the principal points difference? $\endgroup$ Sep 13, 2015 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.