Re: Questions about writing a new webcam driver (3Com Homeconnect)

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



On Thursday 10 January 2002 11:17 am, Alan Cox wrote:
> Can you describe the format in more detail ?

Well, I'll try...

The luminance is extracted as the average value of the pixel being decoding 
and the one horizontally adjacent to it.  The chrominance information is 
stored as lower bandwidth values stacked on top of these.  The difference of 
adjacent pixels in odd rasters covers a line on the color wheel going from 
magenta/blue to green/yellow.  Even rasters encode red and cyan.  As a simple 
example, consider a 2x2 pixel matrix:

160 085
064 190

The pixel being decoded here would be represented by the value at 0,0.  The 
luminance of the pixel is 122 ([160 + 85]/2).  The magenta/blue - 
green/yellow chromaticity value is 75 (160-85), and the red - cyan 
chromaticity value is -126 (64-160).  Pump this through an equation looking 
rather similar to a YUV-to-RGB conversion and you get a fairly high quality 
color image (well, after some gamma correction, rescaling and sharpening).  
In the next pixel over (where 85 would be the upper left) you have to flip 
the sign of the result of the chromaticity calculations of course.

The project has an older sourceforge web page where the guy who reversed 
engineered the color encoding did a write up of his findings 
(http://homeconnectusb.sourceforge.net/indexold.html) and all our source code 
and other banter is up on that sourceforge project site.





[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