6
\$\begingroup\$

Looking at Bayer filter of a typical consumer camera, one can easily see that sensitivity of the filter for each color is all over the place. Are there filters similar to Bayer that do a better job at separating and keeping the sensitivity within each color's own frequency band? What are the visual effects of such a filter?

Spontaneously one would think a more precise filter would give a much better representation of the real view. Canon 450D Quantum Efficiency

\$\endgroup\$
2
  • \$\begingroup\$ @Tetsujin the point is, as the answers show, that "better" does not in any way mean "more separate." There are hyperspectral cameras which are designed not for producing visually accurate images but rather mathematically analyzable spectra. Those cameras in fact do not have any spectral overlap from channel to channel. \$\endgroup\$ Jun 30, 2017 at 11:42
  • \$\begingroup\$ Is it possible to credit a source for the image? I'm citing it in this answer Thanks! \$\endgroup\$
    – uhoh
    Oct 21, 2019 at 6:43

2 Answers 2

10
\$\begingroup\$

The spectral response of color filters on Bayer masked sensors closely mimics the response of the three different types of cones in the human retina. In fact, our eyes have more "overlap" between red and green than most digital cameras do.

The 'response curves' of the three different types of cones in our eyes:
enter image description here

A typical response curve of a modern digital camera:
enter image description here

The IR and UV wavelengths are filtered by elements in the stack in front of the sensor in most digital cameras. Almost all of that light has already been removed before the light reaches the Bayer mask. Generally, those other filters in the stack in front of the sensor are not present and IR and UV light are not removed when sensors are tested for spectral response. Unless those filters are removed from a camera when it is used to take photographs, the response of the pixels under each color filter to, say, 870nm is irrelevant because virtually no 800nm or longer wavelength signal is being allowed to reach the Bayer mask.

Without the 'overlap' between red, green and blue (or more precisely, without the overlapping way the sensitivity curves of the three different types of cones in our retinas are shaped to light with wavelengths centered on 565nm, 540nm, and 445nm) it would not be possible to reproduce colors in the way that we perceive many of them. Our eye/brain vision system creates colors out of combinations and mixtures of different wavelengths of light. Without the overlap in the way the cones in our retinas respond to light of various wavelengths we would not be able to construct color the way that we do. There is no color that is intrinsic to a particular wavelength of visible light. There is only the color that our eye/brain assigns to a particular wavelength or combination of wavelengths of light. Many of the distinct colors we perceive can not be created by a singular wavelength of light.

The reason we use RGB to reproduce color is not because RGB is intrinsic to the nature of light. It isn't. We use RGB because it is intrinsic to the trichromatic way our eye/brain systems respond to light.

If we could create a sensor so that the "blue" filtered pixels were sensitive to only 445nm light, the "green" filtered pixels were sensitive to only 540nm light, and the "red" filtered pixels were sensitive to only 565nm light it would not produce an image that our eyes would recognize as anything resembling the world as we perceive it. To begin with, almost all of the energy of "white light" would be blocked from ever reaching the sensor, so it would be far less sensitive to light than our current cameras are. Any source of light that didn't emit or reflect light at one of the exact wavelengths listed above would not be measureable at all. So the vast majority of a scene would be very dark or black. It would also be impossible to differentiate between objects that reflect a LOT of light at, say, 490nm and none at 615nm from objects that reflect a LOT of 615nm light but none at 490nm if they both reflected the same amounts of light at 540nm and 565nm. It would be impossible to tell apart many of the distinct colors we perceive.

Think of how it is when we are seeing under very limited spectrum red lighting. It is impossible to tell the difference between a red shirt and a white one. They both appear the same color to our eyes. Similarly, under limited spectrum red light anything that is blue in color will look very much like it is black because it isn't reflecting any of the red light shining on it and there is no blue light shining on it to be reflected.

The whole idea that red, green, and blue would be measured discreetly by a "perfect" color sensor is based on oft repeated misconceptions about how Bayer masked cameras reproduce color (The green filter only allows green light to pass, the red filter only allows red light to pass, etc.). It is also based on a misconception of what 'color' is.

How Bayer Masked Cameras Reproduce Color

Raw files don't really store any colors per pixel. They only store a single brightness value per pixel.

It is true that with a Bayer mask over each pixel the light is filtered with either a Red, Green, or Blue filter over each pixel well. But there's no hard cutoff where only green light gets through to a green filtered pixel or only red light gets through to a red filtered pixel. There's a lot of overlap. A lot of red light and some blue light gets through the green filter. A lot of green light and even a bit of blue light makes it through the red filter, and some red and green light is recorded by the pixels that are filtered with blue. Since a raw file is a set of single luminance values for each pixel on the sensor there is no actual color information to a raw file. Color is derived by comparing adjoining pixels that are filtered for one of three colors with a Bayer mask.

Each photon vibrating at the corresponding frequency for a 'red' wavelength that makes it past the green filter is counted just the same as each photo vibrating at a frequency for a 'green' wavelength that makes it into the same pixel well.

It is just like putting a red filter in front of the lens when shooting black and white film. It didn't result in a monochromatic red photo. It also doesn't result in a B&W photo where only red objects have any brightness at all. Rather, when photographed in B&W through a red filter, red objects appear a brighter shade of grey than green or blue objects that are the same brightness in the scene as the red object.

The Bayer mask in front of monochromatic pixels doesn't create color either. What it does is change the tonal value (how bright or how dark the luminance value of a particular wavelength of light is recorded) of various wavelengths by differing amounts. When the tonal values (gray intensities) of adjoining pixels filtered with the three different color filters used in the Bayer mask are compared then colors may be interpolated from that information. This is the process we refer to as demosaicing.

What Is 'Color'?

Keep in mind that equating certain wavelengths of light to the "color" humans perceive that specific wavelength is a bit of a false assumption. "Color" is very much a construct of the eye/brain system that perceives it and doesn't really exist at all in the electromagnetic radiation that we call "visible light." While it is the case that light that is only a discrete single wavelength may be perceived by us as a certain color, it is equally true that some of the colors we perceive are not possible to produce by light that contains only a single wavelength.

The only difference between "visible" light and other forms of EMR that our eyes don't see is that our eyes are chemically responsive to certain wavelengths of EMR while not being chemically responsive to other wavelengths. Bayer masked cameras work because their sensors mimic the way our retinas respond to visible wavelengths of light and when they process the raw data from the sensor into a viewable image they also mimic the way our brains process the information gained from our retinas.

\$\endgroup\$
8
  • 1
    \$\begingroup\$ Excellent writing, I hope this helps a lot of people. Still, do you have any comment on the precise question at hand, are there filters with help of which one could recreate the "RGB colors" with very little overlap and without ultra violet and infra red playing a significant role? \$\endgroup\$ Jun 29, 2017 at 19:57
  • \$\begingroup\$ The IR and UV are filtered by elements in the stack in front of the sensor in most digital cameras. Most of that light has already been removed before the light reaches the Bayer mask. Unless those filters are removed the response of the pixels under each color filter to, say, 800nm is irrelevant because virtually no 800nm signal is being allowed to reach the Bayer mask. \$\endgroup\$
    – Michael C
    Jun 29, 2017 at 20:04
  • \$\begingroup\$ What is the purpose of desiring "very little overlap?" Without overlap color as we perceive it does not exist. \$\endgroup\$
    – Michael C
    Jun 29, 2017 at 20:06
  • \$\begingroup\$ As we percieve them - yes. However you would still see a picture and it would be based on the three distinct peaks of red/green/blue. It would be different, but it's wouldn't be meaningless. \$\endgroup\$ Jun 29, 2017 at 20:18
  • \$\begingroup\$ The very definition of "color" is that which we perceive. "Color" is not a physical property of anything in the universe. 'Color" is what we perceive when we look at the physical universe. Without perception there is no color. There is only electromagnetic radiation of a certain wavelength. We can't see radio waves, even though there is no fundamental difference between visible light at wavelengths of 540 nanometers and FM radio signals with wavelengths of 2.77-3.4 meters, or AM radio signals with wavelengths of 187-545 meters. \$\endgroup\$
    – Michael C
    Jun 29, 2017 at 20:30
2
\$\begingroup\$

The color filter is supposed to mimic our eyes perception of color, it does so imperfectly, but usually well enough. The way we understand color perception is based on opponent process theory. For example you can see that the "red" filter sensitivity is bimodal, this is supposed to mimic the eyes perception of "red" at both very low and high wavelengths. Another feature of the above plot is the relatively wide frequency bands, this mimics the eye's response to the color spectrum. If the bands were too narrow monochromatic light in between the maximums would appear overly dark. The "horrible" plateau and artifacts above around 700nm are actually cut off by the IR filter on the sensor so those photons are not registered. The filters are not perfect but as I understand they are somewhat restricted by the economics of the CCD array manufacturing process.

For an alternative way of registering color information see a) the Foveon sensor, although its bands are even wider. b) 3 CCD systems (though only for capturing movies) that supposedly give better color accuracy by mimicking our eyes color response more accurately (although modern dslr's have pretty good color accuracy). The manufacturing process tolerances only allow for large photo-sites which correspond to 1-2mp resolution so this is unfeasible in stills photography at the current moment.


Edit For a better explanation of how cones translate to color in our eyes as understood by the opponent process theory see: http://www.huevaluechroma.com/014.php
This rises the question, of whether a) the blue band shouldn't be actually more narrow, and if instead of another green pixel in the Bayer array it wouldn't be better to just add a yellow wide band filter to mimic the human perception even closer. This may be implemented in color interpolation during demosaicing, and less green pixels may mean prohibitively more luminance noise. Maybe someone with more experience in CCD array technology would know why this isn't done

\$\endgroup\$
3
  • \$\begingroup\$ The "red" filters in most Bayer masks are actually centered somewhere between a slightly green tint of yellow and a yellowish-orange color (somewhere between 560-580nm). They're not actually "red" (640nm). \$\endgroup\$
    – Michael C
    Jan 14, 2019 at 7:06
  • \$\begingroup\$ We do use actual red in our emitted displays. But the values collected by sensors with sensitivity peaks around 455, 545, and 680 nanometers are translated to the values needed by a device that emits at about 480, 535, and 640 nm to produce the same response in human retinas. \$\endgroup\$
    – Michael C
    Jan 14, 2019 at 7:09
  • \$\begingroup\$ The previous comment should read: "We do use actual red in our emitted displays. But the values collected by sensors with sensitivity peaks around 455, 545, and 580 nanometers are translated to the values needed by a device that emits at about 480, 535, and 640 nm to produce the same response in human retinas." \$\endgroup\$
    – Michael C
    Feb 13, 2019 at 0:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.