Re: V4l grabbing problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, 2002-05-29 at 07:42, Steve Miller wrote:
> anands@xxxxxxxxxxxxxxxx wrote:
> > Hi
> > 
> >   Im using IBM webcam and i have written a code for continous video 
> > grabbing... But the image is coming in a blue screen,.. the x11 window 
> > is fully blue in color and if i show movement infront of the camera im 
> > able to see the slight changes in the screen.. what might be the problem ?
> > 
> > my settings are
> > brightness=32767
> > whiteness=32767
> > color=32767
> > hue=32767
> > depth=16
> > palette=RGB24

> All of your parameters are wrong.  RGB24 has a depth of 3 bytes, or 24 
> bits.

I don't know why he included color depth of his X server into this, it
has nothing to do with the driver. 15 or 16 bits depth is standard and
preferred for many video cards (especially TNT2 with OpenGL - it is
explicitly recommended for performance).

> All the other values are at their maximum, including hue, which 
> is probably telling the camera to make the image as blue as possible.

These values are unsigned 16-bit values:

/usr/src/linux/include/linux/videodev.h
=======================================
struct video_picture
{
        __u16   brightness;
        __u16   hue;
        __u16   colour;
        __u16   contrast;
        __u16   whiteness;      /* Black and white only */
        __u16   depth;          /* Capture depth */
        __u16   palette;        /* Palette in use */

This makes his values to be centered just right. The driver defaults to
these values, and probably he didn't change them (correctly).

ibmcam driver does not apply hue correction as it should be (because
nobody knows how to program camera's registers to do it right, probably
a proprietary table is involved). If pushed to the edge, the pucture
will become either green or pink, but not blue - and the Y channel won't
be affected anyhow.

Since all other v4l apps (he tested with xawtv and OpenH.323) work fine
on his box and with this camera, I suggested (off list) that his own v4l
app has a bug somewhere, and probably it waits for a frame without
properly asking for it. Obviously, if xawtv works and his app does not,
then it clearly indicates where the problem is.

Cheers,
Dmitri

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux