Sometimes as a developer, you feel the need to reach back into the past and do things “old skool”. I had an ol’ skool moment today. I wanted to center images on one panel of my homepage. Easy to do in CSS, right? Even easier to do with a <center> tag. That tag is deprecated as of HTML 4.01. But it’s oh so easy to use. I gave in to temptation, just this once - after all, it’s my own page that I was working on.
NOTE: You must have a webcam to use this application
This is a prototype application that uses video input from your webcam to do simple motion recognition. It rotates the cube to the left/right if you wave your hand towards the left/right.
1) When the security popup appears, choose to allow Flash to access your webcam.
2) Your webcam image should appear in the small panel on bottom right
3) Wave your hand to the left/right slowly in front of you, as if you were pushing aside a curtain
4) The cube should rotate to the left/right in response to your gesture
The red areas on the webcam image show areas of motion. At present, we are using a very naive motion detection algorithm that tries to exclude gross motions and looks for horizontal movement of the motion area. You might find that you need to slow down your gesture to get it to work, or that you need to move back from the camera.
At this point, this is nothing useful. It’s a beginning towards a proof of concept. The idea is that if this type of motion recognition can be made accurate and robust enough, it could open up new possibilities for interaction with your computer without having to add any new hardware.
cursor:hand doesn’t work as a style in Firefox and Safari, so you need to use: cursor: hand; cursor: pointer; . However, that throws an error in Firefox, which doesn’t recognize the cursor:hand (which is still necessary for IE). I’ve always just lived with that, but recently I have found out a new way to put it that gets rid of the Firefox error: cursor:pointer !important; cursor:hand; .
We have released our first, very basic prototype of gesture recognition using Flash and AS3. Basically, it uses a simple motion detection algorithm to look for horizontal motion and registers each discrete movement to the left as an event. The idea is that you can fire the event with a wave of your hand, which then triggers some kind of action within the application. At this stage, it’s not all that accurate or robust - you can’t move too fast, or too close to the camera, and even at an ideal distance it seems to miss a movement now and then. But it’s a start towards building a proof-of-concept for gesture recognition in Flash.
Is it just me, or does the wildcard ‘%’ NOT work when setting the FilterExpression on an ObjectDataSource in .NET 2.0? Instead of the usual ‘%’ character, I have found that the asterisk ‘*’ is much more reliable. For example, the following statement returned no rows:
dsDocuments.FilterExpression = 'title LIKE '%Engineering%'
but this DID work:
dsDocuments.FilterExpression = 'title LIKE '*Engineering*'
MSDN documentation says that both forms are equivalent, but apparently not, at least in my experience.