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

Re: [pygame] Proposed Module: Camera



Both YUV and HSV would be very useful for vision, but I don't think
there's a clean solution to it.  It just doesn't feel right to store
it as an RGB surface and leave the user to track what the actual
colorspace is.  The other issue is that there would still be
conversion involved.  Both YUYV and YUV420 would still need some
computation to turn it into 24bit packed YUV.  Would there then also
be support to output YUV from an RGB camera, or would an error be
thrown? I could add support to go from * to RGB, YUV, HSV, or
Greyscale, but would that be making the module too big for inclusion
in pygame?  The .so is above 50kb as is.

There are other libraries (pygstreamer for example) that are much
better for encoding to video, but you're right that I do need to come
up with something for image processing.

The image quality improvements are probably the result of your webcam
supporting one of the pixelformats added recently.  Cameras do strange
things with different pixelformats.

Nirav

On Sat, Jun 14, 2008 at 9:51 PM, Michael <zathras@xxxxxxxxxxxxx> wrote:
> On Saturday 14 June 2008 09:19:37 Nirav Patel wrote:
>> For now, I'm pretty much done with what I had planned for the Camera
>> module, after I debug the remaining pixelformat conversions.
>
> Hi,
>
>
> Did you give anythought to being able to pass back the YUV data without
> any conversion - if the camera supports it? It'd be really useful in the case
> that the next step is processing YUV data... (eg encoding to video, or a
> variety of other image processing tasks).
>
>> I'm going to continue to the second part of my GSoC project, which was
>> writing some basic computer vision functions for use with this.
>
> I /suspect/ that passing out YUV will also help with this.
>
> Incidentally, just tried the new version and I note that it must do something
> new in the camera setup now - the quality of images I'm getting out are
> _significantly_ better in low light conditions :-)
>
> Really cool work - many thanks :-)
>
> Best Regards,
>
>
> Michael.
>