• site home
  • blog home
  • galleries
  • contact
  • underwater
  • the bleeding edge

the last word

Photography meets digital computer technology. Photography wins -- most of the time.

You are here: Home / The Last Word / Contrast Sensitivity Functions and the Bayer Array

Contrast Sensitivity Functions and the Bayer Array

May 2, 2014 JimK 1 Comment

In this post , I looked for drop offs in chromaticity in the octave or two before the highest image frequencies, and failed to find them. Some had hypothesized that such a drop would be a reason for the relative undersampling of chromatic versus achromatic information in the Bayer Color Filter Array (CFA). I did find that chromaticity changes, measured in CIELab, were smaller than luminance changes over broad spatial frequency ranges in the sample images, but this is more of an argument for sampling chromaticity with reduced resolution than it is for rolling off the effective sampling frequency in the highest octave of sampled chromatic spatial frequencies, like the Bayer CFA does.

However I will attempt, using the material that I’ve presented over the last few posts about the way that the human eye responds to luminance and chromaticity changes versus spatial frequency, to argue that the Bayer CFA’s color choices are sensible because of the way we see.

Let’s review the Bayer pattern. It looks like this:

Bayer pattern

Of all the sensels, half respond to green light, a quarter to red, and a quarter to blue. The camera primaries are not sRGB. However, we can get a rough idea of how the various primaries contribute to luminance by looking at that color space. In sRGB, after linearizing, linear luminance (not the cube-rooted luminance in CIELab) is determined with the following equation:

Y = 0.2126R + 0.7152G + 0.0733B

The green component is almost three-quarters of the overall luminance. Thus, green can serve as a rough stand-in for luminance.

The pixels which are not sensed directly by the Bayer CFA must be generated in the demosaicing operation, either by interpolation from the sensels with that color filter, or from more complicated operations. Looking at just the green pattern of the Bayer CFA.

green bayer

You can see that, except at the edges of the image, each blank in the green pattern is completely surrounded by green pixels that can be used for interpolation or other estimation.

Now, let’s look at the red pattern:

red bayer

Some blank pixels have red sensels both above and below them. Interpolation using those squares will have half as much real-world data as in the case of the green pattern. In addition, there red pixels with no sensels at all above, below, to the right, or to the left of them. To interpolate information for these pixels, we need to look at the four sensels at the corners of the missing pixel. Now we have four sensels to use, as in the green case, but they are 1.4 times as far away.

Since the blue Bayer pattern is the red pattern shifted, everything in the paragraph above also applies to the blue pattern.

Interpolation is basically a lowpass function. Most of the other demosaicing techniques share that tendency. To the degree that most of the chromaticity information in the Bayer pattern resides in the red and blue portions of the pattern, the luminance component of an image reconstructed from will extend to higher spatial frequencies than those of the chromaticity components.

When the image is to be viewed by a human, any sizing aimed at producing the largest possible high-quality image will place the highest spatial frequencies of the luminance component on the steep slope to the right of the CSF curves. Along that whole slope, the chromaticity discrimination is almost two octaves worse than the luminance discrimination, so any loss in chromaticity resolution that stays within that amount won’t be noticed. The kinds of chromaticity resolution loss associated with demosaicing Bayer CFAs are at most a factor of two, or one octave, well within the safe region.

There are implications here for noise reduction. Performing noise reduction in general blurs the image. We don’t want to blur the luminance part of the image much, but, as we’ve seen, some blurring of the chromaticity parts will be invisible. The noise reduction tools in Lightroom and many other raw developers have separate controls for luminance and chrominance. It may look like you’re damaging the image if you pixel peep at a high magnification while manipulating the chrominance control, but, as long as the loss of chromaticity detail is only an octave or so from the level of luminance detail, you’re not hurting anything visible.

The Last Word

← Contrast Sensitivity Functions and Photography Camera vs sensor resolution →

Comments

  1. Zachery says

    May 2, 2014 at 1:39 pm

    Do you have any intention of making a comparison between bayer CFA and Fuji’s “X-Trans” semi-random CFA?

    I, for one, would find a technical breakdown and comparison of the two to be interesting.

    (And just in case you’re not aware of what I’m referring to: http://en.wikipedia.org/wiki/Fujifilm_X-Pro1#Fujifilm_.22X-Trans.22_CMOS_sensor )

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

May 2025
S M T W T F S
 123
45678910
11121314151617
18192021222324
25262728293031
« Apr    

Articles

  • About
    • Patents and papers about color
    • Who am I?
  • How to…
    • Backing up photographic images
    • How to change email providers
    • How to shoot slanted edge images for me
  • Lens screening testing
    • Equipment and Software
    • Examples
      • Bad and OK 200-600 at 600
      • Excellent 180-400 zoom
      • Fair 14-30mm zoom
      • Good 100-200 mm MF zoom
      • Good 100-400 zoom
      • Good 100mm lens on P1 P45+
      • Good 120mm MF lens
      • Good 18mm FF lens
      • Good 24-105 mm FF lens
      • Good 24-70 FF zoom
      • Good 35 mm FF lens
      • Good 35-70 MF lens
      • Good 60 mm lens on IQ3-100
      • Good 63 mm MF lens
      • Good 65 mm FF lens
      • Good 85 mm FF lens
      • Good and bad 25mm FF lenses
      • Good zoom at 24 mm
      • Marginal 18mm lens
      • Marginal 35mm FF lens
      • Mildly problematic 55 mm FF lens
      • OK 16-35mm zoom
      • OK 60mm lens on P1 P45+
      • OK Sony 600mm f/4
      • Pretty good 16-35 FF zoom
      • Pretty good 90mm FF lens
      • Problematic 400 mm FF lens
      • Tilted 20 mm f/1.8 FF lens
      • Tilted 30 mm MF lens
      • Tilted 50 mm FF lens
      • Two 15mm FF lenses
    • Found a problem – now what?
    • Goals for this test
    • Minimum target distances
      • MFT
      • APS-C
      • Full frame
      • Small medium format
    • Printable Siemens Star targets
    • Target size on sensor
      • MFT
      • APS-C
      • Full frame
      • Small medium format
    • Test instructions — postproduction
    • Test instructions — reading the images
    • Test instructions – capture
    • Theory of the test
    • What’s wrong with conventional lens screening?
  • Previsualization heresy
  • Privacy Policy
  • Recommended photographic web sites
  • Using in-camera histograms for ETTR
    • Acknowledgments
    • Why ETTR?
    • Normal in-camera histograms
    • Image processing for in-camera histograms
    • Making the in-camera histogram closely represent the raw histogram
    • Shortcuts to UniWB
    • Preparing for monitor-based UniWB
    • A one-step UniWB procedure
    • The math behind the one-step method
    • Iteration using Newton’s Method

Category List

Recent Comments

  • JimK on Goldilocks and the three flashes
  • DC Wedding Photographer on Goldilocks and the three flashes
  • Wedding Photographer in DC on The 16-Bit Fallacy: Why More Isn’t Always Better in Medium Format Cameras
  • JimK on Fujifilm GFX 100S II precision
  • Renjie Zhu on Fujifilm GFX 100S II precision
  • JimK on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF
  • Ivo de Man on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF
  • JimK on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF
  • JimK on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF
  • Ivo de Man on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF

Archives

Copyright © 2025 · Daily Dish Pro On Genesis Framework · WordPress · Log in

Unless otherwise noted, all images copyright Jim Kasson.