http://blog.csdn.net/pauperonway/article/details/7360933

Sensor3彩色数字相机需要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).

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.

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

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.

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

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

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.

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.

Bayer Pattern to RGB相关推荐

  1. 转Bayer Pattern

    在刚加入工作的时候,听到最多的就是RGGB Bayer Pattern.在之前的接触中,一直默认一张图片的每个像素点有RGB三个分量,那"RGGB Bayer Pattern"究竟 ...

  2. 转载:拜耳阵列(Bayer Pattern)简介

    所谓拜耳阵列指的是CCD(charge coupled device)或者CMOS器件作为光传感器的时候,采集数字图像时用到的一种常见的方法. 介绍一下背景,人们有了可以感受光强度的传感器以后,就可以 ...

  3. 拜尔模板 bayer pattern

    Sensor的感光原理是通过一个一个的感光点对光进行采样和量化,但在Sensor中,每一个感光点只能感光RGB中的一种颜色.所以,通常所说的30万像素或130万像素等,指的是有30万或130万个感光点 ...

  4. 拜耳阵列(Bayer Pattern)简介

    所谓拜耳阵列指的是CCD(charge coupled device)或者CMOS器件作为光传感器的时候,采集数字图像时用到的一种常见的方法. 介绍一下背景,人们有了可以感受光强度的传感器以后,就可以 ...

  5. Ambarella : 一家伟大的视频压缩处理芯片厂商

    最近工作比较忙,没有好好的关注业界动态.今天首次听说Ambarella A5s,有种惊艳的感觉查其出身,才知道是Ambarella公司,一家位于加州Santa Clara的初创公司,主营H264压缩处 ...

  6. 嵌入式开发之davinci--- 8148/8168/8127 中的图像采集格式Sensor信号输出YUV、RGB、RAW DATA、JPEG 4种方式区别...

    简单来说, YUV: luma (Y) + chroma (UV) 格式, 一般情况下sensor支持YUV422格式,即数据格式是按Y-U-Y-V次序输出的 RGB: 传统的红绿蓝格式,比如RGB5 ...

  7. 摄像头基础知识(二):Bayer、Raw与ISP

    文章目录 一.Bayer阵列 二.Bayer RAW和 RGB RAW 三.ISP处理流程 四.3A系统 一.Bayer阵列 bayer格式数据,其一般格式是,奇数行为RGRG,偶数行一般为GBGB ...

  8. Sensor信号输出YUV、RGB、RAW DATA、JPEG【转】

    本文转载自:http://blog.csdn.net/southcamel/article/details/8305873 简单来说, YUV: luma (Y) + chroma (UV) 格式, ...

  9. RAW格式 RAW RGB格式

    1.1  图像传感器 ( 通过一个一个的感光点对光进行采样和量化)           通常所说的130万像素等,指的是有130万个感光点.每一个感光点只能感光RGB中的一种颜色.但是,要还原一个真正 ...

最新文章

  1. aix oracle11g 静默安装包,10g for AIX 静默安装
  2. linux命令之date
  3. 【短视频SDK】Android如何使用硬编硬解?
  4. 如何根据分页的当前页数查询数据_数据量很大的情况下,如何分页查询优化方案?...
  5. wordpress漏洞_WordPress站点恶意JS注入漏洞分析
  6. java 日期计算类_java日期计算工具类【包含常用的日期计算方法】
  7. 2017年11月01日普及组 I Liked Matrix!
  8. matlab机械臂工作空间代码_【ROS-Moveit!】机械臂控制探索(3)——基于python的API示例代码分析...
  9. java 不同分辨率_java9新特性-14-多分辨率图像 API
  10. AOP的XML架构、AOP的@AspectJ
  11. 定义工作,解读自我——IT帮2019年2月线下活动回顾
  12. mysql 交互式和非交互式操作(interactive_timeout和wait_timeout)
  13. 现博客已搬至简书(https://www.jianshu.com/u/6639243cadf1)
  14. 20天精通 Windows 8:系列课程资料集
  15. 全网最新springCloud快速练手学习项目——简单超易懂系列
  16. 魅族手机无信号无服务器,魅族手机没有信号的解决教程
  17. 怎样把小米手机便签内容转存到百度网盘中去?
  18. 贴片电容器容量怎么换算?
  19. 你画我猜游戏html源代码,微信小程序你画我猜demo完整源码
  20. 控制算法简析3——LKA中PID控制的error选取

热门文章

  1. android 怎么加链接地址,Android TextView添加超链接的方法示例
  2. bond-vlan-bridge
  3. SQL Server Replication 中关于视图的点滴
  4. TCP三次握手和四次断开
  5. BuckleScript 1.0发布,面向OCaml的开源JavaScript编译器
  6. java使用类似ini文件IniProperties的类
  7. make_ext4fs 失败
  8. 屏幕截图在网页设计中应用的30个优秀案例
  9. android+ip+rule+策略路由,策略路由以及使用 ip route , ip rule , iptables 配置策略路由实例...
  10. Sublime Text 2