光学 精密工程, 2014, 22 (2): 426, 网络出版: 2014-03-03
基于现场可编程门阵列的CCD相机自动调光
Auto-exposure for CCD camera based on FPGA
CCD相机 自动调光 直方图 曝光量 现场可编程门阵列 CCD camera automatic exposure histogram exposure value Field Programming Gate Array(FPGA)
摘要
针对CCD相机在一些特殊场合成像时遇到的前后两帧图像场景不一致、应用环境多样性等问题, 提出了一种基于图像直方图统计和分块均值的自动调光算法。该算法首先分析一帧图像的亮度分布, 并计算出下一帧图像的最佳均值。然后根据该均值调整下一帧图像的曝光量, 使其合理曝光。实验结果表明, 利用此方法可以获得整体亮度合适的图像。在统计直方图后, 计算最佳均值只需利用到直方图和几个均值, 与图像本身的大小没有关系, 所以计算量非常小; 在像素时钟为60 MHz时, 每次计算时间为6 μs。另外, 此方法具备较好的场景适应能力, 满足场景时刻变化时CCD相机自动调光以及实时性的要求。
Abstract
As CCD camera may image in different scenes and changed scenes in some special applications, an effective automatic exposure algorithm is proposed based on image histogram statistics and image mean blocking. Firstly, it analyzes the luminance distribution of image one and calculates the optimal mean of the next image. Then, it adjusts the exposure value of the next image based on the optimal mean to gain the image with rational exposure. The experimental results show that the method can obtain an image with appropriate brightness. After accounting the histogram, the algorithm has less calculation, which is dependent on the histogram and some means and nothing on the image sizes. When the pixel clock is 60 MHz, the calculating time just needs 6 μs.Moreover, it not only has a good capability to different scenes, but also can meet the requirements of the CCD camera for automatic exposure in real time at changed scenes.
黄辉, 周进. 基于现场可编程门阵列的CCD相机自动调光[J]. 光学 精密工程, 2014, 22(2): 426. HUANG Hui, ZHOU Jin. Auto-exposure for CCD camera based on FPGA[J]. Optics and Precision Engineering, 2014, 22(2): 426.