Hi . I am making a robot that is supposed to detect a red ball with a camera, and then know where the ball is .(adsbygoogle = window.adsbygoogle || []).push({});

The robot has a camera on top of it, that is tilted at an angle ; At each frame the camera detects the red ball and returns 2 coordinates , xp and yp which are the pixel coordinates of the middle of the ball on the image captured .

What i want is to map each point on the ground to a point in the image. In other words to change the perspective from birds eye view to a 2d top view of the ground in front of the robot.

Everything about the camera is known : focal length , the angle at which is tilted, the height at which it is , the horisontal and vertical apperture angles...everything.

All i need is the formula that relates X,Y of the real world to the xp and yp .

I tried several equations that i found online but although all are similar, they are different and none worked .

Note the (0,0) point on the image is in the middle of it.

Help would be much appreciated!

Best wishes ,

Darie

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Inverse perspective mapping equations

**Physics Forums | Science Articles, Homework Help, Discussion**