[cpia] VIDIOCSWIN/reset_camera_struct and weird colors

Peter Pregler Peter.Pregler@risc.uni-linz.ac.at
Thu, 24 Feb 2000 18:03:53 +0100 (CET)


On 24-Feb-2000 Nicolas Roussel wrote:
> 
> Hi,
> 
> I use a USB Creative Webcam II with Linux 2.3.47. I really like the
> 0.7.1 driver which is far better than the one in the kernel...

Nice to hear. :) Can you give us any performance numbers? What frame-rate
do you get with USB? I see you get the full 15fps. Can you try 30fps as
sensor rate with and without compression? And how is the CPU-load? I do
ask because parport-thruput is limited by the hardware (and some
implementatio detail I do no understand) and I would like to know if there
is any optimisation necessary for the conversions etc. done in the
v4l-layer. And of cause I want to envy the usb-guys. :)

> However, I found two strange things.
> 
> 1) VIDIOCSWIN and reset_camera_struct

I never really understood the v4l-api here. And I took a break with driver
writing and chose to read some good books instead. :) But will start again
this weekend. I will have a look at that. It might be that some race (what
the camera delivers is different from what the application has set as
target) is causing here the problems. It was never clear to me at what
point the camera does honor and use the settings one sends to it. For
instance I was never able to get the first image in a grab in the format
and compression mode I wanted. That's the reason for dropping the very
first frame read from the camera. It might be a similar problem here. Has
anyone understood this part of the camera setup?

> 2) weird colors
> 
>   I keep getting images with yellowish/greenish colors. You can see an
>   example at http://fit.gmd.de/~roussel/CPiA/ (left is good, right is
>   bad...).

Hmmm, I have never seen such wired colors. Can you compare the proc-output
of the bad and the good image. Compared to my settings here you have
strange color compensation values. I have 200-something for all four
values. Those are set only in the reinitialisation (open/close) routines.
Does this happen during normal streaming operation or is there a
open/close in between? They should change only slightly over time in
normal operation. All the zeros are very strange in your case.

>   The first image is ALWAYS good. So I guess this has to do with
>   auto-expose or something like this. The first image is also always
>   better (smoothed). I put the output of /proc/cpia/video0 at the end
>   of this message.

I have also noticed that the first picture seems to be smoother sometimes.
Though I always thought that is because the first picture is loaded
without compression and because of the longer download more of a still
image. My image is rather noisy if something is moving. Can you check if
those two things could be the reason?

Here is your color compensation: 

> red_comp:                      0       220       255       220
> green1_comp:                   0       214       255       214
> green2_comp:                   0       214       255       214
> blue_comp:                   137       230       255       230

This is mine:

red_comp:                    220       220       255       220
green1_comp:                 214       214       255       214
green2_comp:                 214       214       255       214
blue_comp:                   230       230       255       230

Greetings, Peter

PS: I will add a save/load to the control-client over the weekend. So we
can exchange settings in a better way.


-------------------------------
Email: Peter.Pregler@risc.uni-linz.ac.at
WWW:   http://www.risc.uni-linz.ac.at/people/ppregler

_______________________________________________
cpia mailing list  -  cpia@risc.uni-linz.ac.at
http://mailman.risc.uni-linz.ac.at/mailman/cgi-bin/listinfo/cpia