DevLog

Cursor Glove, Day 11, and 12

by on Jan.17, 2010, under Chase Engine, Dev Log, Glove Cursor

On Sunday of last week, I had a pretty neat idea. I was looking around the internet, and ran into some sort of gaming glove. I thought “Hey! That’s pretty cool.” I had something different in mind, and found that this glove didn’t have the capabilities I’d hope for. I was thinking of something like a wiimote but in the form of a glove.

I remembered seeing Johnny Lee’s videos of his wiimote hacks. He set up his wiimote to receive input from external infrared lights, and to track it while doing several neat things like head-tracking or a multi-touch projector white-board. This was all very impressive, considering he was using very cheap supplies to accomplish these things. He also made a finger-tracker using an infrared light array (grid of lights), and some reflectors taped onto his fingers. I eventually came to the idea of using an IR light with the webcam. I understood that cameras have a tendency of picking up infrared lights, unlike our human eyes. I grabbed a TV remote, wrote a quick script, and it worked greatly!

I went to Radio Shack that evening, picked up an IR light, a battery holder, and a button. I then went to Lowes and got a pair of gardener gloves. When I got home, I taped it all together using some electrical tape, ran the script, and it worked beautifully. The glove wasn’t perfect yet though. The algorithm takes all the pixels the webcam inputs, finds the brightest ones, then averages them and use that. I actually discovered that sunglass lenses blocks visible light from entering, but NOT infrared light, which was extremely convenient on my part. I popped the 2 lenses out of the glasses, taped them together, and made a little holder so it can slide onto the webcam. This also helped reduce glare, which is another cause of some error in accuracy. Another fall-back was the jitterness that occurs naturally in your hands, and the wide range of brightnesses the infrared light can give off when angled differently. Fixing this was simple, simply load all the calculated positions into an array of 5, 10, or however much and average those out to significantly smooth the cursor.

Hopefully I’ll be able to work on from that. Add another infrared light and add some sort of “multi-touch” capabilities, or maybe even attempt something like a virtual tablet, using the same methods as Johnny Lee’s white-board. The possibilities are endless. Below is a gallery of a bunch of different high-res images involving the cursor glove.

This doesn’t mean I’m letting go of Chase, however. I’m working on it as much as I can. I worked on it again, and got even closer to a working graphics engine. I’m currently creating a Scene datatype. It’ll act much like Adobe Flash Professional’s scene, but in programming. In my engine, you’ll plot different models and polygons in a 3D or 2D space in the scene. All 3D coordinates are rendered, but 2D coordinates are kept the same. Using a scene class will make it easy for the developer to rotate, translate, dilate, or do whatever globally to all the coordinates being displayed.

I got rid of all of the transformation functions (translate, dilate, etc), since they’re already existent inside Coordinate and Polygon’s class. Hopefully I can get the Scene class to work pretty soon here, so I can proceed to start adding actual new features and tools to the engine.

Below is a library of pictures of the cursor glove and webcam filter made out of sunglass lenses:

:, , , , , , , , , , , , , , ,

2 Comments for this entry

  • Eric

    Uh, show us your code in action? URL to the source? Something?

  • BlueThen

    The code is pretty rough atm. It’s simply a quick draft, just to get the thing to work, and probably wouldn’t work very well for other people’s webcams or computers.

    I do plan to add more features though, like calibration. I’ll work on it when I get some of the other stuff I’m working on out of the way.

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!