Bayer filter mosaic has been used in digital cameras as color filter array (CFA) for more than three decades now. The original reason behind using R:G:B in the ratio 1:2:1 in the CFA was that human eye is most sensitive to green[b] . In the present day when tens of megapixels are available in the digital camera, some part of the spatial resolution used by green channel could be used for other purposes (like decreasing noise) without affecting the spatial resolution much. RGBW CFA[a] which has transparent sub-pixels replacing half the green in Bayer array is one such modification which could be useful for photography under very low lighting (and hence noisy) conditions. The purpose of this study was to perform a quantitative analysis of such an RGBW CFA on noise and resolution and compare it against the traditional Bayer CFA.
Bayer and RGBW CFA
Bayer array has red, green and blue filters arranged in a mosaic as shown left. RGBW has one of the green sub-pixels replaced by a transparent sub-pixel as shown right.
Though it may seem that half the resolution in green channel is lost and consequently in the luminance channel, as the sensor pixel size is reduced, this loss in resolution becomes less significant, at least as far as the overall resolution of the imgaing system is concerned. This is one of the major motivations for using RGBW CFA
Modulation Transfer Function (MTF)
MTF is the Fourier transform of the line spread function (LSF), which in turn is the derivative of the
edge spread function (ESF). MTF is calculated on a slanted vertical edge (like one on the right) as follows[c]
The image is linearized, i.e., the pixel levels are adjusted to remove the gamma encoding applied by the camera. The edge locations for the Red, Green, Blue, and luminance channels (Y = 0.3*Red + 0.6*Green + 0.1*Blue) are determined for each scan line (horizontal lines in the given image). A second order fit to the edge is calculated for each channel using polynomial regression. The second order fit removes the effects of lens distortion. In the given image, the equation would have the form, x = a0 + a1*y + a2*y2. Depending on the value of the fractional part fp = xi - int(xi) of the second order fit at each scan line, the shifted edge is added to one of four bins (bin 1 if 0 ≤ fp < 0.25; bin 2 if 0.25 ≤ fp < 0.5; bin 3 if 0.5 ≤ fp < 0.75; bin 4 if 0.75 ≤ fp < 1. The four bins are combined to calculate an averaged 4x oversampled edge. This allows analysis of spatial frequencies beyond the normal Nyquist frequency. This is the ESF. Derivative of ESF yields LSF. Fourier transform of LSF gives MTF.
This is the main figure of merit used in this study to measure CFA performance. This is the frequency at which the MTF or the contrast ratio becomes half the low frequency value. This frequency is considered to be the practical upper limit of the useful spatial frequency supported by the imaging system
This is also obtained from MTF. Aliasing refers to the area of the MTF above the Nyquist frequency as a percentage of the total area. This should be as low as possible
This is the highest spatial frequency where a digital sensor can capture real information. Nyquist frequency fN = 1/(2*pixel spacing). In the MTF, information above Nyquist frequency is not useful.
For the purpose of this study, standard deviation/mean (σ/μ) was used as noise figure. σ/μ was calculated over a gray patch in the test chart. For a perfectly gray patch, σ will be zero and hence the noise figure will be zero. Following this logic, lower the value of σ/μ lower the noise.
For this study, four types of images were used - Bayer, RGB, RGBW and Opponent[a]
This is the image obtained by demosaicing Bayer CFA using bilinear interpolation. The luminance information for this image is calculated by weighted sum of R, G and B channels.
This is the image obtained by demosaicing R,G and B channels from the RGBW CFA. Information from W-channel is discarded and hence the luminance information for this image is also calculated as a weighted sum of R, G and B
RGBW images are interleaved images wherein the luminance information from W-band is used in a non-linear fashion to demosaic the R, G and B channels.
This is a modification of RGBW image wherein the image in converted to YCbCr colorspace and the luminance channel is replaced by the W-channel, hence opponent.