應用軟/硬體協同設計於影像處理系統之開發 王嘉宏、黃登淵
E-mail: [email protected]
摘 要
閥值運算於影像處理之應用相當廣泛,由於影像中每一個物體各自擁有其灰階分佈,因此藉由閥值之使用便能一一將物體 提取出來。但既有的演算法較為複雜,運算也相當費時,難以有效實現於硬體電路中。因此本文便基於硬體電路設計之觀 點,提出HGEM (Histogram-based Gaussian Estimation Method)閥值演算法,並將Sobel邊緣偵測與HGEM演算法實現 於Xilinx Virtex-4 (XC4VLX25) FPGA晶片中,其運算速度可達193.9 MHz,相當於每秒可處理1479張256×256之灰階影像
,已達到即時影像處理系統之需求。 但在許多不同的應用中,單一的影像閥值並無法有效進行多物體的擷取與分類,因此 便需要仰賴多閥值選取的演算法。雖然Otsu演算法可擴展至多閥值之運算,但由於疊代次數過高之問題,會需要相當長的 運算時間。因此本文基於Otsu演算法,提出全新架構之多閥值演算法,亦即為TSMO (Two-Stage Multithreshold Otsu method)演算法,其做法是將整個閥值之搜尋範圍,分為兩階段來進行,藉由降低疊代次數來提升演算法執行之效率。由 實驗結果可知,當TSMO採用32個分區數時,與Otsu演算法之結果相互比較,其誤差平均小於1%,而於5個閥值運算之情 況,其運算速度可提升至超越10萬倍之效能。
關鍵詞 : 邊緣偵測 ; Otsu ; HGEM ; TSMO ; FPGA
目錄
封面內頁 簽名頁 授權書... iii 中文摘要... iv 英文摘要... v 誌謝... vii 目錄... viii 圖目錄... xi 表目
錄... xiv 第一章 緒論 1.1 研究背景... 1 1.2 研究目的... 3 1.3 研 究方法... 4 1.4 論文架構... 6 第二章 影像邊緣偵測技術 2.1 邊緣偵測演算
法... 7 2.2 Otsu閥值演算法... 11 2.3 Recursive Otsu演算法... 12 2.4 HGEM演算 法... 14 2.5 TSMO演算法... 19 第三章 影像邊緣偵測閥值參數化之硬體架構 3.1 系統架 構... 27 3.2 資料傳輸單元... 28 3.3 FPGA記憶體資源... 29 3.3.1 FIFO記憶 體電路設計... 30 3.4 影像資料提取單元... 35 3.4.1 資料提取單元功能模擬... 38 3.4.2 資 料提取單元資源使用分析... 40 3.5 Sobel運算單元... 44 3.6 閥值運算單元... 45 第四 章 Xilinx MicroBlaze系統開發介紹 4.1 MicroBlaze處理器... 48 4.2 晶片匯流排簡介... 50 4.2.1 CoreConnect系統架構... 51 4.2.2 LMB匯流排... 53 4.3 MicroBlaze系統架構... 55 4.4 OPB匯流排之矽智財連接介面... 56 4.5 系統雛形建立... 58 第五章 實驗結果與討論 5.1 HGEM演 算法分析與討論... 61 5.2 TSMO演算法分析與討論... 63 5.3 硬體架構分析... 71 第 六章 結論與未來發展方向 6.1 結論... 75 6.2 未來研究方向... 76 參考文
獻... 78 參考文獻
[1] K. Benkrid, D. Crookes, A. Benkrid, Towards a general framework for FPGA based image processing using hardware skeletons, Journal of Parallel Computing 28 (7-8) (2002) 1141-1154.
[2] Xue Li, Rongchun Zhao, Qing Wang, FPGA based Sobel algorithm as vehicle edge detector in VCAS, IEEE International Conference on Neural Networks and Signal Processing, Nanjing, China, December (2003) 1139-1142.
[3] R.L. Rosas, A. de Luca, F.B. Santillan, SIMD architecture for image segmentation using Sobel operators implemented in FPGA technology, The 2nd International Conference on Electrical and Electronics Engineering (ICEEE) and XI Conference on Electrical Engineering, Mexico City, Mexico, September (2005) 77-80.
[4] P.Y. Hsiao, C.H. Chen, H. Wen, S.J. Chen, Real-time realisation of noise-immune gradient-based edge detector, IEE Proceedings-Computers and Digital Techniques, 153 (4) (2006) 261-269.
[5] A. Benedetti, A. Prati, N. Scarabottolo, Image convolution on FPGAs: the implementation of a multi-FPGA FIFO structure, Proceedings of the 24th Euromicro Conference, Vasteras, Sweden, August (1998) 123-130.
[6] B. Bosi, G. Bois, Y. Savaria, Reconfigurable pipelined 2-D convolvers for fast digital signal processing, IEEE Transactions on Very Large Scale
Integration (VLSI) Systems 7 (3) (1999) 299-308.
[7] V. Muthukumar, D.V. Rao, Image processing algorithms on reconfigurable architecture using HandelC, Proceedings of the Euromicro Symposium on Digital System Design, Rennes, France (2004) 218-226.
[8] C.K. Lee, F.W. Choy, H.C. Lam, Real-time thresholding using histogram concavity, Proceedings of the IEEE International Symposium on Industrial Electronics, Xian, China, 1 (1992) 500-503.
[9] S.E. El-Khamy, M. Lotfy, N. El-Yamany, A modified Fuzzy Sobel edge detector, Seventeenth National Radio Science Conference, Minufiya University, Egypt, February (2000) C32 1-9.
[10] Jianping Fan, Walid G. Aref, Mohand-Said Hacid, Ahmed K. Elmagarmid, An improved automatic isotropic color edge detection technique, Journal of Pattern Recognition Letters 22 (13) (2001) 1419-1429.
[11] C.H. Li, P.K.S. Tam, An iterative algorithm for minimum cross-entropy thresholding, Pattern Recognition Letter 19 (1998) 771-776.
[12] Shu Yang, Ying Han, Cai-Rong Wang, Xiao-Wei Wang, Fast selecting threshold algorithm based on one-dimensional entropy, Proceedings of the Fourth International Conference on Machine Learning and Cybernetics, Guangzhou, China, August (2005) 4554-4557.
[13] URL: http://www.csse.monash.edu.au/hons/projects/2002/Laura.Frost/index.html [14] R.C. Gonzalez, R.E. Woods, Digital image processing, 2nd edition, Prentice Hall, Upper Saddle River, New Jersey, 2002.
[15] A.T. Abak, U. Baris, B. Sankur, The performance evaluation of thresholding algorithms for optical character recognition, Proceedings of the Fourth International Conference on Document Analysis and Recognition August (1997), 697-700.
[16] Feixiang Yan, Hong Zhang, C. Ronald Kube, A multistage adaptive thresholding method, Pattern Recognition Letters 26 (8) (2005), 1183-1191.
[17] D. Aiteanu, D. Ristic, A. Graser, Content based threshold adaptation for image processing in industrial application, International Conference on Control and Automation (ICCA2005), June (2005), 1022-1027.
[18] Hui-Fuang Ng, Automatic thresholding for defect detection, Pattern Recognition Letters 27 (14) (2006), 1644-1649.
[19] E.P. Ong, B.J. Tye, W.S. Lin, M. Etoh, An efficient video object segmentation scheme, Proceedings of IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP2002), (2002), IV-3361-IV-3364.
[20] Guo Jing, D. Rajan, Chng Eng Siong, Motion Detection with Adaptive Background and Dynamic Thresholds, 2005 Fifth International Conference on Information, Communications and Signal Processing, December (2005),41-45.
[21] C. Su, A. Amer, A Real-Time Adaptive Thresholding for Video Change Detection, 2006 IEEE International Conference on Image Processing, October (2006), 157-160.
[22] O. Sukmarg, K.R. Rao, Fast object detection and segmentation in MPEG compressed domain, Proceedings of TENCON 2000 (2000), 364-368.
[23] D. Zhang, G. Lu, Segmentation of Moving Objects in Image Sequence: A Review, Journal of Circuits, Systems, and Signal Processing 20 (2) (2001), 143-183.
[24] A. Amer, Memory-based spatio-temporal real-time object segmentation, Proc. SPIE Int. Symposium on Electronic Imaging, Conf. on Real-Time Imaging (RTI), April (2003), 10-21.
[25] Shao-Yi Chien, Yu-Wen Huang, Bing-Yu Hsieh, Shyh-Yih Ma, Liang-Gee Chen, Fast video segmentation algorithm with shadow cancellation, global motion compensation, and adaptive threshold techniques, IEEE Transactions on Multimedia 6 (5) (2004), 732-748.
[26] M.S. Atkins, B.T. Mackiewich, Fully Automatic Segmentation of the Brain in MRI, IEEE Transactions on Medical Imaging 17 (1) (1998), 98-107.
[27] P.K. Saha, J.K. Udupa, Optimum Image Thresholding via Class Uncertainty and Region Homogeneity, IEEE Transactions on Pattern Analysis and Machine Intelligence 23 (7) (2001), 689-706.
[28] N. Otsu, A threshold selection method from gray-level histogram, IEEE Transactions on System, Man, and Cybernetics, SMC-9 (1) (1979) 62-66.
[29] P.S. Liao, T.S. Chen, P.C. Chung, A fast algorithm for multilevel thresholding, Journal of Information Science and Engineering 17 (5) (2001), 713–727.
[30] B. Sankur, M. Sezgin, Survey over image thresholding techniques and quantitative performance evaluation, Journal of Electronic Imaging 13 (1) (2004) 146-165.
[31] W.A. Yasnoff, J.K. Mui, J.W. Bacus, Error measures for scene segmentation, Pattern Recognition 9(1997), 217–231.
[32] CEDAR Database of Handwritten words, URL: http://www.cedar.buffalo.edu/Databases/CDROM1/words.html [33] FVC2000 Fingerprint Database, URL: http://bias.csr.unibo.it/fvc2000/db2.asp