Zachernuk

tnSuperman tanktn oParticles uExtrusion j3d sandy flExtrusion fuelyoursenses meshCam bufferSnake dMap2 dMap pv2 cursorFire opticks faceGame FPSnake pv preOpticks painty youtuber fractalFIngers 2dbals

December 19, 2010

Flash Eyetoy! With source code!

Filed under: doodles,flash,Webcam — Tags: , , , , , , , , , — Brandel Zachernuk @ 9:57 am

Following on from the post about the voice input,   I thought I’d show the camera-based equivalent  that I worked on earlier in the year.  It’s  based largely on the functionality Zugara makes use of.  Even though webcams are nearly universal on laptops and are pretty common on extra monitors, very few applications are written that make much use of them.

Toward that end, I wrote FlyToy, (Flash Eyetoy) –  a very simple library that can be used to track camera activity in arbitrary regions of the screen. It works the same way as the PS2 Eyetoy: rather than trying to figure out what the pictures mean, it just checks for movement in different regions of the screen.   Input happens by flapping your hand (or head / foot / etc) at a region of the screen.  A copy of the video feed is overlaid for reference purposes.

Here’s an un-optimized sample that calculates the activity across the whole image – it gives you an idea of what’s going on.  In practice, it’s only necessary to check the activity inside the areas you’ve chosen, which makes the system much more efficient.

Notes on use: Enable the camera and then wave your hands at the orange rectangles.  When the activity is sufficiently high in a rectangle, you’ll be presented with new targets. What you see by default is the ‘activity’ map; hit the toggle button to see the standard feed.  For Mac users, if it’s not working then make sure that the correct camera has been selected.

Get Adobe Flash player

If you want to try out the library, you can download it and a sample project below.  I’m working with FlashDevelop, which can be obtained here, and the Opensource Flex SDK, which is available from  Adobe here. I hope you like it!

Download the Flytoy component

1 Comment

  1. [...] Flash EyeToy by Brandel Like this:LikeOne blogger likes this post. Comments (2) [...]

    Pingback by Face Input « The book of inspiration — April 22, 2012 @ 6:23 am

RSS feed for comments on this post. TrackBack URL

Sorry, the comment form is closed at this time.

Powered by WordPress