bayer pattern

3彩色数字相机需要3个单色sensor获得彩色图像的R,G,B分量,成本较高。

单CCD获得彩色图像的方法是在 CCD表面覆盖1个只含红、绿、蓝3色的马赛克滤镜,对其输出信号通过一定的处理算法实现。

这个设计理念最初由拜尔提出,所以这种滤镜也被称作拜尔模板 (bayer pattern)。

The Bayer color filter array (CFA)  is shown below.

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).

image

In order to obtain this color information, the  color image sensor is covered with either a red, a green, or a blue filter, in a repeating pattern.

This pattern, or sequence, of filters can vary, but the widely adopted “Bayer“pattern, which was invented at Kodak, is a repeating 2x2 arrangement.

clip_image002clip_image002[4]

When the image sensor is read out, line by line, the pixel sequence comes out GRGRGR, etc., and then the alternate line sequence is BGBGBG, etc.

This output is called sequential RGB (or sRGB).

Since each pixel has been made sensitive only to one color (one spectral band), the overall sensitivity of a color image sensor is lower than a monochrome (panchromatic) sensor, and in fact is typically 3x less sensitive.

As a result, monochrome sensors are better for low-light applications, such as security cameras. (It is also why human eyes switch to black and white mode in the dark).

尽管通过带有Bayer滤镜的单sensor相机采集的原始图像带有R,G,B三基色分量,但是不能不加任何算法处理,仅简单地将3种分量分离。这样不仅图像分辨率很差,而且各像素点的三基色分量比例与被摄目标相比,失真也很严重。

To convert an image from the bayer format to an RGB per pixel format, we need to interpolate the two missing color values in each pixel. Several standard interpolation methods (nearest neighbor, linear, cubic, cubic spline, etc.) were evaluated on this problem in [1]. The authors have measured interpolation accuracy as well as the speed of the method and concluded that the best performance is achieved by a correlation-adjusted version of the linear interpolation. The suggested method is presented here.

Interpolating red and blue components

image

Four possible cases for interpolating R and B components

As suggested in [1], R and B values are interpolated linearly from the nearest neighbors of the same color. There are four are possible cases, as shown above. When interpolating the missing values of R and B on a green pixel, as in (a) and (b), we take the average values of the two nearest neighbors of the same color. For example, in  (a), the value for the blue component on a shaded G pixel will be the average of the blue pixels above and below the G pixel, while the value for the red component will be the average of the two red pixels to the left and right of the G pixel.

(c) shows the case when the value of the blue component is to be interpolated for an R pixel. In such case, we take the average of the four nearest blue pixels cornering the R pixel. Similarly, to determine the value of the red component on a B pixel in (d) we take the average of the four nearest red pixels cornering the B pixel.

Interpolating the green component

By [1], green component is adaptively interpolated from a pair of nearest neighbors. To illustrate the procedure, consider two possible cases below.

image

Two possible cases for interpolating G component

In  (a), the value of the green component is to be interpolated on an R pixel. The value used for the G component here is

image

In other words, we take into account the correlation in the red component to adapt the interpolation method. If the difference between R1 and R3 is smaller than the difference between R2 and R4, indicating that the correlation is stronger in the vertical direction, we use the average of the vertical neighbors G1 and G3 to interpolate the required value. If the horizontal correlation is larger, we use horizontal neighbors. If neither direction dominates the correlation, we use all four neighbors.

Similarly, for  (b) we will have

image

To conclude this section, note that if the speed of execution is the issue, one can safely use simple linear interpolation of the green component from the four nearest neighbors, without any adaptation.

image

According to [1], this method of interpolation executes twice as fast as the adaptive method, and achieves only slightly worse performance on real images. For even fast updates only two of the four green values are averaged. However, this method displays false color on edges or zipper artifacts.

 

References

[1] T. Sakamoto, C. Nakanishi and T. Hase, “Software pixel interpolation for digital still cameras suitable for a 32-bit MCU,” IEEE Trans. Consumer Electronics, vol. 44, no. 4, November 1998.


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Bayer模式是由伊士曼·柯达公司科学家Bryce Bayer发明的一种数字图像处理技术,也被称为Bayer格式。它是一种用于记录彩色图像的方法,通过在图像传感器上安排红、绿、蓝三种滤光片的不同排列,以捕捉并编码不同颜色的信息。Bayer模式通常以2×2的矩阵形式表示,其中每个单元格代表一个像素,通过在每个像素上使用不同的滤光片,实现对红、绿、蓝三种颜色的采样。通常情况下,Bayer模式采用绿色滤光片的数量最多,因为人眼对绿色的感知更为敏感。 Bayer模式的排列方式可以用来还原彩色图像,并且可以通过一些方法进行统一和增强,而不会破坏原始图像的空间关系。其中一种方法是使用翻转和裁剪进行数据增强,同时保持图像的Bayer模式。这种方法被称为Bayer Preserving Augmentation(BayerAug)。首先,图像被翻转,然后通过裁剪来逆转Bayer模式的变化,以使图像恢复到原来的样子。这样可以对Bayer模式图像进行增强处理而不会引入伪影。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [图像bayer pattern介绍及插值原理](https://blog.csdn.net/q2519008/article/details/122937687)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [Learning Raw Image Denoising with Bayer Pattern Unification and Bayer Preserving Augmentation](https://blog.csdn.net/qq_27871973/article/details/96869379)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值