Calculate topview object position by image(s) with know camera field of view

498 Views Asked by At

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

0

There are 0 best solutions below