Image Processing for Embedded Devices <5>

2.2 sensor系统

                                          

图2.2 像素结构示例

 

         图2.2中是sensor中像素的一个经典的结构示意。可以看到所有相关的组成单元:微透镜,电子零件和感光区。接下来部分会分析这些单元,表述其优劣势和其对形成最终图像的影响。

2.2.1 微透镜

 

图2.3 不同像素填充因子的补偿策略:(a)高填充因子像素,捕获所有入射光;(b)低填充因子像素,使用微透镜将入射光汇合到有效区

 

         捕获光的灵敏程度(光灵敏度)是图像sensor最重要的特性之一。其主要取决于感光区的设计(图2.3),以及设计和技术相同情况下,取决于感光区的大小(图2.2)。填充因子是感光区和像素大小的比例(变化范围30%-100%)。当填充因子较低时需要通过使用微透镜改善。微透镜是单独地放置在每个像素表面的透镜,用来聚光到感光区。微透镜可提高有效填充因子(有效折射区域和全部透镜阵列占用区域的比例)至大约70%,显著提高灵敏度(非电荷容量)。图2.3展示了有无微透镜像素的不同之处。

2.2.2 透镜和微透镜像差

串扰

 

图2.4 不同类型的串扰:(a)输入光被探测器正确捕获,无串扰效应;(b)光串扰:部分过滤光未被各自的探测器捕获而是去到相邻探测器,图示情况下红光被绿色集电器收集;(c)电子串扰:部分光子分散在硅层并被不同类型的探测器收集,图示情况下红色光子通过硅层被相邻的绿色探测器收集。

如图2.4(a)所示,一个理想像素充电情况,所有角度的光子贯穿CFA中的过滤单元按颜色过滤并累积在过滤单元下面的光电探测器中。光串扰发生在光子以某个角度贯穿CFA中的某个过滤单元,进入到相邻像素的光电探测器(光电二极管),而不是该过滤单元下面的光电探测器。这会污染相邻像素的电荷包,如图2.4(b)。此外还有电子串扰,发生在光子在产生电子前穿过红色滤波进入硅层。这导致不同颜色的响应不一致,图2.4(c)表示电荷损失于基片和电子漂移到错误的像素。

 

色差

 

图2.5 色差影响下的图像的局部

 

图2.6 纵向和横向色差

 

色差是一个术语,表示一个图像系统在图像或最少图像某些区域中放置不正确的颜色。色差是由于镜头对不同波长的光有不同的折射率引起的。这意味着各颜色通道的焦距不同,因此色差会产生可见的颜色边纹和颜色模糊。图2.5是色差的一个例子。这种色差是典型地遍布总张图像,但在高对比的边缘最为明显。色差一般被定义为2种类型(见图2.6):

l  纵向色差

l  横向色差(亦称为放大色差)

 

图2.7 R和B通道失真

 

         纵向色差由于波长不同导致图像平面上失焦,横向色差由于焦点转移产生。前者造成模糊失真,后者导致颜色通道的转移失真。图像处理设置通常根据绿色通道聚焦图像平面,如图2.7,因为绿色分量对亮度影响最大。因此和其他2个颜色通道相比,绿色通道显示出更少的色差。

         矫正色差的2种主要方法:

l  光学改良的镜头;

l  采集到的图像进行信号处理。

         第一种方法往往成本高且难以实现。另一方面,信号处理算法可以用廉价且有效的方式矫正这个缺陷。

 

图2.8 棋盘模式用于矫正(左)和用于测试(右)

 

         在标准模式(如棋盘模式)下测量放大色差是最简单的技术。图2.8(左边)是一个用于矫正的模式示例。第二个密度更低的棋盘模式(测试图),如图2.8(右边),用于对结果的独立验证。尤其如文献( J. Mallon and P. F. Whelan, “Calibration and removal of lateral chromatic aberration in images,” Pattern Recognition Letters, vol. 28, no. 1, pp. 125-135, 2007.)中探讨的,预先准备好无色差标准模式的参考数据,然后实际拍摄标准模式,通过比较拍摄所得数据和参考数据检测出颜色偏移。

         用于矫正色差的常规图像处理算法通常利用光学系统的补充信息计算由于放大色差引起的颜色偏移。文献(E. C. Haseltine and W. G. Redmann, “Electronic and computational correction of chromatic aberration associated with an optical system used to view a color video display” U.S. Patent 5369450, November 1994.)提出一个方法,通过引入不同的几何变形到目标图像的颜色成分用以矫正纵向色差。这个变形会很大程度抵消由镜头单元形成的实际图像的红绿蓝颜色成分在图像高度上差异。这个通过确定一个或多个特定颜色变形函数完成(考虑到红绿蓝图层下镜头的不同的纵向放大率参数),函数作用于一个或多个颜色成分的几何特征。不同的变形函数可能会作用于红色和蓝色成分上,使其和绿色成分一致。

 

紫边现象

 

图2.9紫边影响下的图像的局部

 

         虽然特定条件下色差也可能是紫色的,“紫边现象”通常是值由微透镜引起的一种典型的图像设备现象。紫边可被认为“微透镜层级的色差”。因此,紫边现象肉眼可见并且贯穿每帧图像。图2.9展示了一副紫边影响下的图像。对比强烈的边缘位置最为明显,特别处于背光情况下。Blooming(光晕或高光溢出)会使紫边现象更可见。实际上图像设备通常测量场景的曝光时间,最亮的区域在不得溢出势阱的情况下可能多的累积电荷,得到最高的动态范围并且响应直接取决于击打在光电二极管上光子数量。这种曝光控制正常情况下能有效工作,但是场景的曝光测量是依据一些区域的平均亮度。如果场景包含小区域,这些小区域和场景平均亮度相比格外的亮,这些亮区域会导致数量非常多的光子,成为sensor上的小事故。这些光子在sensor中产生电荷,通过充分数量的累积,开始泄漏出像元势阱到周围的像元中(Blooming效应)。

         当电荷从一个光电二极管势阱泄漏到周围的光电二极管势阱,结果是周围区域引入了假的更大的信号。假如周围像元本应不产生信号因这些区域场景为黑,这个假的信号就会尤为明显。从亮到暗过度明显的地方Blooming效应最可见。我们已经知道镜头偏差会造成亮白光的红蓝分量出现在不正确的sensor位置。电荷泄漏会放大该现象,通过从正确位置散布sensor响应电荷至更远处,去马赛克处理还会额外增强这种位置错误。

 

图2.10 CMY颜色空间中紫色所处位置

 

大部分矫正紫边效应的算法技巧是构建二值图,区别过曝区域和非过曝区域。检测靠近过曝区域的紫色区域,降低其饱和度。部分技术会依据周围像素的饱和度,防止过度降低饱和度,保证高质量图像。部分其他技术通过检测CrCb域的Magenta和Cyan颜色范围来确定是否存在紫边现象,如图2.10。

         文献(T. Masuno, M. Ohki, and R. Yamada, “Image processing apparatus and image processing method as well as computer program,” U.S. Patent 7529405, May 2009)中介绍了一个令人感兴趣的技术,用于去除紫边现象,假定紫边主要出现在过曝的高亮区域周边,然后计算每个像素的伪色程度,根据伪色程度进行合适的矫正。像素满足如下条件:

l  像素周边存在过曝像素;

l  像素显示紫色;

l  像素具有高饱和度。

上述像素被认定为紫边像素。通过平均周围未显示伪色的像素进行矫正处理。

转载于:https://www.cnblogs.com/yhszjm/p/11205986.html

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Preface xi Acknowledgements xvii 1 Image Processing 1 1.1 Basic Definitions 2 1.2 Image Formation 3 1.3 Image Processing Operations 7 1.4 Example Application 9 1.5 Real-Time Image Processing 11 1.6 Embedded Image Processing 12 1.7 Serial Processing 12 1.8 Parallelism 14 1.9 Hardware Image Processing Systems 18 2 Field Programmable Gate Arrays 21 2.1 Programmable Logic 21 2.1.1 FPGAs vs. ASICs 24 2.2 FPGAs and Image Processing 25 2.3 Inside an FPGA 26 2.3.1 Logic 27 2.3.2 Interconnect 28 2.3.3 Input and Output 29 2.3.4 Clocking 30 2.3.5 Configuration 31 2.3.6 Power Consumption 32 2.4 FPGA Families and Features 33 2.4.1 Xilinx 33 2.4.2 Altera 38 2.4.3 Lattice Semiconductor 44 2.4.4 Achronix 46 2.4.5 SiliconBlue 47 2.4.6 Tabula 47 2.4.7 Actel 48 2.4.8 Atmel 49 2.4.9 QuickLogic 50 2.4.10 MathStar 50 2.4.11 Cypress 51 2.5 Choosing an FPGA or Development Board 51 3 Languages 53 3.1 Hardware Description Languages 56 3.2 Software-Based Languages 61 3.2.1 Structural Approaches 63 3.2.2 Augmented Languages 64 3.2.3 Native Compilation Techniques 69 3.3 Visual Languages 72 3.3.1 Behavioural 73 3.3.2 Dataflow 73 3.3.3 Hybrid 74 3.4 Summary 77 4 Design Process 79 4.1 Problem Specification 79 4.2 Algorithm Development 81 4.2.1 Algorithm Development Process 82 4.2.2 Algorithm Structure 83 4.2.3 FPGA Development Issues 86 4.3 Architecture Selection 86 4.3.1 System Level Architecture 87 4.3.2 Computational Architecture 89 4.3.3 Partitioning between Hardware and Software 93 4.4 System Implementation 96 4.4.1 Mapping to FPGA Resources 97 4.4.2 Algorithm Mapping Issues 100 4.4.3 Design Flow 101 4.5 Designing for Tuning and Debugging 102 4.5.1 Algorithm Tuning 102 4.5.2 System Debugging 104 5 Mapping Techniques 107 5.1 Timing Constraints 107 5.1.1 Low Level Pipelining 107 5.1.2 Process Synchronisation 110 5.1.3 Multiple Clock Domains 111 5.2 Memory Bandwidth Constraints 113 5.2.1 Memory Architectures 113 5.2.2 Caching 116 5.2.3 Row Buffering 117 5.2.4 Other Memory Structures 118 vi Contents 5.3 Resource Constraints 122 5.3.1 Resource Multiplexing 122 5.3.2 Resource Controllers 125 5.3.3 Reconfigurability 130 5.4 Computational Techniques 132 5.4.1 Number Systems 132 5.4.2 Lookup Tables 138 5.4.3 CORDIC 142 5.4.4 Approximations 150 5.4.5 Other Techniques 152 5.5 Summary 154 6 Point Operations 155 6.1 Point Operations on a Single Image 155 6.1.1 Contrast and Brightness Adjustment 155 6.1.2 Global Thresholding and Contouring 159 6.1.3 Lookup Table Implementation 162 6.2 Point Operations on Multiple Images 163 6.2.1 Image Averaging 164 6.2.2 Image Subtraction 166 6.2.3 Image Comparison 170 6.2.4 Intensity Scaling 171 6.2.5 Masking 173 6.3 Colour Image Processing 175 6.3.1 False Colouring 175 6.3.2 Colour Space Conversion 176 6.3.3 Colour Thresholding 192 6.3.4 Colour Correction 193 6.3.5 Colour Enhancement 197 6.4 Summary 197 7 Histogram Operations 199 7.1 Greyscale Histogram 199 7.1.1 Data Gathering 201 7.1.2 Histogram Equalisation 206 7.1.3 Automatic Exposure 210 7.1.4 Threshold Selection 211 7.1.5 Histogram Similarity 219 7.2 Multidimensional Histograms 219 7.2.1 Triangular Arrays 220 7.2.2 Multidimensional Statistics 222 7.2.3 Colour Segmentation 226 7.2.4 Colour Indexing 229 7.2.5 Texture Analysis 231 Contents vii 8 Local Filters 233 8.1 Caching 233 8.2 Linear Filters 239 8.2.1 Noise Smoothing 239 8.2.2 Edge Detection 241 8.2.3 Edge Enhancement 243 8.2.4 Linear Filter Techniques 243 8.3 Nonlinear Filters 248 8.3.1 Edge Orientation 250 8.3.2 Non-maximal Suppression 251 8.3.3 Zero-Crossing Detection 252 8.4 Rank Filters 252 8.4.1 Rank Filter Sorting Networks 255 8.4.2 Adaptive Histogram Equalisation 260 8.5 Colour Filters 261 8.6 Morphological Filters 264 8.6.1 Binary Morphology 264 8.6.2 Greyscale Morphology 269 8.6.3 Colour Morphology 270 8.7 Adaptive Thresholding 271 8.7.1 Error Diffusion 271 8.8 Summary 273 9 Geometric Transformations 275 9.1 Forward Mapping 276 9.1.1 Separable Mapping 277 9.2 Reverse Mapping 282 9.3 Interpolation 285 9.3.1 Bilinear Interpolation 286 9.3.2 Bicubic Interpolation 288 9.3.3 Splines 290 9.3.4 Interpolating Compressed Data 292 9.4 Mapping Optimisations 292 9.5 Image Registration 294 9.5.1 Feature-Based Methods 295 9.5.2 Area-Based Methods 299 9.5.3 Applications 305 10 Linear Transforms 309 10.1 Fourier Transform 310 10.1.1 Fast Fourier Transform 311 10.1.2 Filtering 318 10.1.3 Inverse Filtering 320 10.1.4 Interpolation 321 10.1.5 Registration 322 viii Contents 10.1.6 Feature Extraction 323 10.1.7 Goertzel’s Algorithm 324 10.2 Discrete Cosine Transform 325 10.3 Wavelet Transform 328 10.3.1 Filter Implementations 330 10.3.2 Applications of the Wavelet Transform 335 10.4 Image and Video Coding 336 11 Blob Detection and Labelling 343 11.1 Bounding Box 343 11.2 Run-Length Coding 346 11.3 Chain Coding 347 11.3.1 Sequential Implementation 347 11.3.2 Single Pass Algorithms 348 11.3.3 Feature Extraction 350 11.4 Connected Component Labelling 352 11.4.1 Random Access Algorithms 353 11.4.2 Multiple-Pass Algorithms 353 11.4.3 Two-Pass Algorithms 354 11.4.4 Single-Pass Algorithms 356 11.4.5 Multiple Input Labels 358 11.4.6 Further Optimisations 358 11.5 Distance Transform 359 11.5.1 Morphological Approaches 360 11.5.2 Chamfer Distance 360 11.5.3 Separable Transform 362 11.5.4 Applications 365 11.5.5 Geodesic Distance Transform 365 11.6 Watershed Transform 366 11.6.1 Flow Algorithms 366 11.6.2 Immersion Algorithms 367 11.6.3 Applications 369 11.7 Hough Transform 370 11.7.1 Line Hough Transform 371 11.7.2 Circle Hough Transform 373 11.7.3 Generalised Hough Transform 374 11.8 Summary 375 12 Interfacing 377 12.1 Camera Input 378 12.1.1 Camera Interface Standards 378 12.1.2 Deinterlacing 383 12.1.3 Global and Rolling Shutter Correction 384 12.1.4 Bayer Pattern Processing 384 Contents ix 12.2 Display Output 387 12.2.1 Display Driver 387 12.2.2 Display Content 390 12.3 Serial Communication 393 12.3.1 PS2 Interface 393 12.3.2 I2C 395 12.3.3 SPI 397 12.3.4 RS-232 397 12.3.5 USB 398 12.3.6 Ethernet 398 12.3.7 PCI Express 399 12.4 Memory 400 12.4.1 Static RAM 400 12.4.2 Dynamic RAM 401 12.4.3 Flash Memory 402 12.5 Summary 402 13 Testing, Tuning and Debugging 405 13.1 Design 405 13.1.1 Random Noise Sources 406 13.2 Implementation 409 13.2.1 Common Implementation Bugs 410 13.3 Tuning 412 13.4 Timing Closure 412 14 Example Applications 415 14.1 Coloured Region Tracking 415 14.2 Lens Distortion Correction 418 14.2.1 Characterising the Distortion 419 14.2.2 Correcting the Distortion 421 14.3 Foveal Sensor 424 14.3.1 Foveal Mapping 425 14.3.2 Using the Sensor 429 14.4 Range Imaging 429 14.4.1 Extending the Unambiguous Range 431 14.5 Real-Time Produce Grading 433 14.5.1 Software Algorithm 434 14.5.2 Hardware Implementation 436 14.6 Summary 439 References 441 Index 475 x Content

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值