系統識別號 | U0002-2707202122113100 |
---|---|
DOI | 10.6846/TKU.2021.00754 |
論文名稱(中文) | 自動偵測室內通道的實現 |
論文名稱(英文) | Implementation of Automatic Detection of Indoor Channels |
第三語言論文名稱 | |
校院名稱 | 淡江大學 |
系所名稱(中文) | 航空太空工程學系碩士班 |
系所名稱(英文) | Department of Aerospace Engineering |
外國學位學校名稱 | |
外國學位學院名稱 | |
外國學位研究所名稱 | |
學年度 | 109 |
學期 | 2 |
出版年 | 110 |
研究生(中文) | 吳宗昇 |
研究生(英文) | Zong-Sheng Wu |
學號 | 609430078 |
學位類別 | 碩士 |
語言別 | 繁體中文 |
第二語言別 | |
口試日期 | 2021-06-22 |
論文頁數 | 94頁 |
口試委員 |
指導教授
-
蕭富元
委員 - 呂文祺 委員 - 蕭富元 委員 - 馬德明 |
關鍵字(中) |
Raspberry pi PX4 四軸旋翼無人機 Matlab Simulink |
關鍵字(英) |
Raspberry pi PX4 Quadrotor Matlab Simulink |
第三語言關鍵字 | |
學科別分類 | |
中文摘要 |
本研究主要開發室內通道偵測演算法的實現技術。現今無人飛行載具 (簡稱無人機) 的室外導航,主要透過全球定位系統 (GPS) 提供定位訊號。由於室內 GPS 訊號會被屏蔽,在無法進行導航定位的前提下,便自然限縮無人機在室內的應用性。本研究參考李柏儀的研究,欲將其所發展出來的「室內通道偵測」演算法,透過樹莓派 (Raspberry Pi) 單板電腦實現。 具體來說,本研究將李柏儀所發展的演算法,改寫至樹莓派中。由於樹莓派可直接配備雙鏡頭模組,只需對畫面加以校正。故本研究直接使用其雙鏡頭模組來進行立體視覺運算。再者,為了本研究在無人機自主飛行的架構中,擔任導航資訊的提供者。因此,本研究亦將影像處理過後的訊息,傳送給 PixhawK,用以驗證硬體架構。本研究可視為簡化版的「即時區域地圖建構」(SLAM) 演算法,因此不論是運算時間或運算資源,都比完整功能的 SLAM 更有效率。所以本研究對於未來無人機在室內的應用,有莫大助益。 |
英文摘要 |
This thesis focuses on the implementation of automatic detection of hallways or openings. Nowadays, outdoor navigation of an unmanned aerial vehicle (UAV) most rely on global position systems, such as GPS. Due to the shade of walls, GPS signal is inaccessible indoors, causing that applications of UAVs become constrained and limited. This research employed Po-Yi Lee's algorithm on automatic detection of hallways, and implement the algorithm in a Raspberry Pi board. In specific, this thesis re-write Lee's algorithm on automatic detection of hallways, and implement the algorithm in a Raspberry Pi board. Since a double-camera module can be installed in Raspberry Pi, we adopt this module as the sources of stereo-vision. Notably, the camera should be calibrated before use. On the other hand, Lee's algorithm plays a role of navigation sensor. This research also connect the Raspberry Pi with a Pixhawk, which will be used as an attitude controller, to verify the control structure. Our work can be viewed as a ``simplified version' of the simultaneous localization and mapping (SLAM) system. As a result, the computation time is much less than a full version of SLAM. This thesis potentially contributes to the applications of UAV indoors. |
第三語言摘要 | |
論文目次 |
目錄 1 緒論 1 1.1研究動機.......................................... 1 1.2研究目標.......................................... 2 1.3 研究方法......................................... 3 1.3.1 整體I/O架構 ................................... 5 1.3.2 通訊協議....................................... 5 1.3.3 三維空間資訊重建原理............................. 6 1.4文獻回顧.......................................... 7 2 硬體選用 9 2.1 Pixhawk飛行控制電腦 ............................. 10 2.1.1 Pixhawk飛控電腦的校正........................... 11 2.2 Raspberrypi樹莓派計算電腦......................... 14 2.2.1 Raspberrypi樹莓派的安裝與設定.................... 16 2.3 Pixhawk與Raspberrypi結合......................... 18 2.4 SynchronizedStereo樹莓派同步立體相機............... 19 2.4.1 樹莓派相機安裝步驟 .............................. 20 3 軟體架設 23 3.1 PuTTY .......................................... 24 3.2 PX4embeddedcodersupportpackage.................. 24 3.2.1 SimulinkPX4的燒錄應用........................... 25 4 通訊協議建立 29 4.1 TFTP普通文件傳遞協議 .............................. 30 4.2 建立傳輸系統 ..................................... 30 4.3 導航數據......................................... 32 5 三維深度影像 33 5.1 深度影像圖製作................................... 34 5.2 深度影像處理流程................................. 36 5.2.1 SSD演算法 .................................. 38 5.3 演算效率優化 .................................... 40 5.3.1 強紋理匹配法................................... 40 5.4 圖像框匹配....................................... 43 5.5 雜訊消除........................................ 45 5.5.1 灰階與HSI色調.................................. 46 5.5.2 中值率波器 .................................... 48 5.5.3 侵蝕與膨脹 .................................... 49 6 影像處理 51 6.1 影像處理流程 ..................................... 52 6.2 雙影像處理背景程式 ................................ 53 6.3 相機校正......................................... 53 6.3.1 Harris角點偵測 ................................ 56 6.4 實際深度運算 ..................................... 58 6.4.1 幾何最近可辨識距離 ............................. 60 6.5 影像深度中心點運算 ................................ 63 6.5.1 二值化........................................ 63 6.5.2 圖像矩中計算方法 .............................. 64 6.6 坐標系轉換....................................... 65 7 實驗模擬與討論 69 7.1 模擬方式......................................... 70 7.2 模擬路徑比較 ..................................... 71 7.2.1 一般通道....................................... 71 7.2.2 寬大空間....................................... 73 7.2.3 樓梯 ......................................... 73 7.2.4 傾斜影像測試................................... 74 7.2.5 陰暗通道測試................................... 75 7.3 影像縮小測試 .................................... 76 7.4 室內通道實際測試.................................. 77 8 未來展望 81 8.1 結論........................................... 81 8.2 未來展望........................................ 82 參考文獻 84 圖目錄 圖 1.1 研究流程圖......................................4 圖 1.2 控制迴路 I/O 架構示意圖..........................5 圖 1.3 水平影像位置呈現變化..............................6 圖 1.4 Stereo 影像計算示意圖 [1]........................7 圖2.1 Pixhawk[2] ..................................... 11 圖2.2 PX4韌體燒錄選擇................................. 12 圖2.3 Pixhawk1l四軸韌體選擇 ............................. 13 圖2.4 Pixhawk1陀螺儀校正............................... 13 圖2.5 Pixhawk1串口Baudrate設定........................... 14 圖2.6 RaspberryPI4[3]................................... 16 圖2.7 Raspbian下載[4].................................. 17 圖2.8 BalenaEtcher燒錄軟體設定............................ 18 圖2.9 RaspberrypiConfiguration設定...................... 18 圖2.10Pixhawk與Raspberrypi連接[17] ..................... 19 圖2.11SynchronizedStereoCameraHAT[16].....................20 圖2.12HAT板安裝方式示意圖[16] ........................... 20 圖2.13相機安裝示意圖[16]................................ 21 圖2.14安裝Pin腳圖示[16]................................ 21 圖2.15使用raspivid指令錄影測試相機 ......................... 22 圖3.1 PuTTY設定參數.................................. 24 圖3.2 2016版本PX4SupportPackage範例....................... 26 圖3.3 PX4SupportPackage擴充軟體安裝 ....................... 26 圖3.4 燒錄與Monitor的介面圖示............................ 27 圖3.5 架設傳輸系統範例................................. 27 圖3.6 燒錄成功畫面 ................................... 28 圖4.1 SerialReceiver的方塊模型 ............................ 31 圖4.2 數據收取測試監控................................. 31 圖5.1 左右視圖偏移示意................................. 33 圖5.2 影像向左偏移相減[1]............................... 34 圖5.3 製作深度圖[1]................................... 35 圖5.4 轉換3D圖像.................................... 35 圖5.5 深度影像流程圖.................................. 36 圖5.6 邊界處理圖像 ................................... 41 圖5.7 邊緣計算深度影像................................. 41 圖5.8 通道邊緣計算圖.................................. 42 圖5.9 WindowSize示意圖................................ 43 圖5.10比較不同的windowsize的圖形 ......................... 44 圖5.11WindowSize誤差圖................................ 44 圖5.12未經處理影像疊圖結果.............................. 46 圖5.13HSI色彩空間模型[1] ............................... 48 圖5.14中值濾波原理 ................................... 48 圖5.15中值濾波處理 ................................... 49 圖5.16侵蝕膨脹處理圖.................................. 50 圖6.1 影像處理流程圖.................................. 52 圖6.2 未校正圖形..................................... 54 圖6.3 未校正影像..................................... 55 圖6.4 角點偵測圖形 ................................... 55 圖6.5 harris角點偵測圖 ................................. 57 圖6.6 棋盤校正圖形 ................................... 57 圖6.7 校正後畫面..................................... 58 圖6.8 相機影像幾何圖形................................. 59 圖6.9 相機影像空間幾何圖形.............................. 61 圖6.10鏡頭可辨識區域示意圖.............................. 62 圖6.11二值化處理圖形.................................. 64 圖6.12相機影像空間幾何圖形.............................. 65 圖6.13圖像矩陣[1] .................................... 66 圖6.14卡式座標系[1]................................... 66 圖6.15圖像框角度示意圖................................. 67 圖7.1 硬體組裝示意圖.................................. 70 圖7.2 通道測試圖一 ................................... 71 圖7.3 通道測試圖二 ................................... 71 圖7.4 通道測試圖三 ................................... 72 圖7.5 通道測試圖四 ................................... 72 圖7.6 通道最深點測距.................................. 73 圖7.7 寬大通道測試結果................................. 73 圖7.8 下樓梯測試結果.................................. 74 圖7.9 上樓梯測試結果.................................. 74 圖7.10原通道辨識結果.................................. 75 圖7.11斜向飛行時辨識結果 ............................... 75 圖7.12陰暗通道測試結果................................. 76 圖7.13原通道辨識結果.................................. 77 圖7.14縮小後圖像辨識結果 ............................... 77 圖7.15室內模擬路徑 ................................... 78 圖7.16轉彎圖一..................................... 79 圖7.17轉彎圖二...................................... 79 圖7.18轉彎圖三...................................... 80 圖7.19轉彎圖四..................................... 80 表目錄 表2.1 Pixhawk硬體規格................................. 11 表2.2 RaspberryPi4硬體規格.............................. 16 表5.1 樹莓派深度圖形匹配運算速度比較....................... 42 表5.2 windowsize比較表格............................... 45 |
參考文獻 |
[1] 李柏儀, “Computer vision based navigation with 3d scene recontruction,” 淡 江大學航空太空工程學系碩士班學位論文, 2016. [2] http://www.holybro.com/product/pix32pixhawkflightcontrollerwithpower module/. [3] https:// static.raspberrypi.org/ files/ productbriefs/ RaspberryPi4Product Brief.pd. [4] https://www.raspberrypi.org/ [5] S. Kuznicki and L. Daren, “Pixhawk pilot support package(psp) user guid.” http://www.cs.umd.edu/ mount/ANN/. [6] 郭軒煒, “Autonomous flight of drones using pixhawk collaborated with matlab/ simulink.,” 淡江大學航空太空工程學系碩士班學位論文, 2019. [7] S. A. S. Alkadhim, “Communicating with raspberry pi via mavlink,” Available at SSRN 3318130, 2019. [8] 何健鵬、轉承印、張則笙, “Application of unmanned aerial vehicle by mavlink,” 東亞技術學院通訊工程, 2017. [9] S. Qiu, B. Yuan, and K. Zhang, “Building tftp server on embedded system,” in 2008 4th International Conference on Wireless Communications, Networking and Mobile Computing, pp. 1–4, 2008. [10] T. Ødegard Olsen, “Lourena rocha,luiz velho,paulo cezar p. carvalho,” IMPA– Instituto Nacional de Matem ́atica Pura e Aplicada, January 2002. [11] L. Matthies, T. Kanade, and R. Szeliski, “Kalman filterbased algorithms for estimating depth from image sequences,” International Journal of Computer Vision, vol. 3, no. 3, pp. 209–238, 1989. [12] R. Rao, “Lecture 16: Stereo and 3d vision, university of washington.,” [13] K.Konolige,“Projectedtexturestereo,”in2010IEEEInternationalConference on Robotics and Automation, pp. 148–155, IEEE, 2010. [14] M. Humenberger, C. Zinner, M. Weber, W. Kubinger, and M. Vincze, “A fast stereo matching algorithm suitable for embedded realtime systems,” Computer Vision and Image Understanding, vol. 114, no. 11, pp. 1180–1202, 2010. [15] 何孝威, “A fast local stereo matching algorithm with simple edge detection and its vlsi implementation,” Computer Vision and Image Understanding, vol. 90, 2011. [16] “Depth mapping on arducam stereo camera hat with opencv.” https:// www.arducam.com/ docs/ camerasforraspberrypi/ synchronizedstereo camerahat/opencvanddepthmaponarducamstereocamerahattutorial/. [17] https:// rmotex.blogspot.com/ 2017/10/ raspberrypi3pixhawk mavlinkmacos.html. [18] T. Ø. Olsen, “Stereo vision using local methods for autonomous ferry,” [19] S. Praveen, “Efficient depth estimation using sparse stereovision with other perception techniques,” Coding Theory, p. 111, 2020. [20] M. M. Chowdhury and M. A.A. Bhuiyan, “Fast window based stereo matching for 3d scene reconstruction.,” Int. Arab J. Inf. Technol., vol. 10, no. 3, pp. 209– 214, 2013. [21] O. Cheng, W. Guangzhi, Z. Quan, K. Wei, and D. Hui, “Evaluating harris method in camera calibration,” in 2005 IEEE Engineering in Medicine and Bi ology 27th Annual Conference, pp. 6383–6386, IEEE, 2006. [22] R. S. Larry Matthies and T. Kanade, “Incremental estimation of dense depth maps from image sequences,” IEEE Computer Vision and Pattern Recognition, June 1988. [23] L. Rocha, L. Velho, and P. C. P. Carvalho, “Image momentsbased structuring and tracking of objects,” in Proceedings. XV Brazilian Symposium on Computer Graphics and Image Processing, pp. 99–105, IEEE, 2002. [24] 直線影像測試. https://youtu.be/3Y9HiwQobX0. [25] 下樓梯影像測試. https://youtu.be/L3LHyR0ahNQ. [26] 路徑模擬影片. https://youtu.be/vDZuhL3L0P0. |
論文全文使用權限 |
如有問題,歡迎洽詢!
圖書館數位資訊組 (02)2621-5656 轉 2487 或 來信