Ostrich Flash Lets Flash Designers and Developers Easily Capture Motion in a Webcam with Just Flash


Ostrich is a set of open source Adobe Flash classes that lets designers and developers easily capture Web cam motion – from even the cheapest of Web cams – and use that motion as a gesture interface or art pieces.  For instance, activating buttons or having effects follow your motion, etc.

Please see the videos available in the video link above that show Ostrich in use and discus the ActionScript code.  The code section provides a quick look at the code which is something like below:

// make an OstrichCamera object            
 myCamera = new OstrichCamera();    

 // make an OstrichCursor object (there are more parameters available)
 myCursor = new OstrichCursor(myCamera); 

That’s it. Now a cursor follows video motion.  This is really cool technology and has been around at least as long as Toronto’s David Rokeby premiered his very nervous system back in the 80’s of making music with gestures.  Toronto’s Gesture Tek is a world leader in gesture technologies with patents also stemming back to the 80’s.  The technique of using difference blend modes on successive Web cam frames was shown by Grant Skinner in Flash 8 a few years back at an FITC conference in Toronto.  Many thanks to these pioneers.  Various modifications and additions have been made in the Ostrich classes so enjoy!


20 Responses

  1. http://oa-s139-01.sheridanc.on.ca/MP/beachyHead/beachyHead.swf

    760 Seperate OstrichCursor’s

    Consider OstrichCursor officially stress-tested 🙂
    (I also tried it with 2544 OstrichCursors. It worked, but with incredible latency)

  2. Ostrich was great. Thanks Dan for going through all the parameter of the camera in ActionScript saved me a bucket of sweat. I was able to modify the code quickly because you had inserted lots of comment through out the code. This was massively helpful for individuals like me who don’t have a coding background. Keep up the good work.

    – Kamran Ahmed

    • I believe that the Ostrich Flash was an amazing feature for many CS4 Flash beginners. It shows us how much Flash can be developed and expanded to create amazing concepts and designs. From Ostrich Blob, Button, Camera to theCursor had unique codes. The codes were easy to modify with its inserted comments as Kamran stated earlier.

      One of the greatest factors that I found in the Ostrich was that I was easily able to change the designs and the cursor with some simple flash designs or a JPEG background. You could also easily adjust the speed, animation, scale size or the alpha in it. Great job Dan. Hope you could create some other designs in the future for us.

      – Minoli

  3. It was an amazing experience working with OSTRICH Flash/Web cam Motion Cursor.

    Adding Interactivity to the pages with the help of web cam is a gr8 idea. I have just done my first project using it and am very excited about the immense possibilities of its application in a day to day to life scenario – Harprit

  4. The Motion capture program works quite well in CS4, by using an ordinary webcam you may capture movement of yourself and it will put a cursor on the place of movement.
    A heads up for new users, you need to plug in and properly install a camera or the program will not start up at all. There is no detection code to instruct the program to run when no camera is detected. Also, Mac users please be aware that you need to specify what camera you are using in flash in order for Ostrich to run. From my own experience I’ve used a $30 Microsoft Webcam (VX-7000), and it truly was “Plug & Play”, upon plugging it in, it played. No installation required.
    The technology was introduced in Flash 8 when layers were made available to Flash. It uses the ”Difference” layer option to find changes in previous frames of video.
    The capture method works using about 25 lines of fairly straight forward code. Using the example from https://ostrichflash.wordpress.com/ the user can alter the alpha of the video allowing him/her to see what the camera is capturing along with the background graphics and cursor following the movement.
    The name Ostrich comes from the hand gestures, that are made to lure in the cursor, resembling an Ostrich feeding it’s young. The sensitivity options can be altered to slow down and average out the cursor movement. A slower speed will lag a little and average the various movements. Speeding it up will give a more precise and rigid movement, that will often jump around a lot as it will pick up many different changes in movement coming from the wrist, elbow, shoulder, and mouth. However this can be corrected by setting restrictions on the screen placement, so the program will look for movement only in the upper left corner for example, eliminating interference.
    Thank You Dan

  5. It was really entertaining and fun working with this technology, even make my own webcam motion application.


    Thank you for your contribution to Flash development.

    Armando Hernandez

  6. This is a really cool tool and so inexpensive to make it work just Flash and a web cam! The documentation in the classes ActionScript is fantastic – it made things so much easier to figure out even for a beginner like me. I’m surprised that this technology hasn’t been saturated yet, as others. I highly recommend this tool for anyone who is curious about technology, as I predict it’s use it limitless.

  7. It was great learning experience using Webcam and the osrtich. I ran into couple different troubles while I tried to do the project. But With help of a friend, I could be able to do what i wanted to.

    I wanted to modify a lot more then what i have now, but I will practice more and work on more things next time. The ostrich samples were great I could be able to add two things in one. but it would have been great if i could added more things in one. but overall It was great and I can wait to try more things.

  8. Hello Mad Inventor Dan Zen,

    coming from a fine art and design background, I have no programming experience whatsoever, at first I thought creating this motion capture piece would be very difficult. But your ActionScript examples paired with your video tutorials made it easier to follow. The end results are very entertaining.

    I can’t wait to experiment more with this technology.
    Thanks for the invention!

    – Nancy Ng

  9. Ostrich… aptly named considering my progress with it so far makes me want to bury my head in the sand. I’m new to coding… I’ll get it eventually… but for now, introduce my classically-trained-in-the-humanities-brain to the math of nested arrays and it’s eating potato chips on the sofa! Dan’s instructions made it all a piece of cake! So I made some stuff at my blog.

    But, next time, I’d like to work on uses of Ostrich that focus more on its practical application as motion caption technology , instead of just a novelty way of moving a cursor on the screen.

  10. “This was massively helpful for individuals like me who don’t have a coding background.”-Kamran Ahmed

    I agree. The comments throughout the code were helpful and saved me from stressing out too much. It will be interesting to see how Ostrich evolves as people get a hold of it.


  11. Ostrich was a such cool flash app. I never knew Flash was that powerful, allowing motion capturing by using just a standard web cam. This really motivates me to create more ideas more the future.

    I Can’t wait until you introduce us to the other Flash Feathers! 😀

  12. This is an impressive Flash app. The instructions are easy to follow and I am excited about using it for other ideas that I have.

    The best part is showing the finished product to other people, especially those without a technological background. The reaction is great!

  13. Thanks Dan!!!

    First, for introducing motion capture technology in Flash. The principle is so simple and yet, impressive. Most people must have thought “Wow, why I didn’t realize a better use for blend modes”.

    Second, for making AS3 code accessible to a wider range of people. The classes were set up in a more friendly way therefore increases everyone’s appreciation.

    I hope not only Ostrich, but the other classes evolve quickly as well.

  14. I cant believe Flash is that powerful to build technologies like Ostrich. I think based on this technology we can come up with powerful applications. For example we can build games, or we can make face recognition system very easily. This technology could be very exciting for those who want to explore new technologies.
    I am already getting so many comments on this application. I really hope that I will come up with some interesting application to impress my friends.
    Thanks Dan for your ideas
    -Najeeb Rana

  15. Hi Dan
    Do you have any of the ostrich files in AS2? I am completely new to AS3. I am trying to make an app that will create a cursor that follows the motion and draws as it goes, This is part of my final project for my MA in interactive media (here in the UK) if you can offer any help in doing this I would be very grateful. I kind of understand what the code in AS3 is doing but I cant figure out how to attach the drawing api to the cursor.
    thanks in advance

  16. Hi Dan
    I have been messing around with the as3 ostrich files, but i am stuck once again. I cannot get the movement to be more fluid, the cursor, which i have attached an api to only moves in straight lines. any advice?
    I am tempted to go back to as2 approach since I understand it better. However the file ‘ball’ that you kindly shared does not seem to work, the ball doesnt move. Perhaps I am misunderstanding how to use it.
    Any help at all would be appreciated. If you want to see where I have got to http://tinaburton.blogspot.com/ and look at changeing stroke of drawing entry.
    I am getting worried that I have bitten off more than i can chew for my final project…
    thanks in advance

    • hmmm… one thing is to get the camera to work I had to get rid of the 0 in camera(0) – the next thing is I could not even control the ball’s x position! I can’t remember if I am missing something in AS2 – it has been a while or if there is a glitch in the file – I suspect it is a glitch – I just tried to trace myBall.x in the top there and it is undefined yet if I trace myBall it is there. I would try copying all the code into a new file, recreate the ball clip and the video clip. I am sorry – I don’t have time to play with it further. Hopefully you can continue with the AS3 version 😉

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: