I want to get the real distance from the subject from the stereo camera. I am using the OpenCV sample code as described in Learning OpenCV O'Reilly. After receiving the non-conformance map, I want to use the formula:
distance = focal_length * base distance / mismatch
The problem is this:
I get negative values of inequalities. How to convert these values so that they can be used in calculating the actual depth?
In the above formula, the focal length and base distance are in mm (returned by the repeat matrix), while the difference will be in pixels. Thus, the result will be in mm ^ 2 / pixel. How to convert inequality value from pixel to mm.
source
share