This post is about the method using to determinate the distance between the robot and the Nexus 7 tablet, using tablet’s camera. So I used a picture of the robot to know how the robot is far from the tablet. And with information coming from several cameras I am able to determine the robot position.
In order to know the distance between the robot and the tablet, I built a kind of flag. This flag is a colored circle, so because it is a circle, whatever the perspective, it will be every time the same diameter.
Thus if the robot is far from the tablet, the circle will be smaller in the picture than if the robot was close to the tablet. Thanks to this know, I made some test, take some values, and find the equation.
Now, thank to the equation, I know the distance between the robot and the tablet with only a picture. You wan see on the following picture a screen shot of my program, with the distance measurement.