系統識別號 | U0002-2907200816251000 |
---|---|
DOI | 10.6846/TKU.2008.01053 |
論文名稱(中文) | 即時目標影像追蹤之SoPC 設計 |
論文名稱(英文) | SoPC Design of Real-Time Target Image Tracking |
第三語言論文名稱 | |
校院名稱 | 淡江大學 |
系所名稱(中文) | 電機工程學系博士班 |
系所名稱(英文) | Department of Electrical and Computer Engineering |
外國學位學校名稱 | |
外國學位學院名稱 | |
外國學位研究所名稱 | |
學年度 | 96 |
學期 | 2 |
出版年 | 97 |
研究生(中文) | 李世安 |
研究生(英文) | Shih-An Li |
學號 | 893350099 |
學位類別 | 博士 |
語言別 | 繁體中文 |
第二語言別 | |
口試日期 | 2008-06-11 |
論文頁數 | 106頁 |
口試委員 |
指導教授
-
翁慶昌(wong@ee.tku.edu.tw)
委員 - 龔宗鈞 委員 - 王偉彥 委員 - 許陳鑑 委員 - 周永山 委員 - 翁慶昌 |
關鍵字(中) |
影像處理 影像追蹤 SoPC |
關鍵字(英) |
Image Process Image Tracking SoPC |
第三語言關鍵字 | |
學科別分類 | |
中文摘要 |
本論文提出一個可以加快影像擷取與顯示之多主從系統架構,並且提出一個依據SoPC (System on a Programmable Chip)技術之軟硬體共同設計方法來實現即時的人體膚色追蹤。在加快影像擷取與顯示之多主從系統架構上,本論文設計五個硬體電路:(1)CMOS 擷取模組(CMOS Capture Module),(2)RAW2RGB 模組(Raw to RGB Module),(3)CMOS主控端模組(CMOS Master Module),(4)LCM 主控端模組(LCM Master Module)及(5)LCM 控制模組(LCM Control Module)。從實驗結果可以驗證所提之多主從系統架構確實可以加快影像擷取與顯示並且有效減少Nios II 處理器的負擔。此外,在即時的人體膚色追蹤之設計與實現上,本論文結合C 語言與硬體描述語言之軟硬體共同設計方法來設計七個影像處理模組:(1)影像濾波器(Image Filter),(2)影像擷取器(Image Grabber),(3)人體膚色偵測(Face Skin Detection),(4)影像增強處理(Image Enhancement),(5)邊緣偵測(Edge Detection),(6)目標物分割(Object Segment)及(7)目標物顯示(Object Display)。從實驗結果可以驗證所提之軟硬體共同設計亦確實可以用較少的影像處理時間來達到即時的人體膚色目標之辨識與追蹤。 |
英文摘要 |
In this thesis, a multiple master-slave system architecture is proposed to accelerate the process speed of image capture and display. Furthermore, a software and hardware co-design method based on a SoPC (System on a Programmable Chip) technique is proposed to implement a real-time target image tracking. In the proposed multiple master-slave system architecture, five hardware accelerating circuits: (1) CMOS Capture Module, (2) Raw to RGB Module, (3) CMOS Master Module, (4) LCM Master Module, and (5) LCM Control Module are design and implemented. Some experiment results illustrate that the proposed multiple master-slave architecture can actually accelerate the process speed of image capture and display. Moreover, the loading of Nios II processor can be reduced effectively. In the design and implementation of real-time face skin tracking, a software and hardware co-design method which integrates C language and Hardware Description Language (HDL) is applied to design seven image processing modules: (1) Image Filter, (2) Image Grabber, (3) Face Skin Detection, (4) Image Enhancement, (5) Edge Detection, (6) Object Segment, and (7) Object Display. Some experiment results illustrate that the image processing time is reduced effectively by the proposed method so that a real-time tracking of face skin object can be implemented. |
第三語言摘要 | |
論文目次 |
目錄 第一章 序論 .................................................. 1 1.1 背景介紹 ....................................................................... 1 1.2 研究目的 ....................................................................... 3 1.3 論文架構 ....................................................................... 5 第二章 軟硬體共同設計平台 ...................... 6 2.1 前言 ............................................................................... 6 2.2 CMOS 擷取模組介紹 ................................................... 9 2.2.1 CMOS 擷取模組特性 .......................................... 9 2.2.2 CMOS 擷取模組內部電路圖 ............................ 10 2.2.3 CMOS 擷取模組內部功能方塊 ........................ 11 2.2.4 CMOS 擷取模組影像格式 ................................. 13 2.3 Terasic 3.6” 數位 LCD 顯示面板介紹 .................... 19 2.3.1 LCM 顯示模組特性 ........................................... 20 2.3.2 LCM 顯示模組腳位說明 ................................... 20 2.3.3 LCM 顯示模組內部方塊圖 ............................... 22 2.3.4 LCM 顯示模組之訊號時序圖介紹 ................... 23 2.3.5 LCM 顯示模組SPI 傳輸格式 ........................... 26 第三章 系統整合之軟硬體共同設計 ........ 29 3.1 前言 ............................................................................. 29 3.2 多主從系統架構介紹 ................................................. 33 3.3 Master 端與Slave 端設計介紹 .................................. 35 3.3.1 Slave 端設計 ....................................................... 35 3.3.2 Master 端設計 .................................................... 39 3.4 使用者自訂介面介紹 ................................................. 42 第四章 影像的資料擷取與顯示之硬體實現 ...................................................................... 46 4.1 前言 ............................................................................. 46 4.2 硬體設計架構 .............................................................. 50 4.3 實驗結果 ...................................................................... 62 第五章 影像目標物分割方法 .................... 63 5.1 前言 ............................................................................. 63 5.2 目標物分群法 ............................................................. 65 第六章 即時人體膚色追蹤實現 ................ 73 6.1 前言 ............................................................................. 73 6.2 辨識流程 ..................................................................... 73 6.3 人體膚色追蹤之硬體實現 ................................... 82 6.4 實驗結果 ..................................................................... 89 6.4.1 人體膚色即時追蹤結果 .................................... 93 第七章 結論與未來展望 ............................ 99 參考文獻 .................................................... 101 研究著作 .................................................... 104 得獎經歷 .................................................... 106 圖目錄 圖 目 錄 圖2.1 DE2 開發板實體圖[2] .................................................................... 8 圖2.2 DE2 開發板搭配DVD 多媒體平台[2].......................................... 8 圖2.3 DE2 開發板搭配數位相機與LCM 顯示模組平台[2] ................. 8 圖2.4 CMOS 擷取模組之實體圖[2] ........................................................ 9 圖2.5 CMOS 擷取模組之接腳訊號圖 ................................................... 11 圖2.6 CMOS 擷取模組內部功能方塊圖[14] ........................................ 12 圖2.7 CMOS 擷取模組影像框架 ........................................................... 12 圖2.8 CMOS 擷取模組有效資料格式 ................................................... 13 圖2.9 CMOS 擷取模組影像訊號 ........................................................... 14 圖2.10 Bayer Pattern 像素圖................................................................... 15 圖2.11 CMOS 擷取模組像素資料時序圖(1) [14] ................................. 15 圖2.12 CMOS 擷取模組像素資料時序圖(2) [14]................................. 16 圖2.13 I2C 界面16 位讀出順序[14] ...................................................... 17 圖2.14 I2C界面16 位寫入順序[14] ..................................................... 18 圖2.15 LCM 顯示模組實體圖[2] ........................................................... 19 圖2.16 LCM 顯示模組內部架構圖[15] ................................................. 22 圖2.17 LCM 顯示模組時序圖[15] ......................................................... 23 圖2.18 Through mode 時脈規格[15] ..................................................... 24 圖2.19 交錯式掃描方式時序圖[15] ...................................................... 25 圖2.20 非交錯掃描方式時序圖[15] ...................................................... 25 圖2.21 SPI 控制訊號時序圖[15] ............................................................ 26 圖2.22 三種模式下的資料存取時序圖[15] ` ....................................... 27 圖3.1 傳統的軟硬體共同設計流程[22]................................................. 30 圖3.2 SoPC 系統的軟硬體共同設計架構[22] ...................................... 31 圖3.3 Nios II 處理器標準硬體週邊功能方塊圖 ................................... 32 圖3.4 傳統匯流排的傳輸方式 .............................................................. 33 圖3.5 Avalon Bus 的傳輸方式 ................................................................ 33 圖3.6 Slave 讀取模式時序圖[16] ........................................................... 36 圖3.7 Slave 端寫入模式時序圖[16] ....................................................... 37 圖3.8 多個等待週期的讀取模式[16] .................................................... 38 圖3.9 多個等待週期的寫入模式[16] .................................................... 38 圖3.10 Master 端讀取模式時序圖[16] ................................................... 40 圖3.11 Master 端寫入模式時序圖[16] ................................................... 40 圖3.12 Maste 端有等待模式讀取時序圖[16] ........................................ 41 圖3.13 Master 端有等待模式寫入時序圖[16] ...................................... 41 圖3.14 整合使用者自定介面至Avalon Bus 內示意圖 ....................... 42 圖3.15 SoPC Builder 使用者介面 .......................................................... 43 圖3.16 新增使用者自訂介面程式 ........................................................ 44 圖3.17 連接使用者自訂介面訊號 ........................................................ 44 圖3.18 Component Editor 介面 .............................................................. 45 圖3.19 Avalon Bus 連接圖 ..................................................................... 45 圖4.1 軟硬體共同設計流程圖 .............................................................. 47 圖4.2 傳統單晶片控制電路 .................................................................. 48 圖4.3 CMOS 影像擷取與顯示流程圖 ................................................... 50 圖4.4 CMOS_Capture 模組符號圖 ........................................................ 51 圖4.5 CMOS 擷取模組內部架構圖 ....................................................... 52 圖4.6 RAW2RGB 模組符號圖 ............................................................... 53 圖4.7 原始bayer pattern 資料排列格式 ............................................... 54 圖4.8 bayer pattern 顏色計算方式 ........................................................ 54 圖4.9 RAW2RGB 模組內部架構圖 ....................................................... 56 圖4.10 CMOS 主控端模組符號圖 ......................................................... 57 圖4.11 LCM 主控端模組符號圖 ............................................................ 59 圖4.12 LCM 控制模組符號圖 ................................................................ 61 圖5.1 門檻值對最鄰近法分群的影響。(a)當門檻值為1 T 時可分為4 類,(b)當門檻值為2 T 時可分為3 類。 .................................................. 66 圖5.2 資料密度概念圖 .......................................................................... 68 圖5.3 有效影像像素陣列圖 .................................................................. 68 圖5.4 目標物邊界定義資料 .................................................................. 68 圖5.5 DBSCL 法之說明圖 ..................................................................... 70 圖5.6 單一目標物的搜尋。(a)原始圖像與(b)以DBSCL 法搜尋得到單 一目標物位置。 ...................................................................................... 72 圖5.7 多目標的搜尋(一)。(a)原始圖像與(b)以DBSCL 法搜尋得到多 目標物位置。 .......................................................................................... 72 圖5.8 多目標的搜尋(二)。(a)原始圖像與(b)以DBSCL 法搜尋得到多 目標物位置。 .......................................................................................... 72 圖6.1 人體膚色目標追蹤流程 ............................................................... 74 圖6.2 3× 3低通濾波器遮罩 .................................................................. 75 圖6.3 ( , ) 0 1 F r g = 與( , ) 0 2 F r g = 在r-g 平面的示意圖 ......................... 78 圖6.4 膚色範圍在r-g 平面的示意圖 ................................................... 78 圖6.5 3×3侵蝕遮罩 ............................................................................... 78 圖6.6 3×3膨脹遮罩 ............................................................................... 78 圖6.7 3×3邊緣偵測遮罩 ...................................................................... 79 圖6.8 3×3低通濾波器遮罩 .................................................................. 83 圖6.9 改良後低通濾波器遮罩 .............................................................. 83 圖6.10 深度為320 寬度為10 位元的Line Buffer 符號圖 ................. 84 圖6.11 硬體遮罩流程圖 ......................................................................... 85 圖6.12 侵蝕遮罩處理方塊 .................................................................... 86 圖6.13 侵蝕硬體電路流程圖 ................................................................ 86 圖6.14 膨脹遮罩處理方塊 .................................................................... 87 圖6.15 膨脹硬體電路流程圖 ................................................................ 87 圖6.16 目標物標記程式虛擬碼 ............................................................ 88 圖6.17 在使用Image Filter 硬體模組之前與之後比較圖 ................... 90 圖6.18 人體膚色影像追蹤。(a)原始影像,(b)執行Image Enhancement 前的影像,(c)執行Image Enhancement 硬體電路後的圖形,(d)標示出 目標物範圍影像。 .................................................................................. 92 圖6.19 單一目標人體膚色硬體即時追蹤實現結果展示連續圖(一) . 94 圖6.20 單一目標人體膚色硬體即時追蹤實現結果展示連續圖(二) . 95 圖6.21 多目標人體膚色硬體即時追蹤實現結果展示連續圖 ............ 97 圖6.22 遠距離多目標人體膚色硬體即時追蹤實現結果展示連續圖 98 表目錄 表2.1 LCM 顯示模組訊號說明 .............................................................. 21 表2.2 SPI 時序訊號規格 ......................................................................... 26 表2.3 各暫存器功能說明 ...................................................................... 28 表3.1 Slave 端常用訊號表 ..................................................................... 35 表3.2 Master 端常用訊號表 ................................................................... 39 表4.1 CMOS 擷取模組輸出入訊號說明表 ........................................... 52 表4.2 RAW2RGB 模組輸出入訊號說明表 ........................................... 54 表4.3 CMOS 主控端模組內部暫存器說明 ........................................... 57 表4.4 CMOS 主控端模組輸出入訊號說明表 ....................................... 58 表4.5 LCM 主控端模組輸出入訊號說明表 .......................................... 60 表4.6 LCM 控制模組輸出入訊號說明表 .............................................. 61 表4.7 傳統Nios II 處理與多主從架構處理方式之實驗結果 ............. 62 表6.1 Nios II 處理器在影像處理模組之處理時間表 ........................... 82 表6.2 人體膚色偵測模組時間比較表 .................................................. 91 表6.3 Face Skin Detection 資源比較表 .................................................. 91 表6.4 影像增強模組時間比較表 ........................................................... 91 表6.5 人體膚色追蹤各模組時間表 ...................................................... 93 |
參考文獻 |
[1] Altera多媒體發展平台DE2網址,URL: http://university.altera.com/materials/unv-dev-edu-boards.html [2] 友晶科技網址,URL: http://www.terasic.com.tw/ [3] J. O. Hamblen, “Using an FPGA-base SOC approach for senior design projects,” IEEE International Conference on Micro electronic System Education, 2003 [4] Altera Corporation, NIOS Embedded Processor User’s Guide, http://www.altera.com/products/devices/Nios/nio-index.html [5] Altera Corporation, Nios 3.0 CPU Data Sheet, 2003. [6] Altera Corporation, Nios Embedded Processor Software Development Reference Manual, 2003. [7] Altera Corporation, Nios Embedded Processor Hardware Development Reference Manual, 2003. [8] Altera Corporation, SOPC Builder User Guide, 2003. [9] 潘松、黃繼業、曾毓,SOPC設計實務,全華出版社,May 2006。 [10] 蕭如宣,SOPC系統設計,儒林出版社,Jun. 2003。 [11] Altera Corporation, Nios Tutorial Altera, April 2002. [12] S. Brown and Z. Vranesic, Fundamentals of Digital Logic with VHDL Design, 2nd. McGraw-Hill, July 2004. [13] Micron Technology Incorporated, 1/3-Inch Mega Pixel CMOS Active-Pixel Digital Image Sensor, 2004. [14] Altera Corporation, Avalon Memory-Mapped Interface Specification, November 2006. [15] Toppoly Optoelectronics Corporation, TPG051-RGB Driver/Timing Controller IC For LTPS TFT LCD, 2005. [16] Altera Corporation, Avalon Interface Specifications, March 2008. [17] Altera Corporation, Designing with Nios II and SOPC Builder Exercise Manual, 2006. [18] Altera Corporation, Altera Nios® II Embedded Processor Training,2007. [19] R. C. Gonzalez and R. E. Woods, Digital Image Processing, 2nd Edition, Prentice Hall, pp.626-627, 2002. [20] Alan C. K. Ng, and B. Zeng, “A new fast motion estimation algorithm based on search window sub-sampling and object boundary pixel block matching,” Proceedings of the 1998 IEEE International Conference on Image rocessing, vol.3, pp.605-608,Oct. 1998. [21] S. A. El-Azim, I. Ismail, and H. A. El-Latiff, “An efficient object tracking technique using block-matching algorithm,” Proc. of the Nineteenth National, Radio Science conference, pp.427-433, 2002. [22] URL:http://ee.sjtu.edu.cn:8080/wangzhan/PLDlecture%20note/ch6/ch6_2_Altera_SoPC_NiosII.ppt [23] 吳晉嘉,運用區塊運動估測之即時多目標影像追蹤,國立臺灣 海洋大學機械與輪機工程學系碩士論文(指導教授:劉倫偉),2004。 [24] 張家榮,使用等高集合法對多目標移動物追蹤之研究,元智大學電機工程學系碩士論文(指導教授:陳永盛),2001。 [25] 繆紹綱,數位影像處理-活用MATLAB,全華科技圖書股份有限公司,2006。 [26] 王國強,人眼追蹤系統及其於人機介面之應用,中央大學資訊工程所碩士論文(指導教授:蘇木春),2003。 [27] D. Y. Huang, K. C. Chuang, Y. H. Yang, N. H. Chen, and J. H. Wang, “A multiple-face detection algorithm for complex backgrounds,” Journal of Science and Engineering Technology, vol. 3, no. 3, pp. 35-43, 2007. [28] M. Soriano, B. Martinkauppi, S. Huovinen, and M. Laaksonen,“Skin color modeling under varying illumination conditions using the skin locus for selecting training pixels,” Proceedings Workshop on Real-Time Image Sequence Analysis, pp.43-49, 2000. [29] M. Soriano, B. Martinkauppi, S. Huovinen, and M. Laaksonen, “Skin detection in video under changing illumination conditions,”Proceedings of the 15th International Conference on Pattern Recognition, pp.839-842, 2000. [30] 林信佑,應用於多媒體通訊之平台式設計,中央大學電機工程 研究所碩士論文(指導教授:蔡宗漢),2003。 [31] 陳慶逸、林柏辰, VHDL數位電路實習與專題設計,文魁資訊 股份有限公司,2003. [32] 唐佩忠,VHDL與數位邏輯設計, 高立圖書有限公司,1999 |
論文全文使用權限 |
如有問題,歡迎洽詢!
圖書館數位資訊組 (02)2621-5656 轉 2487 或 來信