簡易檢索 / 詳目顯示

研究生: 蔡宜學
Yi-Hsueh Tsai
論文名稱: 切換式中值濾波改良聯合直方圖均等化低光源影像增強算法及其FPGA實現
Decision-based Median Filter Improved Joint Histogram Equalization Low-light Image Enhancement Algorithm and its FPGA Implementation
指導教授: 楊振雄
Cheng-Hsiung Yang
口試委員: 顏志達
Chih-Ta Yen
吳常熙
Chang-Hsi Wu
徐勝均
Sheng-Dong Xu
楊振雄
Cheng-Hsiung Yang
學位類別: 碩士
Master
系所名稱: 工程學院 - 自動化及控制研究所
Graduate Institute of Automation and Control
論文出版年: 2023
畢業學年度: 111
語文別: 中文
論文頁數: 144
中文關鍵詞: 彩色影像影像增強FPGA邊緣運算
外文關鍵詞: Color Images, Images Enhancement, FPGA, Edge Computing
相關次數: 點閱:273下載:7
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報

近年來影像處理越來越依賴深度學習,不論是增加解析度、消除色偏、去除雜訊…等,但是深度學習有一個明顯的缺點,那就是需要花費人力以及時間去訓練所需要的模型,若是要提升模型效果,則需要的資料集就要增加,訓練時間也需要增加。因此本論文使用非深度學習的低光源影像增強算法,來還原低光源影像。
本論文以聯合直方圖均等化(JHE)算法為基礎,提出切換式中值濾波改良聯合直方圖均等化(DMIJHE)算法。不同於JHE算法使用原始影像RGB值與原始影像經過均值(Average)濾波後的RGB值,本論文使用原始影像經過切換式(Decision-based)中值(Median)濾波後的灰階值(Gray)與明度值(Value)建構聯合直方圖(Joint Histogram)。得到聯合直方圖後,再計算二維累積分布函數(2D-CDF),並映射回明度範圍值0~100。得到映射後的聯合直方圖後即可轉換回明度值,最終得到增強後的影像。
本論文改良處為以下3點:第一點為使用HSV通道而非RGB通道,保留影像的原始色彩資訊,不會因為映射導致色彩飽和度降低。第二點為改良二維累積分布函數的運算方式,降低了運算所需時間。第三點為捨棄均值濾波改為中值濾波,不只降低了運算複雜度,也提升了過濾雜訊的效果。
本論文將DMIJHE算法使用FPGA Xilinx ZCU104來實現邊緣運算,不只如此,還將DMIJHE算法中許多個別計算的公式利用硬體特性進行平行運算,減少了運算所需的時間。本論文將需要進行運算的公式使用PL(Programmable Logic)端做硬體實現,並利用PS(Programmable System)端對影像資料進行傳輸、儲存。


In recent years, image processing has become more and more dependent on deep learning, whether it is to increase resolution, eliminate color cast, remove noise, etc. However, deep learning has an obvious shortcoming, that it requires labor and time to train the required models. Therefore, this thesis, we used a non-deep learning low light images enhancement algorithm to restore low light images.
In this thesis, we propose the Decision-based Median Filter Improved Joint Histogram Equalization (DMIJHE) algorithm based on the Joint Histogram Equalization (JHE) algorithm, which is different from the JHE in that it uses the RGB values of original image and its average image. This thesis using Gray and Value of the original image after median computing to constructs a Joint Histogram. Next, we calculate the two-dimension cumulative distribution function (2D-CDF) and mapped to the Value range which is 0~100. The mapped Joint Histogram can be converted back to Value and obtain the enhanced image.
In this thesis, we have 3 improvements of the algorithm. First, we used HSV channel instead of RGB channel to retain the original color saturation due to mapping enhanced Value. Second, we improved the calculation of 2D-CDF, which reduces the time required for calculation. Third, we replaced average computing with median computing, which not only reduces the computational complexity but also improved the noise filtering effect.
In this thesis, we used the FPGA Xilinx ZCU104 to implement the DMIJHE for edge computing. In addition, we also used the hardware features of the DMIJHE to perform parallel computing, which reduces the time required for computing. In this thesis, we used the PL (Programmable Logic) side for hardware implementation of the formulas to be computed, and the PS (Programmable System) side for image data transmission and storage.

致謝 I 摘要 II Abstract III 目錄 IV 圖目錄 VII 表目錄 XIV 第一章 緒論 1 1.1 前言 1 1.2 文獻回顧 2 1.3 研究動機 2 1.4 研究過程 3 1.5 論文概述 4 第二章 影像增強算法 5 2.1 直方圖均等化 5 2.2 聯合直方圖均等化 9 2.3 切換式中值濾波改良聯合直方圖均等化 18 2.3.1 HSV色彩空間 19 2.3.2 二維累積分布函數算法改良 22 2.3.3 中值濾波 25 2.4 DMIJHE影像增強算法演示 29 第三章 FPGA開發流程介紹 33 3.1 Xilinx ZCU104開發板介紹 33 3.2 FPGA開發流程 37 3.2.1 靜態時序分析STA(Static Timing Analysis) 39 3.3 Xilinx開發軟體介紹 45 3.3.1 Xilinx Vivado介紹 46 3.3.2 Xilinx Vitis介紹 54 3.4 周邊設備介紹 57 3.4.1 AXI(Advanced eXtensible Interface)通訊協定 57 3.4.2 BMP(Bitmap)點陣圖檔案格式 61 3.5 應用程式介面(API)介紹 63 3.5.1 AXI4-Lite應用程式介面使用 64 3.5.2 PS端記憶體應用程式介面使用 65 3.5.3 SD卡讀寫應用程式介面使用 65 第四章 硬體架構設計 67 4.1 DMIJHE影像增強算法流程圖 67 4.2 中值濾波 68 4.2.1 平行運算 68 4.2.2 中值濾波電路設計 70 4.3 彩色影像處理 73 4.3.1 整數實現小數運算 74 4.3.2 RGB彩色影像轉換灰階影像電路設計 75 4.3.3 RGB彩色影像轉換HSV影像電路設計 75 4.4 二維累積分布函數表 78 4.4.1 平行前綴運算(Parallel Prefix Computation) 78 4.4.2 二維累積分布函數電路設計 79 4.5 聯合直方圖均等化 81 4.5.1 計算二維累積分布函數最小值電路設計 81 4.5.2 聯合直方圖均等化電路設計 83 4.6 HSV影像轉換RGB彩色影像電路設計 86 第五章 實驗結果 90 5.1 功能電路模擬結果 91 5.1.1 切換式中值濾波模組 91 5.1.2 彩色影像處理模組 92 5.1.3 二維累積分布函數模組 94 5.1.4 計算二維累積分布函數最小值模組 96 5.1.5 聯合直方圖均等化模組 99 5.1.6 HSV影像轉換彩色影像模組 100 5.2 FPGA實現結果 101 5.3 DMIJHE影像增強算法實驗結果 104 第六章 結論與未來展望 123 6.1 結論 123 6.2 未來展望 123 參考文獻 125

[1] Z. Zhong and Z. Ma, "A Novel Defect Detection Algorithm for Flexible Integrated Circuit Package Substrates," IEEE Transactions on Industrial Electronics, vol. 69, no. 2, pp. 2117-2126, 2022, doi: 10.1109/tie.2021.3057026.
[2] W. K. P. Barros, D. S. Morais, F. F. Lopes, M. F. Torquato, R. M. Barbosa, and M. A. C. Fernandes, "Proposal of the CAD System for Melanoma Detection Using Reconfigurable Computing," Sensors (Basel), vol. 20, no. 11, Jun 3 2020, doi: 10.3390/s20113168.
[3] S. J. Horng and P. S. Huang, "Building Unmanned Store Identification Systems Using YOLOv4 and Siamese Network," (in English), Appl. Sci.-Basel, Article vol. 12, no. 8, p. 17, Apr 2022, Art no. 3826, doi: 10.3390/app12083826.
[4] J. Wang, M. Wang, Q. L. Liu, G. X. Yin, and Y. J. Zhang, "Deep anomaly detection in expressway based on edge computing and deep learning," (in English), J. Ambient Intell. Humaniz. Comput., Article vol. 13, no. 3, pp. 1293-1305, Mar 2022, doi: 10.1007/s12652-020-02574-y.
[5] K. Barr, ASIC design in the silicon sandbox : a complete guide to building mixed-signal integrated circuits. McGraw-Hill New York, 2007.
[6] C. Maxfield, FPGAs : World Class Designs. ELSEVIER, 2009.
[7] G. Rafael C and W. Richard E, Digital Image Processing, 4 ed. Pearson, 2018, pp. 134-140.
[8] E. Land, "Experiments in Color Vision," Scientific American pp. 84-94, 1959.
[9] R. Wan, B. Shi, W. Yang, B. Wen, L.-Y. Duan, and A. C. Kot, "Purifying Low-light Images via Near-Infrared Enlightened Image," IEEE Transactions on Multimedia, pp. 1-13, 2022, doi: 10.1109/tmm.2022.3232206.
[10] Xilinx. "Xilinx." https://github.com/Xilinx (accessed.
[11] Xilinx. "Xilinx Support." https://support.xilinx.com/s/?language=en_US (accessed.
[12] L. Deng and D. Yu, Deep Learning : Methods and Applications. Now Foundations and Trends, 2014.
[13] K. I. Park, Fundamentals of Probability and Stochastic Processes with Applications to Communication. Springer, 2018.
[14] A. Gijsenij, T. Gevers, and J. V. D. Weijer, Computational Color Constancy : Survey and Experiments. IEEE, 2011.
[15] Z. Hua, L. Qi, M. Guan, H. Su, and Y. Sun, "Colour balance and contrast stretching for sand‐dust image enhancement," IET Image Processing, vol. 16, no. 14, pp. 3768-3780, 2022, doi: 10.1049/ipr2.12592.
[16] W. Zhang, Y. Wang, and C. Li, "Underwater Image Enhancement by Attenuated Color Channel Correction and Detail Preserved Contrast Enhancement," IEEE Journal of Oceanic Engineering, vol. 47, no. 3, pp. 718-735, 2022, doi: 10.1109/joe.2022.3140563.
[17] S. Agrawal, R. Panda, P. K. Mishro, and A. Abraham, "A novel joint histogram equalization based image contrast enhancement," (in English), J. King Saud Univ.-Comput. Inf. Sci., Article vol. 34, no. 4, pp. 1172-1182, Apr 2022, doi: 10.1016/j.jksuci.2019.05.010.
[18] S. Marschner and P. Shirley, Fundamentals of Computer Graphics, 4 ed. A K Peters/CRC Press, 2015.
[19] E. R. Davies, Computer Vision : Principles, Algorithms, Applications, Learning, 5 ed. Academic Press, 2017.
[20] P. K. Sanki, V. Bevara, M. D. Supriya, D. Vignesh, P. B. Sai Harshath, and S. Kuchina, "VLSI Implementation of a Real-time Modified Decision-based Algorithm for Impulse Noise Removal," presented at the 2022 IEEE International IOT, Electronics and Mechatronics Conference (IEMTRONICS), 2022.
[21] J. Cavanagh, Computer Arithmetic and Verilog HDL Fundamentals. CRC Press, 2009.
[22] G. J. Sullivan, J.-R. Ohm, W.-J. Han, and T. Wiegand, "Overview of the High Efficiency Video Coding (HEVC) Standard," IEEE Transactions on Circuits and Systems for Video Technology, vol. 22, no. 12, pp. 1649-1668, 2012, doi: 10.1109/tcsvt.2012.2221191.
[23] J. D. Murray and W. vanRyper, Encyclopedia of Graphics File Formats. 1996.
[24] Xilinx. "Zynq UltraScale+ MPSoC ZCU104 Evaluation Kit." https://www.xilinx.com/products/boards-and-kits/zcu104.html (accessed.
[25] Y.-L. S. Lin, Essential Issues in SOC Design : Designing Complex Systems-on-Chip. Springer, 2006.
[26] R. E. Bryant and D. R.O'Hallaron, Computer Systems : A Programmer's Perspective, 3 ed. Pearson IT Certifica, 2015.
[27] B. Hajji, A. Melit, and L. Bouselham, A Practical Guide for Simulation and FPGA Implementation of Digital Design. Springer, 2022.
[28] J. Bhasker and R. Chadha, Static Timing Analysis for Nanometer Design : A Practical Approach. Springer, 2009.
[29] Xilinx. "Xilinx Developer Tools." https://www.xilinx.com/products/design-tools.html (accessed.
[30] Xilinx, "Vivado Design Suite : AXI Reference Guide (UG1037)," 2017.
[31] "FatFs - Generic FAT Filesystem Module." http://elm-chan.org/fsw/ff/00index_e.html (accessed.
[32] R. Kastner, J. Matai, and S. Neuendorffer, Parallel Programming for FPGAs. 2018.
[33] M. M. Mano and M. Ciletti, Digital Design : With an Introduction to the Verilog HDL, VHDL, and SystemVerilog. Pearson, 2017.
[34] R. Roy et al., "PrefixRL: Optimization of Parallel Prefix Circuits using Deep Reinforcement Learning," presented at the 2021 58th ACM/IEEE Design Automation Conference (DAC), 2021.
[35] Y.-T. Kim, "Constrast Enhancement Using Brightness Preserving Bi-Histogram Equalization," IEEE Transactions on Consumer Electronics, vol. 43, no. 1, pp. 1-8, 1997.
[36] S.-D. Chen and A. R. Ramli, "Contrast enhancement using recursive mean-separate histogram equalization for scalable brightness preservation," IEEE Transactions on Consumer Electronics, vol. 49, no. 4, pp. 1301-1309, 2003.
[37] C. Wang and Z. Ye, "Brightness preserving histogram equalization with maximum entropy: a variational perspective," IEEE Transactions on Consumer Electronics, vol. 51, no. 4, pp. 1326-1334, 2005.
[38] K. S. Sim, C. P. Tso, and Y. Y. Tan, "Recursive sub-image histogram equalization applied to gray scale images," Pattern Recognition Letters, vol. 28, no. 10, pp. 1209-1221, 2007, doi: 10.1016/j.patrec.2007.02.003.
[39] C. H. Ooi, N. S. P. Kong, and H. Ibrahim, "Bi-histogram equalization with a plateau limit for digital image enhancement," IEEE Transactions on Consumer Electronics, vol. 55, no. 4, pp. 2072-2080, 2009.
[40] C. Zuo, Q. Chen, and X. Sui, "Range Limited Bi-Histogram Equalization for image contrast enhancement," Optik, vol. 124, no. 5, pp. 425-431, 2013, doi: 10.1016/j.ijleo.2011.12.057.
[41] G. Xiaojie, L. Yu, and L. Haibin, "LIME: Low-Light Image Enhancement via Illumination Map Estimation," IEEE Trans Image Process, vol. 26, no. 2, pp. 982-993, Feb 2017, doi: 10.1109/TIP.2016.2639450.
[42] M. Abdullah-Al-Wadud, M. H. Kabir, M. A. A. Dewan, and O. Chae, "A Dynamic Histogram Equalization for Image Contrast Enhancement," IEEE Transactions on Consumer Electronics, vol. 53, no. 2, 2007.
[43] D. A. Patterson and J. L. Hennessy, Computer Organization and Design MIPS Edition : The Hardware/Software Interface. Morgan Kaufmann, 2013.
[44] J. Zhai, B. Li, S. Lv, and Q. Zhou, "FPGA-Based Vehicle Detection and Tracking Accelerator," Sensors (Basel), vol. 23, no. 4, Feb 16 2023, doi: 10.3390/s23042208.
[45] J. Corbet, A. Rubini, and G. Kroah-Hartman, Linux Device Drivers, 3 ed. O'Reilly Media, 2005.
[46] W. M. Zabołotny, "Versatile DMA Engine for High-Energy Physics Data Acquisition Implemented with High-Level Synthesis," Electronics, vol. 12, no. 4, 2023, doi: 10.3390/electronics12040883.
[47] D. Koch, F. Hannig, and D. Ziener, FPGAs for Software Programmers. Springer, 2016.

QR CODE