Need Help about Demosaising and Color Depth/Tonal Values

Quantum3Quantum3 Registered Users Posts: 54 Big grins
edited March 11, 2009 in Digital Darkroom
Hi,

I know what's demosaising and color depth, bayer filter, sensors, ACD, S/N and most of the technical stuff, but I have a question and hope some grinner could drop some help since I could'nt obtain an answer by browsing the Internet.

I'm starting to think that (will put a 9mp sensor as something figurative):

1) A 9mp sensor has a Bayer Filter before of it.
2) This Bayer Filter, filters the respective color that belongs to each filter's color.
3) We have then, the mosaising.
4) So, the true color is just 1/3 per mosaic, the others are generated by interpolation by the ADC.

Conclusions (self deduction):

1) Each color is fragmented in mosaics.
2) The sensor is divided by these mosaics which are 3 (RGB).
3) So, a 9mp sensor has 3mp per mosaic.
4) When demosaising occurs, we have the composition, which is the sum of the 3 mosaics RGB and, in consecuence, the 9mp of the sensor, fully covered. (Sounds like a Gif file or Indexed files).

I'm starting to think that a demosaised RAW of any bits has 1/3 of the whole tonal values. For example, a 12 bits RAW File, which has 4.096 tonal values in total (I assume after demosaising) has 1365.33 tonal values per each channel, depicting the color interpolation.

But I have a doubt, because a JPEG (256 tonal values per channel) will have, in this statement, 85.33 tonal values per mosaic...

Suppose we have a 12 bit file.

This file has 12 bits (4.096 possible tonal values) per mosaic? or just in the whole composition, the sum of the 3 mosaics, and just in the demosaising we achieve those 4.096 possible tonal values?

I'm asking this because I cannot find in Google if those 4.096 possible tonal values are per mosaic or they become that amount in the demosaising process.

Thanks in advance. I will appreciate a lot some light in this matter :)

Mart :)

Comments

  • David_S85David_S85 Administrators Posts: 13,237 moderator
    edited March 6, 2009
    thread bump
    My Smugmug
    "You miss 100% of the shots you don't take" - Wayne Gretzky
  • TheSuedeTheSuede Registered Users Posts: 23 Big grins
    edited March 11, 2009
    The very quick answer is.... no!

    First, the CFA array is RGGB, which means half the sensors are green filtered, 1/4 are red and 1/4 are blue.

    Maybe it's easier to see it like if you take a full-colour RGB picture, and then remove two of the primaries from each pixel. If a pixel was [R,G,B]-[150,100,200] before, it will now be [R,G,B]-[150,x,x] if the pixel is behind a red colour filter in the CFA.

    So, for each pixel from the sensor, only one value is reported in the raw - and the raw-converter has to hazard a guess at the remaining (missing) two colours, weighing in the pixelvalues around itself to make the guess more correct. The way that this is done is what makes the raw-converters differ (except for ergonomics and other such things).

    So, the de-mosaiced picture is indeed "full" colour, but two of the primaries are guesses.

    This is far to complicated to repeat all over again, so try the net and google.

    http://en.wikipedia.org/wiki/Bayer_filter
Sign In or Register to comment.