Tech Note: RGB Primary Color Mosaic Filters

Tech Note: RGB Primary Color Mosaic Filters

Tech Note: RGB Primary Color Mosaic Filters A common technique to give color sensitivity to a black & white image sensor is the application of a color mosaic filter on top of the sensor. In most cases a three-color red-green-blue (RGB) pattern is used. The In-Sight 1000C color sensor uses a Bayer pattern as its RGB color mosaic filter pattern. With the Bayer pattern, each pixel is covered by a specific color filter, in a specific pattern. Half of the total number of pixels are green (G), while a quarter of the total number is assigned to both red (R) and blue (B), as follows: Figure 1: Bayer Pattern Example Each color pixel is composed of three separate color components: red, green and blue. The missing colors, for each pixel, are interpolated using the surrounding pixels at each location. For example, if a pixel is filtered for green, the value for the green component is known, but the values of the red and the blue components must be calculated from the average value of surrounding red-filtered and blue-filtered pixels. Through software interpolation, each pixel is assigned a value from 0 to 255 for the two unknown color components. Following are examples of how the values for all three color components are calculated for a single pixel. R1 (78) B1 G1 B2 (42) (218) (48) R2 (82) Figure 2: Color Component Calculation – Example 1 The values for each color component of pixel G1 are: RR+ 78+ 82 § Red component value = 1 2 = = 80 2 2 § Green component value = the value of G1 = 218 BB+ 42+ 48 § Blue component value = 1 2 = = 45 2 2 In this example, the values of the RGB components for the above pixel are (80,218,45). R1 G2 R3 (236) (218) (242) G1 B2 G3 B1 (218) (60) (222) R2 G4 R4 (238) (222) (244) Figure 3: Color Component Calculation – Example 2 If output values were given to each pixel, then the values for each color component of pixel B2 are: RRRR+ + + 236+ 238 + 242 + 244 § Red component value = 1 2 3 4 = = 240 4 4 GGGG+ + + 218+ 218 + 222 + 222 § Green component value = 1 2 3 4 = = 220 4 4 § Blue component value = the value of B2 = 60 In this example, the values of the RGB components for the above pixel are (240,220,60). .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us