1
$\begingroup$

I'm learning about the disparity calculations and want to calculate the distance for a known pixel. I have calibrated and rectified images already. Now I just want to calculate Z for some pixel x,y.
enter image description here

the opencv tutorial says: "The depth of a point in a scene is inversely proportional to the difference in distance of corresponding image points and their camera centers. " According to this paper https://www.ri.cmu.edu/pub_files/pub2/willson_reg_1993_1/willson_reg_1993_1.pdf there are a lot of different camera centers. What kind of camera center should I use?

Should I use the principal point Cx,Cy from the camera matrix? That doesn't quite make sense since they differ between cameras. If I just use the Center of the frame in pixels, it doesn't take into account projection center. I'm lost in all these centers. Tutorial makes it look so easy. Anyone has practical experience with the topic? Also my cameras have different focal values. Which one do I use?

PS>also why does the right arrow, next to x' points to the right, as if suggesting that it takes the distance from the left camera center.

$\endgroup$
1
  • 1
    $\begingroup$ Given that this is a question about opencv, it might be better asked on Computer Graphics. $\endgroup$
    – Pseudonym
    Apr 28 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.