Ostrich – Flash Web Cam Motion Capture for Flipped-out Folk!

Thanks Maven for requesting that we have the option to not flip the camera.  Most people will want the camera flipped – it is a pet peeve of mine when I am forced to use a camera that does not mirror motion.  It is very hard to adjust.  So I had set Ostrich to  automatically flip and it is fairly tricky to do.  But there might be some cases when you do not want your camera flipped so now you can pass a Boolean false to the last parameter of the OstrichCamera class after the camera dimensions.  This defaults to true.

So something like:

var myCam:OstrichCamera = new OstrichCamera(0,0,640,480,false);

Download the new zip file at left if you need this feature.

FRIENDS AND DONATIONS
Please let us know if you use any of the Flash Feathers and we will add you to the Friends area at left.  If you use the Flash Feathers for a commercial venture or would care to donate that would be super!

karmatja

All the best and we hope you build exciting things!

feathers

Dan Zen

Ostrich – Flash Webcam Motion Capture now Supports Multiple Cam Resolutions

Ostrich, the open source Flash Webcam motion capture interface classes now properly supports multiple camera resolutions.

Nothing like spinning a bug correction as a new feature!  Thanks Antonio for pointing out that the setMode() was missing for the camera.  I often wondered why the resolution was so bad and did not know about the setMode().  When you create your new OstrichCamera object you pass the left, top, right and bottom with defaults of 0,0,640,480.  This gives a desired width and height which is maintained at the best resolution for the aspect ratio.  Before using the setMode() the resolution seemed to be 160×120 and then scaled up.  So this is much better.

Grab the new ZIP file at the left of the site for the update to the OstrichCamera class.

-2011-

Some Preening to OstrichFlash!

Thank you to Stuart who pointed out that Ostrich was not quite right when you moved the OstrichCamera in the x position.  Indeed we had accounted for the region of the camera being changed but the automatic cursor centering did not take into account the placement of the camera as a whole.

Please download from the download link to get a new zip with the corrected OstrichCursor class.

Ostrich Flash Web Cam Motion Capture Samples and Example Code

OSTRICH – Flash Webcam Gesture Capture

“Cursors to follow your movement in a few lines of code!”

Capturing the difference between successive video frames allows us to locate motion. Ostrich is set up to provide any number of cursors in various regions for excellent experimental usage. This magical interface is second perhaps only to brainwaves in the minds of many futurists. Work was done to capture the left side of motion on the left, the right side on the right and proportionally across the middle giving Ostrich improved expectation performance.

Click to Download the code for the examples

OSTRICH SAMPLES
Simple Cursor
Two Cursors
Gesture Button
Motion Blobs
Fairy Follows Fingers

Update to Ostrich Flash – Automatically Detecting iSite WebCam Cam on Mac in Flash

Ostrich Flash has been updated to automatically detect the Webcam cam on  the Mac.  There seems to be a bug or a glitch between Adobe Flash a Apple Macintosh where the iSite cam is not detected as default camera.

The OstrichCamera class in the Ostrich Zip file has been updated to solve this problem.  You do not need to know how but in case you have found this post searching for the solution here is the fix:

OSTRICH DOES THIS FOR YOU!

// make sure there is a camera at all to choose from
if (Camera.names.length == 0) {
 dispatchEvent(new Event(OstrichCamera.NO_CAMERA));
 return;
}
// find the USB class camera - the Mac iSite camera
// note Flash uses a string of a number to locate cameras
var macCamera:Number = -1;
for (var i:uint=0; i<Camera.names.length; i++) {
 if (Camera.getCamera(String(i)).name == "USB Video Class Video") {
 macCamera = i;
 break;
 }
}
// if there is a USB class camera use it
if (macCamera >= 0) {
 signal = Camera.getCamera(String(macCamera));
} else {
 signal = Camera.getCamera();
}
cam.attachCamera(signal);
addChild(cam);

Note, because of this addition, you should always capture the OstrichCamera.READY event before you pass the OstrichCamera to the other classes like OstrichCursor.

-10-

Kids Moving Things on Screen with a Web Cam and Flash

Kids Gesturing for Camera Interaction

There was a request to use Ostrich for helping sooth kids with trauma – sound like a good cause.  We put together a simple package to help the designer get under way.  It shows two MovieClips on stage that trigger camera motion.  This can be as many clips as you want.  You could then animate the clip, play a sound, etc.

Download Zip File Example

(still need to download Ostrich at right and have the files in the com directory installed in a folder in your Flash class path)

It becomes more tricky to have the clips move location – you would need to adjust the code to dispose of the MotionCursor object for the clip that has changed position and then make a new MotionCursor for it.  Certainly possible but tricky.

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

ostrich_blog

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();    
 addChild(myCamera);            

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

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!

%d bloggers like this: