Saturday, March 19, 2011

Python project

I'm taking a vacation away from C for a bit. I've been beating my head against various IDEs (CodeBlocks, Eclipse, XCode) on various platforms trying to learn how to set paths to various external libraries and set compiler options to get things like OpenCV and GTK to work and I'm kind of burned out. I'm not burned out on C, I'm burned out on the hoops I have to jump through to do anything that's not vanilla C. I actually solved most of my problems, it's just that I'm resenting the lost afternoons this week doing it.

Anyways, I have an idea for a project that is actually useful and can probably be implemented over the next few days.

I've been trying make my PC be useful during the day while I'm gone by using it as a security camera. Some years (2002ish?) back I did this rather successfully with some light-weight software (Fwink or Dorgem) that would take a pictures every X seconds and upload it to my UTDallas FTP site. This past week I've been trying to recreate that setup with either minimal or frustrating results.

Dorgem/Fwink are Windows XP-era abandon-ware and don't play nice with my rig. Yawcam works but isn't very consistent about working. It crashed on me a few times but that might be my webcam's fault. Yoics is overkill/bloated and extremely slow.

All I want is a program that takes a picture every X seconds and saves it to "date-time.jpg" in directory "date". I don't need motion sensing since this is a low-light environment that's too noisy to do that correctly.

Here's the plan: OpenCV has functions for grabbing and saving an image from video sources, like a webcam. It seems straightforward enough to implement in Python and there are lots of code snippets I could borrow. I don't have a FTP site to use but I do have Dropbox on this machine. I'll save the files to "C:\Users\Chris\Dropbox" and the Dropbox program saves it to the "cloud" and syncs to my other machines when they boot up and have an internet connection.

If OpenCV doesn't work out (or turns out to be overkill) I'll use a somewhat popular Windows-only library (http://videocapture.sourceforge.net/).

So that's the plan. I'll write it in notepad++ for the syntax highlighting and run it from the command line.

No comments:

Post a Comment