# 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:

The origin of the xyz-data lies in the optical center of the right of the two

**physical**cameras.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.

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.

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.