0

How can I calculate the distance of an object of known size (e.g. aruco marker of 0.14m printed on paper) from camera. I know the camera matrix (camMatx) and my fx,fy ~= 600px assuming no distortion. From this data I am able to calculate the pose of the aruco marker and have obtained [R|t]. Now the task is to get the distance of the aruco marker from the camera. I also know the height of the camera from ground plane (15m).

How should I go about solving this problem. Any help would be appreciated. Also please note I have also seen approach of similar triangles, but that would work on knowing the distance of the object, which doesnt apply in my case as I have to calculate the distance.

N.B: I dont know the camera sensor height. But I know how high the camera is located above ground.

enter image description here

I know the dimensions of the area in which my object is moving (70m x 45m). In the end I would like to plot the coordinate of the moving object on a 2D map drawn to the scale.

Anubhav Rohatgi
  • 458
  • 1
  • 6
  • 16
  • If you know [R|t], your t vector is the distance from the camera to the marker, in camera frame. Are you trying to measure something else? – Kani Mar 16 '20 at 20:18
  • I get correct distance when the camera is front on with the marker i.e. when camera is almost opposite to the marker (0,0). But in my case the marker is on a moving object. Am I missing some math? – Anubhav Rohatgi Mar 17 '20 at 08:11
  • I still do not understand what you are trying to say. Are you saying the distance is correct when the marker is still, but it is not when the marker is moving? – Kani Mar 18 '20 at 11:45
  • The distance is correct when the tvec has +ve x, but when it changes to negative the distance is incorrect? – Anubhav Rohatgi Mar 18 '20 at 12:23
  • Why didn't you add any of these critical details in your original question? And also, it is hard to answer that without seeing your code. – Kani Mar 19 '20 at 13:08

0 Answers0