-2

I have made a camera calibration and I have obtained the matices: Here the intrinsic:

<?xml version="1.0"?>
<opencv_storage>
<Intrinsics type_id="opencv-matrix">
  <rows>3</rows>
  <cols>3</cols>
  <dt>f</dt>
  <data>
    6.59121826e+002 0. 2.09667786e+002 0. 6.98561340e+002
    1.49071167e+002 0. 0. 1.</data></Intrinsics>
</opencv_storage>

And here the distortion one:

<?xml version="1.0"?>
<opencv_storage>
<Distortion type_id="opencv-matrix">
  <rows>4</rows>
  <cols>1</cols>
  <dt>f</dt>
  <data>
    1.11172847e-001 -1.00810878e-001 -1.00857615e-001 -8.45640600e-002</data></Distortion>
</opencv_storage>

After such a process, I am supposed to find for a point A(u,v) in image plane its coordination in my cartesian referee R(X,Y,Z).

Note: The Z axis is parallel to optical axis, X axis is also parallel to u axis and so on for Y and v.

I followed this online turorial but I couldn't compute X, Y and Z.

Any help. Thanks in advance.

Houssam Badri
  • 2,441
  • 3
  • 29
  • 60

1 Answers1

1

If intrinsic matrix is K and distortion operator is D, then for a given point A(u,v), the corresponding point in space will be (X,Y,Z)^T = t * D^-1 * K^-1 * (u,v,1)^T, where t > 0 is an arbitrary real number. It is assumed that camera center is located in the origin.

fdermishin
  • 3,519
  • 3
  • 24
  • 45
  • Thanks, do you mean by D the only vector I mentioned? My camera center is not in the origin but I should make referees transformation after computing. – Houssam Badri Mar 16 '13 at 12:11
  • If the vector k (you mentioned) is distortion coefficients used in OpenCV, then `D^-1 * (x,y,1)^T = (x*(1 + k1*(x^2+y^2) + k2*(x^2+y^2)^2, y*(1 + k1*(x^2+y^2) + k2*(x^2+y^2)^2, 1)` (only radial distortion is corrected here). See this page for more information: http://docs.opencv.org/doc/tutorials/calib3d/camera_calibration/camera_calibration.html – fdermishin Mar 16 '13 at 13:19