This page is not fully translated, yet. Please help completing the translation.
(remove this paragraph once the translation is finished)
Basic Color Processing
Digital cameras can capture color images, but the color processing in a camera is a highly complex and crucial process.
Manufacturers typically do not disclose the details of this process, but the basic concepts remain the same. When a camera captures a real-world scene, how does it reproduce the image as seen by the human eye?
1. RAW —- The Original Image Captured by the Camera
The vast majority of color image sensors use a Bayer pattern, which employs red, green, and blue color filters. Therefore, each pixel can detect only one color, “seeing” either red, green, or blue. Since green is the most important color for luminance information, two pixels are used for green, one for blue, and one for red.
2. Demosaicing
To obtain the red, green, and blue information for each pixel, a crucial step in demosaicing is to interpolate the missing information. This directly affects image quality, which is why many manufacturers do not disclose the details of their algorithms. Different color filters result in different light sensitivities and relatively low signal strengths, so noise levels can vary significantly. During the demosaicing process, noise spreads among adjacent pixels, and the noise in different color channels becomes correlated.
3. White Balance
In digital cameras, the sensitivities of different color channels vary. To obtain accurate colors that match human vision, the camera controls the gain of each channel differently. After white balance processing, neutral areas in the image appear neutral, and the values for red, green, and blue are nearly identical.
4. Color Correction Matrix (CCM)
Every camera has its own spectral sensitivity, resulting in a specific RGB output for each camera. To achieve consistent results across all cameras, the camera's RGB values must be converted into a standard, well-defined color space, which in most cases is sRGB, but can be any other color space. To convert values from RGB_camera to sRGB, a 3×3 color correction matrix (CCM) must be applied to the data.
5. Gamma
Whether inspecting dark or bright areas in the image, up to this step, the image data remains linear. Therefore, doubling the light intensity doubles the values in the image. To achieve correct representation on output devices, a gamma function is typically applied to the image. This curve is applied in the final stage of image processing, because from this point on, the image data becomes non-linear, beginning to approximate the image as perceived by the human eye.







