Log this one in the “Totally out there” bin. Also in the “doesn’t really work, but shows off a cool notion that could probably be done if we were smarter and weren’t using an underpowered web plugin” bin. And the “Big Brother / 1984″ bin.
Inspired by the love our Augmented Reality Twitter Shirt recieved and our recent foray into face detection, we decided to put the two together. At the moment, the script doesn’t detect a specific person — that’s where the (kind of) comes into play. But imagine associating specific faces with twitter (or “face”book… …. sorry) usernames and you’ve suddenly combined the power social networking with video monitoring that would make the Brit’s CCTV system cry like it just got relegated to League Two.
If you’ve been messing around with Augmented Reality (or any webcam stuff in flash for that matter), you may have come to the realization that many mac users may not have their proper webcams (i.e. iSights) set by default. In a commercial setting, you want to avoid a person having to select their webcam at almost all costs — it’s another barrier to entry, and can be confusing, too. Especially if you have video editing software installed, there can be a lot of options, as you can see below.
However, it’s easy to check and see if the person has an iSight installed and, if so, automatically choose that one.
var index : int = 0;
for ( var i : int = 0 ; i < Camera.names.length ; i++ ) {
if ( Camera.names[ i ] == "USB Video Class Video" ) {
index = i;
}
}
//Oddly, Camera.getCamera needs a string of the camera index, NOT the name of the camera.
_webcam = Camera.getCamera( String( index ) );
Voilà. You’re now covered for mac users and windows users won’t notice a thing.
UPDATE: We’re be remiss not to also point you to Eric’s excellent FLARManager class. He took some of the stuff we’ve covered here and put a far more delicious topping on it.
One of the big things we’ve been wrasslin’ with recently here at Squidder is how to handle multiple instances of multiple markers using FLARToolKit. Well we haven’t totally nailed it — close, but there are still a few niggling issues. So we’re looking to you, dear Squiddite, to help us out.
It contains all the libraries (FLARToolKit, Papervision, even some of our own) you need to get going, even if this your first FLAR project. It’s as simple as extending a single class, creating an array of the markers you want to load in, and rocking and rolling. It also works great even if you’re only dealing with a single symbol.
Before we start this post, we ask that all non-nerds leave the room. Seriously, it’s for your own good.
Alright, now that we’re alone, let’s get down to business. When we first started messing with FLARToolkit, we were confused as hell about how to create our own markers, as were many other people we came across in our augmented reality induced travels. So now that we’ve got a grasp on it, let’s break it down so that future Magellans of the internet won’t make that stop in the Philippines.
This actually came about as a happy little accident while trying to bend FLARToolkit to our will (tracking multiple instances of multiple symbols – a total pain in the ass. But that’s a story for another time). It just so happened that we were rocking out to Kiss’ “God Gave Rock & Roll To You” and it suddenly occurred to us that “Hey, it wouldn’t be so hard to make these things make sounds when they disappear.” So we did. And it was awesome.