Home > algorithmn, as3, flash > Pure AS3 version of Lucas-Kanade Optical Flow

Pure AS3 version of Lucas-Kanade Optical Flow

Time for some playing.

As we tried to figure out how to get an accurate tracking using a webcam we stumbled upon different methods.

The first approach was using Haar Cascades. Trying to optimize them ended up in x-thousand lines of unrolled code in one function. I wrote an AIR app which transformed cascade xmls to a function AS3 class. Execution time was really good. If I remember right it was about 6ms for finding 2 eyes. But it was not accurate, found the eyes randomly. So we decided to skip Haar Cascades and tried to find another method which was more accurate.

We found OpenCV and the included lkdemo was what we thought would fit our needs. We did a complete rewrite in AS3 and optimized the hell out of it.

Optical Flow Demo (SWF) (webcam required)

On my machine it needs about 1ms per point + 2ms function overhead.

For optimisation we used Joas Apparat (http://blog.joa-ebert.com/) .

Advertisements
Categories: algorithmn, as3, flash
  1. 12/10/2010 at 14:22

    Great! Finally you’ve got a blog.

  2. Jamie
    12/10/2010 at 14:51

    Great work! Are you making this available anytime?

  3. MMmm
    12/10/2010 at 20:41

    What´s the demo supposed to do?

  4. Jeff
    14/11/2011 at 14:23

    Share Source or it didn’t happen :p

  5. 14/11/2011 at 14:27

    You can download an SWC version here:
    http://www.beyond-reality-face.com/sdk

    (point tracker at the bottom of the page)

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: