Recently I decided to try using Github to save my code. I’ve used Subversion for a little while and before that I never used any kind of code backup software. So far I’m liking it, I have one project up on it.
I’ve been trying to experiment with Video4Linux. I just bought a new web camera that is plug-n-play and works on linux. So I tried to find some code that lets me get the webcamera data. I found one example that is provided by Video4Linux so I modified it and encapsulated it into a C++ class file. The class allows you to grab the webcam data in either YUV or RGB format, and then process the data however you want. I created an example that grabs the data and then prints out a series of bitmap images.
If you are using git, you can type the following to download the code.
git clone git://github.com/rabidgeek/linuxWebcam
Or if you do not use git and want a direct download, click the following