“Minority Report” interface using Flash and FLAR toolkit
August 19, 2009
As part of the RoomWare workshop end of August 2009 I will be introducing a “Minority report” interface using Flash and FLAR toolkit.
It is part of a 2 type interfacing strategy in Flash, including:
- Gestural interfacing using your hands ad fingers in front of a screen
- Table interfacing using a transparant table-top, objects and a fixed camera
This article is about 1: the Gestural interfacing implementation.
The “Virtual reality glove”

Code
Download the ZIP file. Beware: you compile it with a Flash CS4 file (in the “fla” folder) and this is still my dirty prototyping code. It uses the Squidder demo as a basis and adds the “Minority Report” dynamics on top.
Feel free to experiment with it and build your own things. Share with me what you created by posting your links in the comment section below. I am very happy to learn to what levels you will take it to.
Demo video
Do it yourself here.
Preface: limited, low cost and easy to implement
This solution is not intended to be an industry-strength type solution. It is very limited and dependent of light and you still need markers to make the gestures (where recent solutions using more powerful environments than flash recognizes hands, fingers and gestures). It is also very low cost and very easy to implement.
In contrary to the more fancy solutions you only need this to make your own “Minority Report” interface:
- A computer
- A web cam
- Paper
- A printer
The AS3 class
The class is written in such a way that you can integrate it fast and simple in your project and so that you can build your own strategies for gestures and gesture based interfacing.
Basics
Distance and pressure

The Distance of the FLAR toolkit fiducial to the camera is translated into “pressure”. This pressure area has a range which can be set per object. Using the “range” you can determine when the object will start to apply pressure to the “camera”.
Rotation and tilt

Each FLAR toolkit fiducial also returns “rotation” and “tilt”. Tilt is on the “X” axis or the “Y” axis. You can translate the titl to “pressure” as well.
Putting it together: Rotation, tilt and pressure

Research
In the past week I have tested several scenario’s and combinations, filtering out the most usable set of movements using your hands or fingers in free space (the “Minority report” interface)
Visual feedback
It helps to give your user visual feedback, so that the result of a movement can be predicted and the sense of “I am in control” is optimal. The below images shows you the visual language I used for testing.
Pressure (towards the camera)

Pressure is visualized by a circle within the pointer. The farther away, the less the pressure is. The closer to the camera, the bigger the pressure. I started using pressure to “grab” and “activate” things, but soon discovered that this excluded other strategies where I use “pressure” to tilt an object in a 3D space.
In code you use pressure (called Zstrength) like this:
var nrm:FlarTransformNormalizer=normalizedObject; // The normalized information from a FLAR object
var stepSize:Number=5;
_yStep=nrm.Zstrength * stepSize * nrm.deltaY; // Uses the pressure towards the camera to define the strength of a movement
Rotation

I translated rotation to a “dial”. When you point your finger like a pistol to the camera, the dial is on “neutral”. When you rotate left or right, the dial is rotated likewise. Rotating turned out to be the most effective way to apply “pressure” or variable “impulse” to an object while maintaining the freedom to move your fingers into a 3D space. The green area is the threshold which will be discussed below.
In code, the rotation is gained like this:
var nrm:FlarTransformNormalizer=normalizedObject; // The normalized information from a FLAR object
var myRotation==nrm.rotation // returns a value between 0 and 360
There is no “mouse button”
To have no “mouse button” introduces a practical problem. How do you tell the system that it should perform an action or not? I found the easiest way to deal with the “no mouse button” to use a “neutral zone” which spans an angle of 10 degrees left and right. When the angle of the pointer is in this area, nothing happens.
Solution: rotation = impulse
Sometimes you want to do precision work, the other time you want to make big movements with minimal effort. The more you turn the dial, the bigger the impulse will be of your movement. See the video on YouTube for the implementation. In code it looks like this:
var nrm:FlarTransformNormalizer=normalizedObject; // The normalized information from a FLAR object
var stepSize:Number=5;
_yStep=nrm.dialStrength * stepSize * nrm.deltaY; // Uses the dialstrength to define the strength of a movement
dialStrength already includes a treshold using nrm.dialStrengthTreshold. The default value is 10.
Movement + rotation left/right = direction

Again: the system registers only movement. When you want to drag an object on screen, you need to cancel out the directions the user does not want to move to. Otherwise it will “stick” to your pointer. I tried using pressure as “you make a circular movement towards the camera when dragging something” and found out it was not that simple. See the YouTube video to see how this works in practice.
Turning the dial lef/right is. The red semi-circle shows your range of movement. Dialing left means you can drag objects to the left hand side and up/down. Dialing to the right will move the object to the right. Movements towards the “white” area are neglected.
Tilt

Tilt is an interesting one. It turned out to be hard to use in practice in combination with other movements, unless you use two hands. With tilt, you apply “pressure” either to the right-hand, left hand, upper or bottom side. Like a joystick. To maintain these positions while doing other movements however, require a longer learning curve. For that reason I discarded tilt for the “Minority Report” interface.
Combined actions

Until now I have only discussed single handed actions. By “pairing” FLAR objects you can create combined actions. In the video on YouTube you can see how I rotate and scale the image based on two-handed actions. (The image above is rotated 90 degrees)
Again, the rotation of each FLAR object is used to define the “strength” of an action, represented by the thickness of the connecting line. One finger/hand represents one action (rotate object) the other and the other action (scale object).
Entry Filed under: RoomWare. .
11 Comments Add your own
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed
1. Create Digital Motion » Minority Report Interface, Implemented in Flash + FLARToolkit, and Why it Rocks | August 19, 2009 at 6:38 pm
[...] “Minority Report” interface using Flash and FLAR toolkit [...]
2. Twitter Trackbacks for “Minority Report” interface using Flash and FLAR toolkit « FlashWorks [wordpress.com] on Topsy.com | August 20, 2009 at 2:52 am
[...] “Minority Report” interface using Flash and FLAR toolkit « FlashWorks flashworks.wordpress.com/2009/08/19/minority-report-interface-using-flash-and-flar-toolkit – cached page #RSS 2.0 FlashWorks » “Minority Report” interface using Flash and FLAR toolkit Comments Feed FlashWorks Pushing Forms and form fields in Flash Fix: iSight camera does not work in Flash — From the page [...]
3.
Abdul Qabiz | August 20, 2009 at 3:57 am
Totally awesome work. This proof-of-concept app would encourage a lot of people to develop apps.
I think, elearning apps for kids and various other apps for day to day life (kiosks, etc) can benefit from it.
Keep the great work going.
-abdul
4. RoomWare, Augmented reality and new exiting stuff happening fast « Peterkaptein’s Weblog | August 20, 2009 at 12:30 pm
[...] Last week (August 10 to August 16) I developed the first of a series of cheap interfacing means using Flash and the Web cam to create different interaction scenarios.Check this page. [...]
5. Join the August 29/30 RoomWare Workshop « FlashWorks | August 20, 2009 at 5:29 pm
[...] Minority Report type input [...]
6. Some Cool Visual Interface Stuff | hellokinsella | August 23, 2009 at 7:12 pm
[...] programmer Peter Kaptein has done some brilliant creative work to mimic the infamous gestural interface in the film Minority [...]
7.
Og2t | August 27, 2009 at 11:51 am
Ha! Awesomeness here, just discovered your demo! I am working on object tracking as well, thanks for sharing the source. Good luck!
8. Augmented Reality example – Minority Report Interface « Ideas for Teaching Computer Technology to Kids | August 28, 2009 at 4:12 pm
[...] http://flashworks.wordpress.com/2009/08/19/minority-report-interface-using-flash-and-flar-toolkit/ Published in: Uncategorized on August 28, 2009 at 12:11 pm Leave a Comment [...]
9.
flash actionscript 3.0 tutorial | September 29, 2009 at 4:15 pm
Flartoolskit it’s fun
10. Augmented Reality | Enzo Blog | October 7, 2009 at 12:41 pm
[...] Taką technikę zastosowano na stronie Publics & Hal Riney. Można zapoznać się z kodem z dema Petera Kapteina w celu zrozumienia mechanizmu jego [...]
11. More Flartoolkit « Adam Jaggard – 3rd Year Digital Media Production | October 22, 2009 at 10:02 am
[...] check it out http://flashworks.wordpress.com/2009/08/19/minority-report-interface-using-flash-and-flar-toolkit/ [...]