Research and implementation of real-time fog and haze video image restoration system based on FPGA
-
摘要: 针对雾、霾等恶劣气象条件下, 视频监控等户外视频设备对视频图像实时复原的需要, 提出一种快速图像复原算法的FPGA实现方法, 通过适当降低算法复杂度达到了降低时间开销和硬件实现复杂度的目的。通过将一帧视频分解成3×3小窗口进行运算, 以窗口中心像素的流水计算替代一帧视频像素计算, 使每个像素在3个时钟周期内完成全部运算, 确保了系统能够实时复原, 降低了复原模块对硬件的开销。实验证明:FPGA处理结果和MATLAB处理的结果相符, 可以在保证除雾效果的前提下, 实时处理分辨率为640×480视频并以29帧/s速度流畅显示。Abstract: Aiming at the need of video surveillance and other outdoor video equipment for real-time restoration of video image under severe weather conditions such as fog and fog, an field-programmable gate array(FPGA) implementation method for fast image restoration algorithm was proposed. By appropriately reducing the complexity of the algorithm, the purpose of reducing time cost and hardware implementation complexity could be achieved.In this algorithm, a frame of video is decomposed into 3×3 small windows for operation, and a frame of video pixel calculation is replaced by a pipeline calculation of the center pixel of the window, so that each pixel's all operations are processed in 3 clock cycles, ensuring that the system can be restored in real time, and the hardware cost of the recovery module can be reduced.Experimental results show that the results of FPGA processing coincide with the results of MATLAB processing, the real-time processing resolution is 640×480, and the video can be displayed smoothly at 29 frames /s under the premise of ensuring the defogging effect.
-
Keywords:
- video restoration /
- FPGA /
- real-time /
- defog
-
-
表 1 系统及模块占用资源情况
Table 1 System and module occupancy resources
资源名称 系统占用 模块占用 LC Combinationals 6 044 4 613 LC Registers 1 526 434 Memory Bits 90 960 15 312 DSP Elements 34 16 表 2 复原前后能量损失对比
Table 2 Comparison of energy loss before and after defogging
图片 使用参数 原图 MATLAB 损失能量/% FPGA 损失能量/% 差异/% Train 1.3 0.526 5 0.309 6 41.2 0.297 7 43.45 2.26 Train 1.2 0.526 5 0.333 7 36.6 0.322 7 38.7 2.09 校园 1.3 0.464 2 0.391 5 15.7 0.388 3 16.4 0.68 校园 1.2 0.464 2 0.398 3 14.2 0.395 0 14.9 0.71 -
[1] TAREL L, HAUTIERE N. Fast visibility restoration from a single color or gray level image: 2009 IEEE 12th International Conference on Computer Vision, 20[C].Kyoto, Japan: IEEE, 2009.
[2] HE Kaiming, SUN Jian, TANG Xiaoou. Single image haze removal using dark channel prior[C]// Computer Vision and Pattern Recognition, 2009(CVPR 2009).USA: IEEE, 2009.
[3] LIU Qian, CHEN Maoyin, ZHOU Donghua. Fast haze removal from a single image[C]// 2013 25th Chinese Control and Decision Conference (CCDC).[S.l]: [s.n], 2013
[4] 刘光飞, 胡辽林.暗通道先验去雾算法的改进及FPGA实现[J].西安理工大学学报, 2016(1):77-82. http://d.old.wanfangdata.com.cn/Periodical/xalgdxxb201601015 LIU Guangfei, HU Liaolin. Improvement and FPGA implementation of dark channel priori dehazing algorithm[J]. Journal of Xi'an University of Technology, 2016(1):48-51 http://d.old.wanfangdata.com.cn/Periodical/xalgdxxb201601015
[5] 黄黎红.一种基于单尺度Retinex的雾天降质图像增强新算法[J].应用光学, 2010, 31(5):728-733. doi: 10.3969/j.issn.1002-2082.2010.05.011 HUANG Lihong. Fog-degraded image enhancement based on single-scale retinex[J].Journal of Applied Optics, 2010, 31(5):728-733. doi: 10.3969/j.issn.1002-2082.2010.05.011
[6] 曹亚辉, 刘峰.基于FPGA的高清实时视频去雾系统的设计与实现[J].电视技术, 2015, 39(7):48-51. http://d.old.wanfangdata.com.cn/Periodical/dsjs201507011 CAO Yahui, LIU Feng. Design and implementation of High-definition Real-time Video Dehazing system based on FPGA[J].Video Engineering, 2015, 39(7):45-51. http://d.old.wanfangdata.com.cn/Periodical/dsjs201507011
[7] YANG Jiachen, BIN Jiang, LV Zhihan, et al. A real-time image dehazing method considering dark channel and statistics features[J]. Journal of Real-Time Image Processing, 2017, 13(3):1-12. http://www.wanfangdata.com.cn/details/detail.do?_type=perio&id=45d4b38552c01381a63998f0d7b9cbe8
[8] MCCARTNEY E J, JR F F H. Optics of the atmosphere: scattering by molecules and particles[M]. New Jersey:WILEY, 1976.
[9] 黄品高, 叶懋, 张子方, 等.一种暗通道先验去雾后图像参数的调节方法[J].电视技术, 2016, 40(7):118-122. http://d.old.wanfangdata.com.cn/Periodical/dsjs201607026 HUANG Pingao, YE Mao, ZHANG Zifang, et al. Method for adjusting the parameters of image dehazed by method of dark channel prior[J]. Video engineering, 2016, 40(7) : 118-122. http://d.old.wanfangdata.com.cn/Periodical/dsjs201607026
[10] DAS D, CHAUDHURI S S, ROY S. Dehazing technique based on dark channel prior model with sky masking and its quantitative analysis[C]//2016 2nd International Conference on Control.[S.l]: [s.n.], 2016.
[11] ZHANG Jiawan, Li Lliang, ZHANG Yi, et al. Video dehazing with spatial and temporal coherence[J]. The Visual Computer, 2011, 27(6-8):749-757. doi: 10.1007/s00371-011-0569-8
[12] TAN R T.Visibility in bad weather from a single image[C]. USA: IEEE, 2008.
[13] GU Zhenfei, JU Mingye, ZHANG Dengyin. A single image dehazing method using average saturation prior[J]. Mathematical Problems in Engineering, 2017, 2017:1-17. http://www.wanfangdata.com.cn/details/detail.do?_type=perio&id=3ca6bab6230592520952e56ee73654f2
[14] LIANG Zhonghao, PENG Dewei, JIN Yanxu, et al. Single image dehazing algorithm based on traffic scene region enhancement[J]. Journal of Computer Applications, 2018, 38(5):1420-1426. http://d.old.wanfangdata.com.cn/Periodical/jsjyy201805035
[15] ALAJARMEH A, SALAM R A, ABODULRAHIM K, et al. Real-time framework for image dehazing based on linear transmission and constant-time airlight estimation[J]. Information Sciences, 2018, 436-437:108-130. doi: 10.1016/j.ins.2018.01.009
-
期刊类型引用(6)
1. 窦恩泽,杨鹏程,李小成,任拓. 改进PConvUNet图像修补的解包裹方法. 现代电子技术. 2024(05): 46-52 . 百度学术
2. 康乐谦,杨鹏程,吕秋娟,连力平,朱新栋. Tsallis相对熵引导的包裹相位修补. 光学精密工程. 2024(08): 1130-1139 . 百度学术
3. 任拓,杨鹏程,李小成,窦恩泽,朱新栋. 激光干涉测量中数据驱动的齿轮装夹误差校正方法. 光子学报. 2024(12): 224-235 . 百度学术
4. 苏皓,刘冬冬,董太极,高彪. 基于法布里-珀罗干涉的双电机转速测量. 激光与红外. 2021(12): 1649-1653 . 百度学术
5. 李玥. 基于大数据分析技术的激光图像分类和识别研究. 激光杂志. 2020(08): 129-133 . 百度学术
6. 程志远,李治国,折文集,夏爱利. 激光相干场成像散斑噪声复合去噪方法. 物理学报. 2019(05): 154-160 . 百度学术
其他类型引用(4)