title: How to get the distance of the object and How to use camera calibration matrix correctly?
body: <p>I succesfully calibrate my camera using opencv. The camera lens i am using. 
  <a href="https://www.baslerweb.com/en/products/vision-components/lenses/basler-lens-c125-0418-5m-f1-8-f4mm/" rel="nofollow noreferrer">https://www.baslerweb.com/en/products/vision-components/lenses/basler-lens-c125-0418-5m-f1-8-f4mm/</a></p>
  
  <p>The internal and external camera parameter is given below.</p>
  
  <pre><code>cv::Mat cameraMatrix(3, 3, cv::DataType&lt;double&gt;::type);
      cameraMatrix.at&lt;double&gt;(0) = 1782.80;//fx //432.2 in mm
      cameraMatrix.at&lt;double&gt;(1) = 0;
      cameraMatrix.at&lt;double&gt;(2) = 3.0587694283633488e+002;//cx
      cameraMatrix.at&lt;double&gt;(3) = 0;
      cameraMatrix.at&lt;double&gt;(4) = 1782.80;//fy
      cameraMatrix.at&lt;double&gt;(5) = 3.0535864258476721e+002;//cy
      cameraMatrix.at&lt;double&gt;(6) = 0;
      cameraMatrix.at&lt;double&gt;(7) = 0;
      cameraMatrix.at&lt;double&gt;(8) = 1;
  
  
      cv::Mat disCoeffs(1, 5, cv::DataType&lt;double&gt;::type);
      disCoeffs.at&lt;double&gt;(0) = -8.1752937039996709e-001;//k1
      disCoeffs.at&lt;double&gt;(1) = -2.5660653367749450e+001;//k2
      disCoeffs.at&lt;double&gt;(2) = -1.5556922931812768e-002;//p1
      disCoeffs.at&lt;double&gt;(3) = -4.4021541217208054e-002;//p2
      disCoeffs.at&lt;double&gt;(4) = 1.5042036073609015e+002;//k3
  </code></pre>
  
  <p>I know this formula is used to calculate the distance of the object. But i am very confuse how to proper use it. </p>
  
  <p><a href="https://i.stack.imgur.com/CXzwb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CXzwb.png" alt="enter image description here"></a></p>
  
  <p>Resolution of my camera is 640x480.</p>
  
  <p>focal length = 1782.80 (px) do not know how to correctly convert to mm</p>
  
  <p>i know focal length is distance from sensor to image plane. So what actually this value represent? Pixel is just a unit represent dot on screen.</p>
  
  <p>Object i am using is circle. 
  radius = 22. (width and height 44*44)
  circle center point: 300,300 (x,y)</p>
  
  <p>sensor height do not know how to get?</p>
  
  <p>Where do i use principle points?</p>
  
  <p>How i get distance from camera to object? How do get real world coordinate of the circle?</p>
  
  <p>I know its too much to ask. I try one month. Did not find any proper solution. </p>
  
  <p>i use function solvePnP to get the camera translation and rotation matrix. But i have problem how to calculate object point? </p>