# Reproject3D: Where is exactly the origin of the point cloud?

I am asking which point is the reference point of the Reprojection-Matrix Q or rather the xyz-data. There are to my mind two possible options:

1. The origin of the xyz-data lies in the optical center of the right of the two physical cameras.

2. The origin of the xyz-data lies in the optical center of the right virtual and rectified camera. The right camera with horizontal epipolar lines.

The reason why im asking is, that I have with a baseline of ca. 2 inch a constant negative offset in the z-distances data of nearly 1 inch. I have calculated with stereoRectify with CV_CALIB_ZERO_DISPARITY and alpha =1 the rectification maps. When I look at the rectified images, there is a black edge around them. It looks like the cameras are virtually shifted a little bit backwards, possibly exactly 1 inch. If this assumption that the origin is also shifted was true, I had an explanation for the negative offset, because I have measured the distance to the physical camera for comparison, not the virtual camera.

edit retag close merge delete

At first glance, I would say that the origin of the frame is the left rectified camera as Q is computed from cv::stereoRectify and as far as I know, you can only triangulate only if the two cameras are well vertically aligned, the fronto parallel rectification allows to search directly the correspondences in the rows if I have understood correctly.

( 2016-02-25 08:34:04 -0500 )edit

Thanx for the answer. In my application I swapped the cameras so that the disparity is negative. So the other camera is the reference camera and this is why the origin is in the other camera.

( 2016-02-26 10:46:56 -0500 )edit

Sort by ยป oldest newest most voted

After thinking about it, I assume at the moment, that the origin is the optical center or rather the nodal point of the lens. And the nodal point of the physical and the virtual reference camera lie together. This is why there is in stereoRectify only R1, R2 and no T1, T2 for the virtual camera. The scaling with alpha is then compensated with f in Q. Do you think this is right? An early reply will oblige.

more

Official site

GitHub

Wiki

Documentation

## Stats

Asked: 2016-02-25 05:01:58 -0500

Seen: 415 times

Last updated: Feb 29 '16