1

I would like to know how to calculate the position of an object (or pixel) that is framed by multiple camera's around it.

So let's say I've 3 camera's, positioned in a (equilateral) triangle. The field of view (angle of view) is know and are the same for each camera. The distance between each camera is known as well. So the situation is as follow:

enter image description here Cam1 Cam2 Cam3

The fov is 60 degrees and the images of the camera are 1920*1080 pixels. How can I get the correct X and Y coordinates of the pole in topview? I've tried the following:

  • Each pixel of the image represents an x amount of degrees:

    60 / math.sqrt(1920^2 + 1080^2) = 0.0272367 degrees

  • Measure the distance from the center of each image to the pole where it's touching the ground. Or should I measure it from center to pole on the x-axis only?

  • Multiply these numbers from each image with 0.0272367 and draw a new image (with PIL) with lines based on these angles. Where the 3 lines cross, there should be the object.

However this is not exactly giving me the correct position, not all three lines cross on the same spot. What's the best way to achieve this based on these information?

My goal would be a topview image something like:

topview

Trekdrop
  • 475
  • 7
  • 27
  • Any one camera will give you the position of the pole, if the cameras are calibrated and you know the location and elevation of the camera in the same world coordinate system as the pole. All you have to do is project a ray from the focal point throughout the image at the bottom of the pole and use the Z=0 plane for the pole bottom. – fmw42 May 12 '20 at 22:45
  • @fmw42 Thanks. After some reading I understand it's possible to do this with only one cam. However I need all of theme because there can be multiple objects in the scene. To calibrate a camera, I need to know 1 distance in the scene, right? – Trekdrop May 13 '20 at 12:49

0 Answers0