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

Re: [pygame] pygame.camera was (Re: contribute to pygame... Some fun projects to do for pygame 1.9. was Re: [pygame] Bundling Pygame documents)



hi,

I have added an experimental opencv based camera module to svn.

Also added the vidcapture based one to subversion.

lib/_camera_opencv_highgui.py
lib/_camera_vidcapture.py


# with ubuntu you can install opencv like so:
apt-get install python-opencv

It supports more cameras than the current pygame module on linux - and
is theoretically portable to windows, and mac osx... however
python-opencv not easy to install on those platforms(mac,win).

I think these modules could be added as fall-back modules in case the
camera module is not working.  Or maybe even selected as a driver
option like how SDL_VIDEODRIVER can be used to select a video driver,
perhaps a PYGAME_CAMERA_DRIVER environment variable could be used.



cheers,


On Wed, Feb 4, 2009 at 10:00 AM, René Dudfield <renesd@xxxxxxxxx> wrote:
> hey,
>
> well we can still change the API if needed :)  I think it's likely to
> change as we support more drivers, and learn more about other drivers
> APIs.
>
>
> ps.  I just found out about Andrew Straws work on his camera library for python:
> http://code.astraw.com/projects/motmot/wiki/cam_iface
>
> I'm definitely going to have a look into that, and hopefully we can
> collaborate with him.  You might be interested in some other code in
> his motmot library too.
>
>
> cu,
>
>
>
> On Sun, Feb 1, 2009 at 2:58 PM, Nirav Patel <olpc@xxxxxxxxxxxxxx> wrote:
>> René,
>>
>> Awesome!  I was also looking at videocapture.  It seems the way OpenCV
>> does VFW might be easier to use code from for the module itself, but
>> videocapture is a good stopgap.
>>
>> I regret not thinking much about Windows when I was making the camera
>> module API.  What is a fairly thin wrapper around V4L2 can be quite
>> onerous for VFW.
>>
>> Nirav
>>
>> On Sat, Jan 31, 2009 at 9:50 PM, René Dudfield <renesd@xxxxxxxxx> wrote:
>>> hi,
>>>
>>> I started a basic implementation of pygame.camera.Camera using the
>>> videocapture module for windows.
>>> http://rene.f0o.com/~rene/stuff/camera_vidcapture.py
>>>
>>> Of course it's not complete, but allows people to use the same basic
>>> camera API until we finish off the module on windows.
>>>
>>> I've also started one using pyopencv... but haven't finished that yet.
>>>
>>> from camera_vidcapture import Camera
>>> from camera_vidcapture import list_cameras
>>> pygame.camera.Camera = Camera
>>> pygame.camera.list_cameras = list_cameras
>>> del Camera
>>> del list_cameras
>>>
>>>
>>> cu,
>>>
>>>
>>>
>>> On Wed, Jan 7, 2009 at 3:08 AM, Nirav Patel <olpc@xxxxxxxxxxxxxx> wrote:
>>>> Writing the video for windows version of the camera module is on my
>>>> (rather long) todo list, but if anyone wants to do it, I'd be happy to
>>>> help out.  I don't have anything running OS X, but I'm willing to help
>>>> anyone who wants to take that on.  I also have a half written camera
>>>> usage tutorial that I'll finish before 1.9.
>>>>
>>>> Nirav
>>>>
>>>> On Tue, Jan 6, 2009 at 3:22 AM, René Dudfield <renesd@xxxxxxxxx> wrote:
>>>>> Hello!
>>>>>
>>>>> there's a bunch of projects to work on here for pygame 1.9.
>>>>>
>>>>> http://www.pygame.org/wiki/todo
>>>>>
>>>>>
>>>>> Email back here if you feel like working on any of these things, or
>>>>> something else for pygame 1.9 release.
>>>>>
>>>>> cu,
>>>>>
>>>>>
>>>>> - pygame.Camera - Video for windows version of
>>>>> - Remove pyobjc dependency on macosx
>>>>> - OSX Scrap clipboard
>>>>> - pygame.Camera with quicktime on macosx
>>>>> - fix up for py3k
>>>>> - fastevent as default event module
>>>>> - Keyword method signatures
>>>>> - pygame.tests and pygame.examples
>>>>> - Complete tests for all untested things.
>>>>> - pygame.midi - include portmidi bindings
>>>>> - Mark Numeric as depreciated, even more explicitly.
>>>>> - New SDL 1.2.x release.
>>>>> - pygame reloaded
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Sun, Jan 4, 2009 at 11:12 AM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> If the Pygame documents are to be included as part of the Pygame
>>>>>> installation is there any reason to continue producing document bundles? And
>>>>>> who is taking responsibility for modifying setup.py to add the documents and
>>>>>> examples? If it is not on anyone's schedule the I will have a look at it.
>>>>>>
>>>>>> Lenard
>>>>>>
>>>>>> --
>>>>>> Lenard Lindstrom
>>>>>> <len-l@xxxxxxxxx>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>