agorabasta wrote:dkloi wrote:
You're forgetting the second (primary) layer which also has to be taken into account when doing interpolation/reconstruction of the final image. There's nothing magical about CA. If it's there at the image plane, it'll be treated exactly like any part of the image. I'm not really following you when you say "blurred by CA".
Cheers,
Daniel.
In your case the luma is a sum of cyan+yellow+red+blue. The spatial info in both cyan and yellow is created by a pair of colours deviating due to CA. Hence your luma inevitably is blurred.
Then you sure can apply correction to your chroma channels, but it ain't gonna make your pic any sharper since luma is blurred anyway.
Again, you're forgetting the second layer of Red and Blue and how demosaicing works. E.g. A cyan pixel in the first layer is paired with a red pixel directly underneath, a yellow with a blue. In most, if not all, all demosaicing algorithms, luminance information at a particular pixel in the final image is actually determined by a region of source pixels in the RAW image, this region will have many samples of Cyan, Yellow, Red and Blue, and the final pixel value depends on a weighted sum of these (depending on the location of the source data with respect to the output pixel). Hence spatial information in the colour channel can be reconstructed (up to a spatial frequency cut-off intermediate to that of conventional Bayer and Foveon).
One way to look at it is to decompose the reconstruction into luminance, and red and blue channels (from which the green channel naturally can be derived).
Luminance comes just by adding the values of the pixels above each other.
The crudest but simplest to understand Red and Blue reconstruction comes by interpolating the red and blue sub-lattices respectively.
In a Bayer RGB sensor, you can do the same thing, but this time reconstruct the Red Green and Blue channels by doing interpolation of the red, green and blue sub-lattices independently.
Since in the two-layer approach, the red and blue sub-lattices are twice as dense as those of the RGB Bayer, this reconstruction is more accurate. Needless to say, the green and luminance channels of the two-layer approach are also reconstructed more accurately.
There are more advanced reconstruction algorithms which use correlations between channels in real world imagery to enhance certain pictorially important information (like edges) but in the whole, the greater amount of spatio-chromo samples in the two layer approach will lead to better results than the conventional RGB Bayer.
The best way to see this is to code up a demosaicing algorithm for both RGB Bayer and a two-layer approach, but it'll have to wait till I have a spare day.
Cheers,
Daniel.