Discussion:
[linux-uvc-devel] MS LifeCam VX-6000 driver development pointers wanted
Marty G
2014-10-07 12:56:46 UTC
Permalink
Hi,
I have several vx-6000 webcams that I want to use for a sailboat webcam
system. They work great under windows, but under linux they are washed
out, too bright, or overexposed, when used outdoors. This is a known issue
with these cams under linux and I suspect the gspca_sn9c20x or related
driver needs tweaking with regards to how it handles the gain, gamma,
brightness or something.

I have a programming background and have done non-driver related coding in
linux, mostly web, openwrt, and admin related stuff using perl and c, but
could use some pointers in how to set up a dev environment specifically for
tweaking a driver for this cam and pointers on how I might tease info from
how the windows driver works so much better.

Links to linux driver and webcam driver specific dev howtos, techniques,
dev environment, etc completely welcome!


*Marty Galyean*
*IT / Network / WiFi Engineer 252.289.9808 ***@gmail.com
<***@gmail.com>*
Oleksij Rempel
2014-10-07 13:34:45 UTC
Permalink
Hi Marty,
Post by Marty G
Hi,
I have several vx-6000 webcams that I want to use for a sailboat webcam
system. They work great under windows, but under linux they are washed
out, too bright, or overexposed, when used outdoors. This is a known
issue with these cams under linux and I suspect the gspca_sn9c20x or
related driver needs tweaking with regards to how it handles the gain,
gamma, brightness or something.
can you please provide some comparison images?
Post by Marty G
I have a programming background and have done non-driver related coding
in linux, mostly web, openwrt, and admin related stuff using perl and
c, but could use some pointers in how to set up a dev environment
specifically for tweaking a driver for this cam and pointers on how I
might tease info from how the windows driver works so much better.
Links to linux driver and webcam driver specific dev howtos, techniques,
dev environment, etc completely welcome!
I think, first of all you need some basic understanding of how image
processing is going. Her is one simple example, just googling for this
keywords may help you:
- camera controller will grab the date from image sensor in RAW Bayer
mosaic.
- according to the frame rate, frame resolution and cpu speed of
controller, will be choicet one of demosaicing algorithms. At this stage
happens all demosaicing magic.
- here or may be before demosaicing, camera should do all light and
color related measurements and correction.
- last stage is format conversation. Here we will get YUV or JPEG or
x264 or all together.
- it will be transferred to the host system over usb.

As you can see, all important measurements happen before frame will
arrive host system. Some device like some Logitech webcams provide
access to different stages of image procession pipe. For example it
provide light intensity measurement and call it "TrueLight". All this
kind of extras can be defined by usb descriptor as extension unit EU
with special UUID. All known EU/UUIDs should be located in
/usr/share/uvcdynctrl/data

Till now i reversed only one undocumented EU.

Driver should not be responsible for any kind of correction.
--
Regards,
Oleksij
Oleksij Rempel
2014-10-07 14:00:09 UTC
Permalink
Thanks for the response, Oleksij.
I understand that the driver doesn't actually make the corrections, but
had thought the driver told higher level controls how to tell the
hardware how to do things like adjust brightness, gain, gamma etc. And
also had thought that perhaps this was done with the driver passing the
settings along to the hardware. My guess is that the current way that
the vx-6000 is told to change these settings is not working right. As
an example, perhaps the range of brightness or gain or exposure values
allowed on the higher level doesn't map correctly to what the controller
and image chip understand. I really don't know what the issue is, but
am hoping to find it. What code would I look at to be able to compare
what values are sent to the cam if I want to compare to the
specifications for the image and controller chips involved if not the
driver? Thanks again!
In case of UVC device, camera will provide the list of available
controls like brightness, gain, gamma.

In case vx-6000, i assume it is not UVC device. So actually not right
maeling list.

In any case, it this kind of problems i would start with comparing usb
dumps of different systems. You need to find the difference between
windows driver and linux driver.
*Marty Galyean
*
Hi Marty,
Post by Marty G
Hi,
I have several vx-6000 webcams that I want to use for a sailboat webcam
system. They work great under windows, but under linux they are washed
out, too bright, or overexposed, when used outdoors. This is a known
issue with these cams under linux and I suspect the gspca_sn9c20x or
related driver needs tweaking with regards to how it handles the gain,
gamma, brightness or something.
can you please provide some comparison images?
Post by Marty G
I have a programming background and have done non-driver related coding
in linux, mostly web, openwrt, and admin related stuff using perl and
c, but could use some pointers in how to set up a dev environment
specifically for tweaking a driver for this cam and pointers on how I
might tease info from how the windows driver works so much better.
Links to linux driver and webcam driver specific dev howtos, techniques,
dev environment, etc completely welcome!
I think, first of all you need some basic understanding of how image
processing is going. Her is one simple example, just googling for this
- camera controller will grab the date from image sensor in RAW Bayer
mosaic.
- according to the frame rate, frame resolution and cpu speed of
controller, will be choicet one of demosaicing algorithms. At this stage
happens all demosaicing magic.
- here or may be before demosaicing, camera should do all light and
color related measurements and correction.
- last stage is format conversation. Here we will get YUV or JPEG or
x264 or all together.
- it will be transferred to the host system over usb.
As you can see, all important measurements happen before frame will
arrive host system. Some device like some Logitech webcams provide
access to different stages of image procession pipe. For example it
provide light intensity measurement and call it "TrueLight". All this
kind of extras can be defined by usb descriptor as extension unit EU
with special UUID. All known EU/UUIDs should be located in
/usr/share/uvcdynctrl/data
Till now i reversed only one undocumented EU.
Driver should not be responsible for any kind of correction.
--
Regards,
Oleksij
--
Regards,
Oleksij
Loading...