Pages

Thursday, January 19, 2012

My virtual whiteboard

I wanted to be able to use my webcam as a virtual whiteboard. You know, for when I don't want to use pen and paper. I remembered a friend of mine used OpenCV for one of his projects, and looked into it some more. As it turns out, OpenCV pretty much what I needed.

To avoid hard work and such, I got a few other libraries for Python. I used VideoCapture, PIL (Python Imaging Library), pygame and of course OpenCV.

To save me from having to explain in detail how it works, take a look at this awesome flowchart:


EDIT: The images may be dead. I'll be uploading new images in the coming days.






Here are some examples of some outputs:

Just the green layer

The difference between the old and new frames (RGB)

I'm making a fair bit of progress.
All I have to do now is allow the user to specify the colour of the tool that they want to use, and then three lines of code later, I can isolate the tool.

Pretty cool huh?

I'm not sure if I'll release this project at all, but I guess we'll see.
Right now, it's pretty inefficient. It can only work when my laptop is plugged in. I'll see what I can do about that, because that could be a problem. But other than that it works fine.

0 comments:

Post a Comment