user3790147
user3790147

Reputation: 87

Calculation screen position from latitude and longitude

I have a video camera at a high building (eg. 10 storey high) looking at an area. The video screen is stream to display on my laptop.

If I know a building’s latitude/longitude, how can I calculate what position (in pixels) I can mark out a cross on my display video to indicate the position of the building?

Upvotes: 0

Views: 166

Answers (1)

graham.reeds
graham.reeds

Reputation: 16476

What you are looking for is Augmented Reality.

You would need to know what the focus of the camera which is/was a non-trivial task. I wrote one many years ago for a professional Sony DVCAM system that used error diffusion pulled from Numerical Recipes book. This took a long time to set up and calibrate but once calibrated the focal length was fixed.

Modern systems use a half-cube system in which software knows the size of the cube and thus can infer the focal length, fov and other aspects of the camera. Again not a trivial operation but a lot quicker than my method. I read a paper by a canadian guy who had a virtual tank driving over objects in photos of Greece IIRC. This was in 2001 so forgive me if the name of the paper slipped my mind.

Another aspect you have to consider is the angle and orientation of the camera you have. While you know the GPS of the camera, you need to know the orientation. You can get cheapo electronic compass that will give you the best-guess direction but what you need is an IMU. They can range from a few quid for Arduino ones to many thousands for industrial. Since you have the pull and rotation of the earth as constants you can infer from the strain placed on the axes of the IMU what its orientation is.

The ideas which were difficult then are probably common place now. Your best bet would be to read through some papers on Augmented Reality.

Upvotes: 1

Related Questions