We spoke on IRC, but I'll echo the information to the list. Werner Laurensse will be writing a OS X version of the camera module this summer via Google Summer of Code. He will be announcing more about it, including his git repo and blog soon. It would be very helpful if OSX users could test his code as he progresses through the summer and provide feedback.
I may take on writing a Windows version this summer if I have enough time. Ideally, we would have native support for Windows rather than wrapping another library. I'm not sure about adding v4l support, as I don't think there is much hardware around that requires it anymore. If there is enough demand for it, it may be worthwhile, as I think some of the v4l2 code could be reused. There is currently support for OSX, Windows, v4l, libdc1394, and others through OpenCV and VideoCapture wrappers that René has written. The camera module will be distributed with Pygame 1.9, which will most likely be coming at some point this year, though I don't think we have a specific date planned for it. I haven't used py2exe, but hopefully someone on the list can provide help with that. Nirav On Sun, Apr 26, 2009 at 3:53 PM, Alexandre Quessy <[email protected]> wrote: > Hi all, > (esp. Nirav, René and Chelsea) > I am interested in getting involved in the pygame camera module, since > I use it for my stop motion software ToonLoop I am developing with > Tristan Matthews. See http://toonloop.com : and yes, I think ToonLoop > is a great free software to test the pygame.camera module with, if you > don't installing Twisted. Creating a cross-platform application is my > main concern, and I feel like there is a lack of cross-platform C > libraries for having a live camera input. Anyways, Python is the way > to go for such a high-level software like mine. I am not so much of an > expert in C, but I can help with the software architecture. > > Mac : So, the Mac version uses the OpenCV wrapper for now ? I have > read on Nirav's blog that py-objective-C wasn't well maintained enough > ? Does that mean we will stick with the OpenCV camera wrapper this > summer, Chelsea ? Are there build/install instructions for Mac ? It > seems like the camera API is slightly different between Mac and > GNU/Linux. At the end of this email, I provide two code snippets which > illustrates those differences. It's when we initiate the camera, and > when copying a surface from it to a list of surfaces. > > Linux : On GNU/Linux, I am having success with v4l2 inputs. What is > the state of the v4l ones ? Has it been reported to work for some > users ? Any plan to support raw1394 cameras ? (libdc1394) When is it > planned to release a .deb with pygame containing the camera module ? > What is the state of your computer vision tools for Pygame, Nirav ? > > Windows : What is the state of the camera module on Windows ? The > vidcap module was reported to be working, (Feb 2009) but will it be > officially part of pygame, or should it be using an other tool/driver > ? > > Any chances I can make py2app and py2exe applications with > pygame.camera support before the end of the summer ? > > Thank you !! > ---------------------------------------------------------------------- > Differences between the pygame.camera in Mac v/s GNU/Linux > ---------------------------------------------------------------------- > ############### Initiating the camera ################## > video_device_num = 0 > size = (320, 240) > if self.IS_MAC: > print "Using camera %s" % (video_device_num) > self.camera = pygame.camera.Camera(video_device_num, size) > else: > print "Using camera /dev/video%d" % (video_device_num) > self.camera = pygame.camera.Camera("/dev/video%d" % > (video_device_num), size) > ############### Grabbing an image ################### > if self.IS_MAC: > self.shot.images.append(self.most_recent_image.copy()) > else: > self.shot.images.append(self.most_recent_image) > > -- > Alexandre Quessy > http://alexandre.quessy.net/ >
