Skip to main content


Showing posts from August, 2009

Windows + Pygame + VidCap

So I thought I would try out the pycam module on windows.
First of all it seems windows comes with nothing, not even python. So after installing python I still needed this: this:
Vid cap itself is so easy: from VideoCapture import Device cam = Device() cam.saveSnapshot('image.jpg')
To get just the most basic stuff going, for some reason the VidCap module wouldn't let me open a camera unless the size was set at (160, 120) and the Camera class seemed to change going to windows... anyhow if you want to play with this grab it from the repo here. This is using the pygame edge detect, just tried the scipy one - appears to be a problem mapping surface to numpy array... from memory there was a hack to get around something so maybe thats no longer required.

The "greenscreen" example and the simple threshold.
Couldn't immediatly see how to get the python wrappings for swig going on win…


Enter the new matlab contender, Spyder:

This would have been pretty handy over the last summer! All the pylab, scipy and numpy docs. The matplotlib integration is key. Eventually it would be awesome to see pydb and stepping through python scripts like you can for m files in matlab. But this is a huge step in the right direction!

This is also my first post from Windows, good to see that Python(x,y) has been coming along nicely since I last looked at it. I will see how this Pydee (renamed to Spyder) goes on all three platforms that I now use.