簡易檢索 / 詳目顯示

研究生: 游士和
Shi-He You
論文名稱: 以FPGA實現即時白平衡系統
A Real-Time White Balance System Implemented on FPGA
指導教授: 王乃堅
Nai-Jian Wang
口試委員: 王乃堅
Nai-Jian Wang
鍾順平
Shun-Ping Chung
蘇順豐
Shun-Feng Su
姚嘉瑜
Chia-Yu Yao
呂學坤
Shyue-Kung Lu
學位類別: 碩士
Master
系所名稱: 電資學院 - 電機工程系
Department of Electrical Engineering
論文出版年: 2023
畢業學年度: 111
語文別: 中文
論文頁數: 57
中文關鍵詞: 影像白平衡透射率暗通道先驗FPGA即時
外文關鍵詞: White Balance, Transmission, Dark Channel Prior, FPGA, Real-Time
相關次數: 點閱:209下載:3
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 當光源不同時,影像的顏色會隨著光源發生變化。人眼可以適應不同的光源,具有自動校正顏色的能力,而數位相機則沒有這種機制,導致拍攝出來的影像無法呈現物體真實的色彩,而造成色偏問題。
    現有各種白平衡方法有基於統計假設、白點估計以及樣本學習。基於統計假設的方法,通常假設影像中的顏色分布符合某種統計模型,但在現實世界中的影像不一定符合這些假設特性;白點估計的方法,需要找到影像中的估測白點進行校正,但有時因為周遭因素導致找到不準確的估測白點,而樣本學習的方法,需要大量樣本進行學習,耗費許多時間。
    本篇論文會以白點估計即尋找影像估測白點的白平衡方法為基礎,去改良此方法所遇到的各種問題,最後將改良後的白平衡演算法實現在FPGA(Field Programmable Gate Array)上。當硬體接收到影像序列的輸入,首先將影像進行預處理,並從預處理後的影像計算大氣光的值,並藉由大氣散射模型算出影像透射率,針對透射率以及白點特性去尋找影像估測白點,透過這些估測白點計算校正增益,將一幅色偏影像進行白平衡。
    實驗結果顯示此方法可成功從攝影鏡頭輸入並將白平衡後的影像顯示輸出至螢幕上,且最後的結果顯示本系統使用了17,503個邏輯元件和107,456 bits內部記憶體,功耗為818.66mW,且處理速度達到每秒70張影像(NTSC Input)。


    When the light source varies, the colors in an image change accordingly. While the human eye can adapt to different light sources and automatically correct colors, digital cameras lack this mechanism, resulting in color cast issues and an inability to accurately represent the true colors of objects. Existing white balance methods include statistical assumptions, white point estimation, and sample learning. However, statistical assumption-based methods often fail to accommodate real-world image characteristics that may deviate from the assumed distributions. White point estimation methods require accurate identification of the reference white point in an image, which can be challenging due to external factors. Sample learning methods demand significant time and a large number of samples for training.
    This thesis focuses on white balance improvement based on white point estimation. The proposed algorithm is implemented on Field Programmable Gate Array (FPGA). When the hardware receives an input image sequence, it undergoes preprocessing, and the atmospheric light value is calculated from the preprocessed image. By utilizing an atmospheric scattering model, the image's transmission rate is determined. Subsequently, the estimation of the white point is performed based on the transmission rate and white point characteristics. With the calculated white point, correction gains are computed to achieve white balance for a color-cast image.
    Experimental results show that this method effectively produces white-balanced images on the screen. The findings reveal that the system uses 17,503 logic elements and 107,456 bits of internal memory, with a power consumption of 818.66mW. Additionally, the processing speed achieves 70 images per second (NTSC Input).

    摘要 I Abstract II 致謝 III 目錄 IV 圖目錄 VI 表目錄 VIII 第一章 緒論 1 1.1研究背景 1 1.2文獻回顧 2 1.3論文目標 3 1.4論文架構 3 第二章 暗通道先驗演算法 5 2.1大氣散射模型 6 2.1.1透射率 6 2.1.2大氣光的估計 7 2.2影像估測白點 7 2.2.1極度色偏影像 8 2.2.2低亮度影像 9 2.2.3估測白點校正 11 第三章 系統硬體實現 15 3.1系統架構 15 3.2影像縮放硬體設計 16 3.3 YCbCr轉RGB硬體設計 18 3.4開根號函數硬體設計 19 3.5影像補償硬體設計 21 3.6暗通道先驗硬體設計 22 3.7大氣光硬體設計 23 3.8估測白點 24 3.9影像白平衡 25 第四章 實驗結果與分析 26 4.1軟體 26 4.1.1實驗環境規格 26 4.1.2演算法效果 26 4.2硬體 33 4.2.1 ModelSim 演算法驗證 33 4.2.1.1 ModelSim 演算法驗證結果 34 4.2.2 FPGA 實驗環境規格 34 4.2.2.1視訊解碼晶片簡介 36 4.2.2.2 VGA 標準簡介 36 4.2.2.3攝影機簡介 37 4.2.2.4 DE2-70開發平台驗證 38 4.2.2.5 FPGA硬體資源使用 39 4.2.2.6系統延遲 41 4.2.2.7系統運算量分析 42 第五章 結論與未來研究方向 43 5.1結論 43 5.2未來研究方向 44 參考資料 45

    [1] E. Y. Lam, "Combining Gray world and retinex theory for automatic white balance in digital photography," Proceedings of the Ninth International Symposium on Consumer Electronics, 2005. (ISCE 2005), Macau, China, 2005, pp. 134-139, doi: 10.1109/ISCE.2005.1502356.
    [2] J. Jiang, M. Yang, X. Wang and Z. Wu, "Auto white balance algorithm based on digital camera," International Conference on Internet Technology and Applications, 2011, pp. 1-4, doi: 10.1109/ITAP.2011.6006238.
    [3] T. Jiang, D. Nguyen and K. -D. Kuhnert, "Auto white balance using the coincidence of chromaticity histograms," Eighth International Conference on Signal Image Technology and Internet Based Systems, 2012, pp. 201-208, doi: 10.1109/SITIS.2012.68.
    [4] J. Im, D. Kim, J. Jung, T. -C. Kim and J. Paik, "Dark channel prior-based white point estimation for automatic white balance," IEEE International Conference on Consumer Electronics (ICCE), 2014, pp. 123-124, doi: 10.1109/ICCE.2014.6775936.
    [5] M. Afifi, B. Price, S. Cohen and M. S. Brown, "When color constancy goes wrong: correcting improperly white-balanced images," IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 2019, pp. 1535-1544, doi: 10.1109/CVPR.2019.00163.
    [6] M. Afifi and M. S. Brown, "Deep white-balance editing," IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 2020, pp. 1394-1403, doi: 10.1109/CVPR42600.2020.00147.
    [7] F. Wang, W. Wang, "An automatic white balance method via dark channel prior," Opto-Electronic Engineering, 2018, 45(1): 170549. doi: 10.12086/oee.2018.170549.
    [8] C. C. Weng, H. Chen and C. S. Fuh, "A novel automatic white balance method for digital still cameras," IEEE International Symposium on Circuits and Systems (ISCAS), 2005, pp. 3801-3804 Vol. 4, doi: 10.1109/ISCAS.2005.1465458.
    [9] Y. Cheng, Z. Jia, H. Lai, J. Yang and N. K. Kasabov, "A fast sand-dust image enhancement algorithm by blue channel compensation and guided image filtering," IEEE Access, 2020, vol. 8, pp. 196690-196699, doi: 10.1109/ACCESS.2020.3034151.

    [10] K. He, J. Sun, and X. Tang, “Single image haze removal using dark channel prior,” IEEE transactions on pattern analysis and machine intelligence, 2010, vol. 33, no. 12, pp. 2341–2353.
    [11] C. Li and X. Zhang, “Underwater image restoration based on improved background light estimation and automatic white balance,” 11th International Congress on Image and Signal Processing, BioMedical Engineering and Informatics (CISP-BMEI), 2018, pp. 1-5, doi: 10.1109/CISP-BMEI.2018.8633271.
    [12] E. J. McCartney, “Optics of the atmosphere: scattering by molecules and particles,” New York, John Wiley and Sons, Inc., 1976, vol. 1, pp. 421.
    [13] L. Shi and B. Funt, “Re-processed version of the gehler color constancy dataset of 568 images, ” accessed from http://www.cs.sfu.ca/~colour/data/
    [14] “DE2 development and education board user manual,” [Online]. Available: https://www.terasic.com.tw/attachment/archive/226/DE2_70_User_manual_v105.pdf.
    [15] “Sony EVI-D70 technical manual,” [Online]. Available: http://pro.sony/en_GR/products/ptz-network-cameras/evi-d70-d70p-pal-

    QR CODE