[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Re: [toonloop-dev] Camera module roadmap



I'd like to add that at this time it seems that pygame on my mac is using functionality from opencv (specifically the camera wrapper in the highgui module). I have opencv installed on my mac, so it's unclear to me if pygame.camera would work on a mac without opencv. Could someone clarify this point for me?
Also, if anyone's interested I discussed using pygame.camera here:
http://tristanswork.blogspot.com/2008/12/live-animation-with-pygame-and.html
Hopefully Alex and I can contribute to the pygame.camera effort over the next little while :)

-Tristan

Le 26 avril 2009 15:53, Alexandre Quessy <alexandre@xxxxxxxxxx> a écrit :
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/
_______________________________________________
dev mailing list
dev@xxxxxxxxxxxx
https://listes.koumbit.net/cgi-bin/mailman/listinfo/dev-toonloop.com



--
Tristan Matthews
Société des arts technologiques [SAT]
email: tristan@xxxxxxxxx
web: http://tristanswork.blogspot.com