系統識別號 | U0002-2508201017251600 |
---|---|
DOI | 10.6846/TKU.2010.00899 |
論文名稱(中文) | 以光流導引為基礎之機器人的設計與實現 |
論文名稱(英文) | Design and Implementation of Optical-Flow-Based Guiding Robot |
第三語言論文名稱 | |
校院名稱 | 淡江大學 |
系所名稱(中文) | 電機工程學系碩士班 |
系所名稱(英文) | Department of Electrical and Computer Engineering |
外國學位學校名稱 | |
外國學位學院名稱 | |
外國學位研究所名稱 | |
學年度 | 98 |
學期 | 2 |
出版年 | 99 |
研究生(中文) | 江慶京 |
研究生(英文) | Ching-Jing Jiang |
學號 | 697470051 |
學位類別 | 碩士 |
語言別 | 繁體中文 |
第二語言別 | |
口試日期 | 2010-07-21 |
論文頁數 | 70頁 |
口試委員 |
指導教授
-
翁慶昌(wong@ee.tku.edu.tw)
委員 - 姚立德(ltyao@ntut.edu.tw) 委員 - 陳珍源(jychen@mail.mcu.edu.tw) 委員 - 許陳鑑(jameshsu@mail.tku.edu.tw) 委員 - 李宜勳(ihsumlee@mail.lit.edu.tw) |
關鍵字(中) |
機器人 光流 現場可規劃閘陣列 比例積分控制 |
關鍵字(英) |
Robotics Optical Flow FPGA Proportional and Integral Controller |
第三語言關鍵字 | |
學科別分類 | |
中文摘要 |
本論文提出並實現一種以光流演算法為基礎之機器人視覺追蹤系統。透過使光流演算法來偵測場景中的變化,讓機器人可以隨場景中的揮手動作來做移動,達到視覺跟隨之目的。本論文將系統架構於Linux系統上,並以OpenCV函式庫來建立光流之擾動偵測演算法(optical-flow perturbation detect algorithm)。光流擾動偵測演算法主要有四步驟:(1)取得影像之差異,(2)去除背景雜訊,(3)計算畫面內之擾點能量,及(4)取得影像感興趣區域。在機器人的設計與實現上,本論文設計了一台可以穩定移動之機器人平台,讓光流演算法可以順利的在場景中偵測到揮手的動作變化,並且以硬體描述語言將比例積分控制器設計實現在FPGA晶片上來控制馬達。從實驗結果可知,本論文所提方法確實可以讓機器人有效的依據光流演算法來偵測揮手動作,達到以光流導引機器人的目的。 |
英文摘要 |
In this thesis, an optical-flow based tracking system is implemented. With the optical-flow perturbation detect algorithm, the robot can follow the hand waving in scene, and reach the goal of visual following. The system architecture in this thesis is based on linux system, and use OpenCV library to implement optical-flow perturbation detect algorithm. There are 4 steps of optical-flow perturbation detection: (1) Get difference between two frames, (2) Remove background noise, (3) Calculate the sum of perturbation energy, (4) Gather the Region Of Interest (ROI) from image. For design and implement action, this thesis designs a robot to move in constant speed, improve the result of optical-flow algorithm to detect the waving hand, and implement a Proportional and Integral Controller by Verilog HDL on FPGA to control the motor. From the experiment result, the method of this thesis can lead the robot to follow the waving hand, reach the goal of optical-flow tracking. |
第三語言摘要 | |
論文目次 |
目錄 III 圖目錄 V 表目錄 VIII 第一章 序論 1 1.1 研究背景與動機 1 1.2文獻探討 2 1.3 論文架構 3 第二章 平台介紹 4 2.1 平台概觀 4 2.2 雙眼視覺機構簡介 6 2.2.1攝影機規格 7 2.2.2雙眼視覺攝影機函式庫 8 2.3 軟體架構 12 2.3.1 OpenCV函式庫介紹 13 2.3.2 Linux作業系統介紹 16 2.4 硬體架構及FPGA PI控制器 17 2.4.1 演算核心 20 2.4.2 移動控制子系統 21 2.4.3 Avalon 匯流排簡介 24 2.4.4 硬體PI控制器介紹 29 2.4.5有限狀態機(FSM)介紹 31 2.4.6 PWM模組簡介 32 2.4.7編碼器取樣模組簡介 33 第三章 光流演算法 35 3.1 簡介 35 3.2 演算法理論 35 3.2.1光流變化強度計算 36 3.2.2高通濾波 39 3.2.3形態學處理 41 3.2.4擾動能量計算 43 3.2.5自主移動追蹤 45 第四章 實驗結果與分析 49 4.1 PI控制硬體模擬及測試 49 4.1.1 PI控制器模擬結果 49 4.1.2 PI控制實測結果 53 4.1.3 測試結論 59 4.2 光流追蹤實測結果 60 4.2.1 靜止時之光流擾動分析及定位 60 4.2.2 移動中光流追蹤結果實測 62 第五章 結論與未來展望 67 參考文獻 68 圖目錄 圖2.1、 雙輪機器人視覺平台實體圖 5 圖2.2、 雙眼視覺機構之實體圖 7 圖2.3、 攝影機函式庫方塊圖 8 圖2.4、 視覺伺服控制模組方塊圖 8 圖2.5、 影像擷取模組方塊圖 9 圖2.6、 RGB、YUYV色彩空間轉換 10 圖2.7、 YUYV顏色空間轉換RGB流程圖 11 圖2.8、 Linux系統與應用程式之關係圖 12 圖2.9、 OpenCV視窗範例 14 圖2.10、 侵蝕運算範例 14 圖2.11、 膨脹運算範例 15 圖2.12、 cvCircle繪製範例 15 圖2.13、 cvLine繪製範例 16 圖2.14、 硬體架構圖 18 圖2.15、 控制命令階層及訊號流 19 圖2.16、 筆記型電腦實體圖 20 圖2.17、 移動控制子系統實體圖 21 圖2.18、 Nios II開發板實體圖 22 圖2.19、 Pololu 30A高功率馬達驅動器 23 圖2.20、 Avalon 匯流排之Slave端時序圖 24 圖2.21、 SOPC Builder內之PI控制器硬體模組 26 圖2.22、 由Nios II延伸出之PI控制器硬體模組腳位 26 圖2.23、 移動控制子系統方塊圖 29 圖2.24、 PI控制器硬體方塊圖 29 圖2.25、 PI控制器核心計算流程圖 30 圖2.26、 PI控制有限狀態機架構圖 31 圖2.27、 PWM模組架構圖 32 圖2.28、 編碼器取樣模組架構圖 33 圖2.29、 取樣模組模擬波形範例 34 圖3.1、 光流追蹤之流程圖 38 圖3.2、 揮手之影像相減結果 39 圖3.3、 高通濾波前之線性函數 40 圖3.4、 高通濾波後之線性函數 40 圖3.5、 高通濾波後之揮手影像 41 圖3.6、 揮手之影像閉運算結果 42 圖3.7、 擾動能量計算流程 44 圖3.8、 擾動訊號整合及輸出流程 46 圖3.9、 ROI位置與中心點之關係 47 圖3.10、 SR為66、SL為38時的移動行為 48 圖4.1、 PI控制器模擬結果,模擬馬達鎖死情況 50 圖4.2、 PI控制器模擬結果,模擬馬達開始啟動的情況 52 圖4.3、 PI控制器模擬結果,模擬馬達被加速的情況 53 圖4.4、 Maxon 300869直流電刷馬達實體圖 54 圖4.5、 Kp=2.0、Ki =0, 空負載的PI控制器實測結果 55 圖4.6、 Kp=2.0、Ki =0, 有負載的PI控制器實測結果 55 圖4.7、 Kp =0.5、Ki =0.1, 空負載的PI控制器實測結果 56 圖4.8、 Kp =0.5、Ki =0.1, 有負載的PI控制器實測結果 57 圖4.9、 Kp =0.85、Ki =1.2, 空負載的PI控制器實測結果 58 圖4.10、 Kp=0.85、Ki =1.2, 有負載的PI控制器實測結果 58 圖4.11、 身體移動時產生的光流影像 60 圖4.12、 身體移動的光流能量估測網格 61 圖4.13、 揮手的光流影像 61 圖4.14、 揮手的光流能量估測網格,右方影像內的框為ROI 61 圖4.15、 光流追蹤之室內實測過程 63 圖4.16、 光流追蹤之室內實測時的移動軌跡 63 圖4.17、 於空曠室內空間利用環境光於複雜環境下導引 66 圖4.18、 於空曠室內空間測試時的移動軌跡 66 表目錄 表 2.1、雙輪機器人視覺平台之規格表 5 表2.2、雙眼視覺機構規格 6 表2.3、網路攝影機規格 7 表2.4、OpenCV函式庫列表 13 表2.5、Linux系統規格表 17 表2.6、筆記型電腦規格表 20 表2.7、FPGA Nios II開發板規格表 22 表2.8、Pololu 30A高功率馬達驅動器腳位表 23 表2.9、Avalon 匯流排之Slave端常用訊號配置表 25 表2.10、PI控制器硬體模組暫存器表 27 表2.11、PI控制器硬體模組腳位表 28 |
參考文獻 |
[1] RobotCup@Home,URL: http://www.robocup.org/robocup-home/ [2] Region Of Interest, URL: http://en.wikipedia.org/wiki/Region_of_interest [3] Lucas B. D. and Kanade T., “An iterative image registration technique with an application to stereo vision.”, Proceedings of Imaging understanding workshop, pp. 121-130, 1981. [4] B.K.P. Horn and B.G. Schunck, “Determining optical flow.” Artificial Intelligence, vol 17, pp 185-203, 1981. [5] 視覺皮質與孔徑問題,URL: http://ai.mmdays.com/2009/07/11/aperture_problem/ [6] 尤拉-拉格朗日方程(Euler-Lagrange_equations),URL: http://en.wikipedia.org/wiki/Euler-Lagrange_equations [7] 鋁擠型支架網址,URL: http://www.ihen.com.tw [8] Robotis公司網址,URL: http://www.robotis.com/xe/dynamixel_en [9] Guvcview程式網站,URL: http://guvcview.berlios.de/ [10] OpenCV網站,URL: http://sourceforge.net/projects/opencvlibrary/ [11] Getoo網站,URL: http://www.gentoo.org/ [12] 茂綸網站EK2C20F使用手冊,URL: http://www.gfec.com.tw/word_file/UG_EK2C20V2_3.pdf [13] Pololu網站,URL: http://www.pololu.com/catalog/product/705 [14] Altera Avalon Bus Spec, URL: http://www.altera.com/literature/manual/mnl_avalon_spec.pdf [15] Introduction to the Altera SOPC Builder, URL: http://www.cs.columbia.edu/~sedwards/classes/2010/4840/tut_sopc_introduction.pdf [16] 李世安,自主移動機器人之定位系統與路徑規劃的設計,淡江大學電機工程學系碩士班碩士論文(指導教授: 翁慶昌),2002. [17] 楊紹聖、蕭明均、李進福、蔡培元,Verilog數位電腦設計,全華科技圖書股份有限公司,2001。 [18] Y. F. Chan, M. Moallem, and W. Wang, “Design and Implementation of modular FPGA-based PID controllers”, IEEE Transactions on Industrial Electronics, vol.54, no.4, pp.1898-1906, Aug. 2007. [19] S. Su Kim, S. Jung, “Hardware implementation of a real time neural network controller with a DSP and an FPGA”, IEEE International Conference on Robotics and Automation, pp. 4639-4644 Vol.5, May. 2004. [20] FPGA Implementation of a PID Controller with DC Motor Application , URL: http://cegt201.bradley.edu/projects/proj2002/toetruck/index.html [21] Wikipedia, Finit-State Machine, URL: http://en.wikipedia.org/wiki/Finite-state_machine [22] Wikipedia, Rotary Encoder, URL: http://en.wikipedia.org/wiki/Rotary_encoder [23] Maxon HEDL Rotary Encoder, URL: http://test.maxonmotor.com/docsx/Download/Product/Pdf/HEDL550-E.pdf [24] Wikipedia , Optical Flow, URL: http://en.wikipedia.org/wiki/Optical_flow [25] N. Paragios, Y. Chen, and O. Faugeras, Handbook of Mathematical Models in Computer Vision, Springer, pp. 239-258, 2005. [26] G. Woods 著,謬紹剛 編譯,數位影像處理,培生教育出版,2004。 [27] 台灣麥柯昇公司網站,URL: http://www.maxonmotor.com.tw/ |
論文全文使用權限 |
如有問題,歡迎洽詢!
圖書館數位資訊組 (02)2621-5656 轉 2487 或 來信