A quick peek behind the curtain: Position detection, “Where are you?” (Part 1)

Ah, there you are! It’s time for another short article on the insides of augmented (and virtual) reality techniques. One of the big challenges is that we need to put in the exact same position our real camera and our virtual camera when trying to merge real and virtual objects. This means that our real camera must be able to communicate its coordinates from a reference object, which will have a virtual representation. So the point is: given a real world (let’s say, ours, for example) we need the coordinates of a moving object. This position detection, or tracking, how can we do that?

I, robot arm

The simplest solution is to use the object robot arm equipped with angle or slide sensors. Moving the object will change the angles and distances measured, which can be detected by a computer that will update the virtual object’s position using the new values. It can even be double sided, if your robot arm is equipped with sensors AND motors, then it can have a force feedback, to prevent you from entering solid (virtual) objects. You can see an example below of a haptic (i.e. linked to the sense of touching) device. The main problem we have is a quite limited range, because the arm is usually expensive, and building an arm that has more than 50 cm^3 of liberty of movement is not easy.

A whole new (magnetic) field

Another way to detect an object’s position is using a magnetic field. There are different ways to do it, but many of them are really similar. The plan is to generate a magnetic field with an electromagnet, and to measure the intensity of this field along the 3 directions of space: the closer to the source, the more intense. And we can have the distance from the source to the sensor in all 3 directions, thus giving the coordinates, et voilà. How can we do it? This is a question of physics: if we make a small circuit that has a coil in it, then when there is a moving magnetic field, there will be electricity in the circuit, and we can measure the amount of electricity. It’s the same principle that we use to generate electricity in power plants. But there is a problem. We need to know the shape of the magnetic field we generate, and it’s highly dependent of the environment we’re in, and especially the presence of metal objects. So this is a great system, but if someone brings a metallic chair to watch it, it will not work anymore. And how can I talk about magnetic tracking without mentioning another device that has been used for thousands of years: the good old compass, which uses the earth magnetic field and a natural magnet to point North and help lost travelers. Well even this old trick found its way to Augmented Reality:

Let’s throw our friends into outer space!

While we’re talking about compass, we may also consider another (more recent) technology that can be used for tracking, and that has a huge range, it’s Global Positioning System, better known as GPS. Imagine. You’re on a road, but you don’t know where. You have a friend, on the 30th mile of the road. If you know that you’re 10 mile away from him, then you’re either on the 20th mile or on the 40th. Now if you know you have another friend on the 50th mile, and you’re 10 miles away from him too, well, you know where you are. And you’ve just created a one dimensional GPS. For a three dimensional one, you need 4 friends. So let’s say your friends are satellites revolving around the Earth, and their position is known. If you can tell how far you are from each of them, then you can derive your own position. So your 4 satellite friends, who have very precise clocks in their electronic parts, will send a message containing the current time, and this message will travel through space at the speed of light to get to the GPS device in your car. So when you compare the message you receive and the current time, there is a slight difference due to the travelling time, and knowing the speed of light, this time difference can become a distance to the satellite. And thanks to your space friends, you now know the closest path to the nearest grocery store! GPS is used for most of the Augmented Reality features we can find in iPhone apps today, when it points a direction and a distance, it uses GPS. But there are some limitations to this principle. GPS is not very accurate for most devices, and even if you can get your position with an error of less than a meter, many Augmented Reality applications require something more like a centimeter or even a millimeter. And GPS does not give you your orientation, so even if you use a compass, you will still need other informations to have all the informations we need. Pretty much all we can do with a GPS alone for Augmented Reality is something like that :

So that’s it for today, but the “part 2” will soon be there for you 3D fans. We’ll be talking about infrared light, accelerometers and gyroscopes and finally Computer Vision. Stay tuned !

One Response à “A quick peek behind the curtain: Position detection, “Where are you?” (Part 1)”

Leave a Reply