Home > A: Camera Basics > Sensor > History back  Previous chapter  Next chapter  Print  

Color Filter (Bayer Filter)

uEye Camera Manual Version 3.80

Color Filter (Bayer Filter)

For technical reasons, digital image sensors can only detect brightness information, but no color information. To produce color sensors, a color filter is applied to each photocell (pixel). The arrangement of the color filters is illustrated in the following figure. Two out of every four pixels have a green filter, one pixel has a red filter and one has a blue filter. This color distribution corresponds to the color sensitivity of the human eye, and is called the Bayer filter pattern. With the help of the Bayer pattern the correct brightness and color information can be calculated for each pixel. Full sensor resolution is retained.

Figure 26: Bayer RGB filter pattern

Figure 26: Bayer RGB filter pattern

Bayer conversion

A Bayer conversion, also referred to as de-Bayering, is carried out to determine the color information from the raw sensor data (raw Bayer). By default all uEye cameras transmit the image data to the PC in raw Bayer format. The PC then uses the functions of the uEye API to convert the image data to the color format you need for displaying or further processing the data.

GigE uEye cameras additionally allow de-Bayering in the camera. In this case, the color images are already finished when they are transmitted to the PC. This reduces the load on the computer's CPU and increases the transmission bandwidth required by the camera.

To convert the colors, a filter mask moves over the image and calculates a color value for each pixel from the surrounding pixels. The uEye API provides two filter masks that differ in image quality and CPU load.

Normal Quality (Mode IS_CONV_MODE_SOFTWARE_3x3 / IS_CONV_MODE_HARDWARE_3x3)
A smaller filter mask is used for conversion. This algorithm has a low load on the CPU. The filter's averaging function may cause a slight blur. Noise is reduced. This filter is recommended for image processing tasks.
High Quality (Mode IS_CONV_MODE_SOFTWARE_5x5)
A large filter mask is used for conversion. This algorithm offers very accurate color positioning and an increased level of detail. The CPU load is higher than with the normal filter. This filter is recommended for visualization applications.

Hinweis

Software conversion with the large filter mask should only be used for sensors whose green pixels have the same sensitivity. This applies to the following sensors:

All uEye CCD sensors
CMOS sensors of the UI-122x/522x

For all other sensors, we recommend using the standard filter mask.

Figure 27: Bayer conversion using the standard mask

Figure 27: Bayer conversion using the standard mask

See also:

Color conversion: is_SetColorConverter()
uEye Demo: Format

Suggestion for improvement? Send us your short Feedback on this chapter. Thank you very much!


© 2010 IDS Imaging Development Systems GmbH
http://www.ids-imaging.com