All digital camera light sensors operate in basically the same way. They rely on the ability of certain semiconductor materials to convert light into electrical charge, in much the same way as the solar cell does on a solar-powered calculator. A digital camera sensor consists of millions of microscopic light-sensitive cells arranged in a grid on a wafer of silicon. Each one of these cells generates an electrical charge when it is struck by a photon (a particle of light). The brighter the light, the greater the number of photons, and thus the larger the electrical charge that is produced. The charges from all of these millions of photocells are fed into the cameraâ€™s image processing system, which combines them into the digital image which is saved on your memory card.
The individual photocells in a camera sensor can only detect the brightness of light, not its colour, so a coloured filter is placed over each cell. A coloured filter only transmits light of the same colour, and blocks out all other colours. So for example if a cell has a red filter over it, that cell will now only detect red light.
By arranging filters of the three primary colours â€“ red, green and blue â€“ in a regular pattern over each cell in the sensor, all three colours can be detected. In nearly all digital camera sensors, the filters are laid out in a mosaic pattern of two green filters to every one of red and blue, because the human eye is more sensitive to green light. This type of filter is called a Bayer mask filter, after Dr. Bryce E. Bayer of Kodak who invented it.
In this way, the signals from each group of colour-filtered sensor cells can be decoded, or â€œdemosaicedâ€ by the image processor to detect the full spectrum of colours. By calculating the red, green and blue values for each pixel location, a full colour image is produced.
Of course this means that the individual pixels of your final image do not literally represent an individual photocell on the sensor. In fact the colours of each pixel are calculated, or â€œinterpolatedâ€ from the colour values of a group of four photocells.
Below is an actual photograph, taken through a microscope, of the Bayer mask filter and the individual sensor cells below it, on the CCD in a Nikon digital camera. Each individual photocell on an APS-C size sensor measures just 0.006mm across, while compact camera sensors are even smaller. Itâ€™s an incredible feat of microminiaturisation.