Frames, Motions, Gestures: A Sneak Peek into the Leap Motion SDK

Leap Motion sent an email to interested developers last week telling them what they could expect in the Leap Motion SDK. The San Francisco-based gesture-control company plans to open up its Developer Portal to the public after its product, a tiny USB device that lets you control your computer by moving your hands and fingers through the air, launches in late July. You can view our original Leap Motion API coverage here.

According to the company, the API data arrives not in point clouds (which is what 3D scanners typically deliver), but in frames with each frame representing an entire view from the perspective of the device. Relying on two infrared sensors and three infrared LEDs, the device detects movements of hands, fingers (all 10 of them) and finger-like tools with pinpoint accuracy.

Within each frame, you’ll find a list of all the hands within view at any point in time, with each hand containing a list of the visible fingers. You’ll also have the ability to see the precise 3D position, direction, and speed of the center of the palm, plus the tips of each of the visible fingers.

In addition to APIs that return raw positional data, the SDK also contains APIs that pinpoint two types of movement: motions and gestures. Motions are continuous flowing movements (broken down into rotation, Scaling, and translation) that are useful for doing things like enlarging a map or pretending to hold an invisible steering wheel. Gestures, on the other hand, have a beginning, a middle and an end. They represent discrete actions, such as drawing a circle, tapping, and swiping, that relate to things like flipping a page or activating a button.

So how does the Leap device work with a computer’s existing operating system? Apparently, the SDK contains APIs that activate “touch and mouse-like 2D interactions.” It is not clear from the email what is meant by "mouse like," however, Leap encourages developers to make use of these APIs in order to maintain consistency in "simple things" like menu navigation.

The motion controller also does not work with a keyboard, but the company has hinted that a few third-party developers are working on keyboard-emulation apps, according to an article in the Washington Post.

The Leap Motion SDK supports Windows, Mac OS, and Ubuntu Linux. It works on a variety of development frameworks and you can also build web apps for the device using JavaScript. A Java Script library is available on Github as are code examples.

The company already has sent out 12,000 free developer kits to ensure an ample supply of programs are available at the time the product ships. Most of those will be sold through Airspace, the company’s online store, which also launches in July.

Be sure to read the next API article: One Line Of Code And Your Video Functionality Is Sorted: CameraTag API