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

Re: [pygame] Camera module change proposal



Hello Nirav,

For #1, I can say that YUV colorspace is much faster than RGB to
upload to the graphic card when using OpenGL. If for now it is only
RGB that is implemented, it would surely be nice to have the
possibilty to use YUV directly in a near future.

For #2, on Mac OS X, there is at least the "Quicktime Dialog" that can
offer a lot of fine controls on the image source and quality. It
surely should be implemented in the first place.

Regards,

a



2009/5/18 Nirav Patel <olpc@xxxxxxxxxxxxxx>:
> Hello all,
>
> With 1.9 coming out soon, I think it is best that we decide on a final
> API for the camera module to use going forward.  The current module
> was designed largely for v4l2 on low performance fixed point CPUs, and
> the API reflects that.  With OS X support coming this summer from
> Werner, and Windows support coming soon, we should decide on something
> that works well across all platforms.
>
> 1.  Remove colorspace conversion from the camera module:
> Currently, the camera module can "capture" images as RGB, YUV, or HSV.
>  There are a lot of conversion shortcuts going on under the hood to
> get the quickest path from raw pixel data to the desired colorspace.
> Unfortunately, this also multiplies the amount of code and work
> necessary to bring the camera module to other platforms.  The use
> cases for this feature are also fairly limited, since anyone doing
> serious computer vision is better off using OpenCV.  I propose having
> the camera module do the more relevant task of just capturing RGB
> images, and have a seperate colorspace conversion function, either the
> transform or the color module, which takes any RGB surface and outputs
> an HSV or YUV surface.
>
> 2.  Camera controls:
> I'm not sure what to do here.  V4l2 controls are very useful to have,
> but there doesn't seem to be a Windows or OS X equivalent as far as I
> can tell.
>
> Any ideas on either?
>
> Nirav
>



-- 
Alexandre Quessy
http://alexandre.quessy.net/