I recently had the pleasure of developing a motion detector (Leap Motion) controlled Unity3D app for the newly opened finn.no store in Oslo, Norway. The physical installation this app would be a part of were to be placed in a somewhat large room, with multiple lighting sources. So I figured some research was due.
My first tests were disappointing, to say the least. The Leap Motion’s accuracy was, quite honestly, horrible. It kept losing track of my hands, could never discern more than one or two of my fingers at a time and had a really low frame rate when I checked Leap Motion control panel diagnostics.
Once I replaced the incandescent light bulb above my desk with an LED bulb, though, things picked up. Both hands and fingers were tracked quite well and everything seemed more responsive. This impression was confirmed by the diagnostics: the frame rate had more than tripled.
The Leap Motion uses a small array of infrared LEDs to bounce infrared light off anything within its range, picks the reflections up with its sensors and applies some software magic to discern hands, fingers and pointy objects. In the right conditions, this works pretty well. There are, however, some possible pitfalls that will degrade the sensor’s performance. The one that has the greatest potential to cause trouble is light pollution from nearby lighting sources. Luckily, with a bit of care, this problem might be mostly avoided.
Different types of lighting disturb the Leap Motion to varying degrees. By far, the two worst types are incandescent (“regular”) and halogen light bulbs. These give off a very small portion of their energy use as visible light; the rest is spent on heat and infrared light. LED bulbs and CFLs (Compact fluorescent lightbulbs), it turns out, not only use less energy but also give off way less infrared light, allowing your Leap Motion to work undistracted.
So, if you’re having trouble with your Leap Motion’s performance, try adjusting your lighting. Replace incandescent bulbs with LED bulbs or CFLs, angle the light sources differently or put up screens or other objects to block direct light onto the sensor surface. Also: keep it out of direct sunlight, too – there’s plenty of Leap Motion-distracting infrared in sunlight.