Individual photosites within the sensors of digital cameras are colour blind in the sense that they are capable only of determining the intensity of light falling upon them. They are not capable of recording the wavelength, and hence the colour, of the incident light. Most cameras therefore use some form of filtering to obtain colour information, because alternative approaches tend to be very expensive and involve more processing than is currently practicable.
Some expensive three-CCD digital cameras use a beam splitter to direct light to each of three different sensors. Each sensor is equipped with a selective filter and records only the intensity of the red, green or blue light falling upon individual pixel locations. The three sensor outputs are then combined to create a high quality colour image featuring improved resolution and lower noise. This system is effective but expensive, relatively bulky and processor intensive.
The sensors in most digital cameras incorporate a grid of individual pixels over which a Bayer filter is positioned. This filter consists of a mosaic of red, green and blue filters aligned with individual pixels. Each pixel therefore records only the intensity of the filtered red, green or blue light falling upon it. The amount of light of the other two colours is then established by examining the relevant values recorded by neighbouring pixels - a process known as "interpolation" executed by a demosaicing algorithm. The disadvantage of the system is that only one third of the colour information in an image is recorded. The remaining two thirds must be obtained by examining colour information in adjacent photosites and using interpolation techniques.
Interpolation using a demosaicing algorithm is processor-intensive and imperfect, and cannot be performed using the best available algorithms due to limitations of in-camera processor power. Less effective but simpler algorithms are consequently used to convert images from their RAW form to other file formats such as JPEG. However, these compromise algorithms can introduce visual artifacts such as coloured lines replacing well-defined areas of black and white - a phenomenon known as Moiré. This is one of the reasons why images stored in-camera in JPEG format can never equal the quality of RAW images.
When RAW images are converted to other formats on a personal computer, which has much more processing power than a camera's processor, the best algorithms can be used and the conversion is made to a higher standard.
Only the Foveon sensor, which captures the intensity of red, green and blue light for each individual pixel, can overcome these limitations in a single sensor camera.