Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatic correction of camera tilt in a positioning system

A quick introduction:
We're developing a positioning system that works the following way. Our camera is situated on a robot and is pointed upwards (looking at the ceiling). On the ceiling we have something like landmarks, thanks to whom we can compute the position of the robot. It looks like this:

enter image description here

Our problem:
The camera is tilted a bit (0-4 degrees I think), because the surface of the robot is not perfectly even. That means, when the robot turns around but stays at the same coordinates, the camera looks at a different position on the ceiling and therefore our positioning program yields a different position of the robot, even though it only turned around and wasn't moved a bit.

Our current (hardcoded) solution:
We've taken some test photos from the camera, turning it around the lens axis. From the pictures we've deduced that it's tilted ca. 4 degrees in the "up direction" of the picture. Using some simple geometrical transformations we've managed to reduce the tilt effect and find the real camera position. On the following pictures the grey dot marks the center of the picture, the black dot is the real place on the ceiling under which the camera is situated. The black dot was transformed from the grey dot (its position was computed correcting the grey dot position). As you can easily notice, the grey dots form a circle on the ceiling and the black dot is the center of this circle.

enter image description here

enter image description here

enter image description here

enter image description here

The problem with our solution:
Our approach is completely unportable. If we moved the camera to a new robot, the angle and direction of tilt would have to be completely recalibrated. Therefore we wanted to leave the calibration phase to the user, that would demand takings some pictures, assessing the tilt parameters by him and then setting them in the program. My question to you is: can you think of any better (more automatic) solution to computing the tilt parameters or correcting the tilt on the pictures?

like image 843
Wojtek Avatar asked Dec 30 '12 12:12

Wojtek


1 Answers

Nice work. To have an automatic calibration is a nice challenge.

An idea would be to use the parallel lines from the roof tiles: If the camera is perfectly level, then all lines will be parallel in the picture too. If the camera is tilted, then all lines will be secant (they intersect in the vanishing point).

Now, this is probably very hard to implement. With the camera you're using, distortion needs to be corrected first so that lines are indeed straight.

Your practical approach is probably simpler and more robust. As you describe it, it seems it can be automated to become user friendly. Make the robot turn on itself and identify pragmatically which point remains at the same place in the picture.

like image 168
Claude Cochet Avatar answered Oct 17 '22 10:10

Claude Cochet