簡易檢索 / 詳目顯示

研究生: 廖育慶
Yu-Ching Liao
論文名稱: 應用電腦視覺於隧道內定位之研究
A Study of Localization in Tunnels Using Computer Vision
指導教授: 謝佑明
Yo-Ming Hsieh
口試委員: 歐章煜
Chang-Yu Ou
王泰典
Tai-Tien Wang
周建成
Chien-Cheng Chou
學位類別: 碩士
Master
系所名稱: 工程學院 - 營建工程系
Department of Civil and Construction Engineering
論文出版年: 2014
畢業學年度: 102
語文別: 中文
論文頁數: 111
中文關鍵詞: 電腦視覺隧道定位目視檢測維護管理
外文關鍵詞: machine vision, localization, tunnel, visual inspection, maintenance and management
相關次數: 點閱:248下載:12
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 由於台灣屬於多山地形,許多公路、鐵路仰賴隧道做為穿越障礙物之手段,且土地面積狹小,都市地區在有限的土地面積下,常以地下隧道的方式建立捷運、管線、給排水系統,因此隧道在台灣是非常重要的基本建設。若隧道發生結構損毀,將會影響交通、民生甚至用路人安全等問題,所以需要不斷的對隧道進行定期檢查與紀錄,針對觀察到的異狀及可能產生之問題進行檢測與修補。而在隧道的維護與管理工作中,目視檢測為最直接有效的檢測法,但目視檢測時所需之位置資訊,卻沒有與其相配之快速低成本的方法。
    本研究建立一套透過電腦視覺於隧道內取得位置資訊之流程與相關之演算法,以C++作為程式語言撰寫,在電腦視覺部分使用OpenCV函式庫,透過雙攝影機模擬人類視覺,利用左右眼視野內景物之視差計算特定點之距離,並根據視野中物體之移動來計算自身之相對位移,取得自身座標集姿態後可計算視野中其他點座標供下一次計算使用。如此重複以上流程,即可計算系統相對於開始點之所在位置,達成在隧道內定位之目的。
    除此之外本研究根據電腦視覺定位之流程,建立一個便於測試、驗證演算法之研究平台,並利用此研究平台開發、驗證電腦視覺於隧道內定位之系統。透過VTK視覺化工具產生3D隧道,並模擬一對立體攝影機於隧道內行走,如此一來我們得到一個可控制之隧道與攝影機環境,我們可以依研究需求產生不同隧道,或是自行調整攝影機參數來測試演算法。
    使用本研究平台測試本研究之隧道內定位之演算法,在直線隧道的狀況下結果尚可接受,但套用實際隧道之曲線線型後誤差仍過大,若要投入實務中使用仍有改進的空間。


    Taiwan is a mountainous island. It is thus necessary to use tunnels to meet transportation demands. Tunnels are also constructed in metropolitan areas for rapid transit system and pipelines. It is fair to say tunnels are fundamental and important infrastructure in Taiwan. Tunnels may endanger its users or cause inconvenience to people’s daily life. Therefore, it is crucial to conduct regular inspection and record issues for tunnels. These recorded issues may need further investigation or conduct repair work. Currently, the only viable regular inspection method is visual inspection. Unfortunately, there is no convenient and low cost solution to automatically obtain locations of found issues in tunnels.
    This study developed a general procedure and implemented associated algorithms in C++ to obtain location information via computer vision. For the computer vision part, open source OpenCV library is used. By capturing images from dual cameras, disparity between this pair of image can be used to derive depth information for every interested point. By tracking how images change between frames, displacements of cameras can be found. Using this concept, the location can be inferred in tunnels.
    In addition, this study established a research platform to conduct researches on localization in tunnels. This platform enables easy testing and validating algorithms for localization in tunnels. It can also be used to analyze related issues and accuracy of a particular localization algorithm. The platform uses VTK visualization toolkit to construct virtual tunnels in three-dimension. Then, a pair of camera is put into the virtual tunnel to obtain virtual stereo images. Thus, the platform creates a controlled virtual environment to study localization algorithms.
    The localization algorithm implemented in this study achieves good accuracy for straight tunnels. However, the accuracy for curved tunnels is too big to be used in practice. Further studies are necessary to improve the localization algorithm.

    論文摘要 IV ABSTRACT VI 誌 謝 VIII 目 錄 X 圖目錄 XIV 表目錄 XVIII 第1章 緒論 1 1.1 研究動機 1 1.2 研究目的 2 1.3 論文架構 3 第2章 文獻回顧 5 2.1 電腦視覺 5 2.2 立體視覺 6 2.3 應用電腦視覺於隧道內定位之初探 7 2.4 電腦視覺里程計 7 2.4.1 電腦視覺里程計之流程 8 第3章 研究流程與方法 9 3.1 研究流程 9 3.2 硬體設備 10 3.2.1 雙攝影機 10 3.2.2 筆記型電腦 12 3.3 函式庫介紹 12 3.3.1 VTK函式庫 12 3.3.2 OpenCV函式庫 14 3.3.3 VideoInput函式庫 15 第4章 電腦視覺隧道內定位之流程與計算方法 17 4.1 整體流程 17 4.2 讀取設定檔 18 4.3 攝影機校正 18 4.3.1 畸變校正 19 4.3.2 多相機校正 21 4.3.3 OpenCV校正函式 21 4.3.4 完美攝影機之Q矩陣 22 4.4 影像取得 23 4.4.1 VTK隧道 24 4.4.2 VTK與OpenCV影像轉換 25 4.5 影像處理 25 4.5.1 高斯模糊 25 4.5.2 高斯差 26 4.5.3 雙邊濾波器 26 4.5.4 直方圖均衡化 27 4.6 特徵點處理 27 4.6.1 特徵提取與匹配 28 4.6.2 匹配過濾 31 4.6.3 3D座標計算 36 4.7 前後時間特徵點處理 38 4.7.1 Hirschmuller等人的內群探測 38 4.8 系統位置計算 39 4.8.1 RANSAC 40 4.8.2 Arun等人的方法 41 4.8.3 結合RANSAC與Arun等人的方法 43 第5章 系統架構與詳細流程 45 5.1 程式類別與架構 45 5.2 詳細程式流程 49 5.2.1 雙攝影機校正詳細流程 50 5.2.2 Phase0詳細流程 51 5.2.3 mainloop詳細流程 52 5.3 Config.yml 54 5.4 資料間之關係 57 第6章 誤差探討 59 6.1 基線長之影響 59 6.2 解析度之影響 61 6.3 累積誤差 63 第7章 系統展示與驗證 65 7.1 系統展示 65 7.1.1 攝影機校正 65 7.1.2 Phase0 70 7.1.3 系統位置計算 71 7.2 系統驗證 75 7.2.1 虛擬隧道靜止測試 75 7.2.2 虛擬隧道移動測試 77 7.2.3 室內靜止測試 80 7.2.4 系統驗證小結 82 第8章 結論與建議 85 8.1 結論 85 8.2 建議 86 參考文獻 87

    [1] 黃燦輝, 老舊交通隧道之安全檢測,維修與補強技術研訂: 交通部, 1997.
    [2] 陳頎夫, "應用電腦視覺於隧道內定位之初探," 碩士論文, 營建工程系, 國立台灣科技大學, 2012.
    [3] 林峻慰, "具重疊指紋及汙點雜訊之指紋圖像辨識方法探討," 碩士論文, 電腦與通訊研究所, 國立台北科技大學, 2010.
    [4] 魏銪志, "動態多標的車牌辨識系統之研究," 碩士論文, 資訊管理研究所, 元智大學, 2000.
    [5] 邱俊智, "AX-12 機械手臂路徑軌跡規劃與影像辨識之研究," 碩士論文, 國立勤益科技大學, 機械工程系, 2010.
    [6] 吳至仁, "即時障礙物偵測/定位及標誌辨識," 博士論文, 工程科學系碩, 國立成功大學, 2002.
    [7] 徐肇鴻, "導盲機器人之路徑規劃與控制," 碩士論文, 電機與控制工程系, 國立交通大學, 1999.
    [8] 蕭鈞煒, "以立體視覺為基礎之火災偵測與滅火系統," 碩士論文, 機械工程系, 雲林科技大學, 2011.
    [9] 施政瑋, "設計資料庫系統與CBIR於圖像搜尋及管理之整合應用," 碩士論文, 設計運算研究所, 雲林科技大學, 2007.
    [10] 簡大淵, "內視鏡影像序列之自動校正、重構與病灶量測," 碩士論文, 資訊工程學系, 國立成功大學, 2002.
    [11] 呂其展, "運用影像序列建構與顯示三維地形模型之研究," 碩士論文, 資訊工程學系, 國立成功大學, 2002.
    [12] 賴建丞, "應用電腦視覺技術於互動體感遊戲之設計與探討," 碩士論文, 資訊傳播學系, 元智大學, 2005.
    [13] H. Zhang, G. Wang, and Y. Cen, "Summary of distance measurement based on vision in localization technology," in Power Electronics and Motion Control Conference, Shanghai, 2006.
    [14] H. Bay, T. Tuytelaars, and L. V. Gool, "SURF: Speeded Up Robust Features," presented at the 9th European Conference on Computer Vision, 2006.
    [15] Wikipedia. Structure from motion. Available: http://en.wikipedia.org/wiki/Structure_from_motion
    [16] H. P. Moravec, "Obstacle avoidance and navigation in the real world by a seeing robot rover," Robotics Institute, Carnegie-Mellon University, 1980.
    [17] D. Nister, O. Naroditsky, and J. Bergen, "Visual odometry," in Computer Vision and Pattern Recognition, 2004. CVPR 2004. Proceedings of the 2004 IEEE Computer Society Conference on, 2004, pp. I-652-I-659 Vol.1.
    [18] NVIDIA. NVIDIA Tegra K1. Available: http://www.nvidia.com/object/tegra-k1-processor.html
    [19] M. Aparicio, "Nvidia wants to steer its Tegra K1 into driverless cars," ed: IDG News Service, 2014.
    [20] V. Toolkit. Visualization Toolkit. Available: http://www.vtk.org/
    [21] OpenCV. OpenCV. Available: http://opencv.org/
    [22] OpenCV. OpenCV API Reference. Available: http://docs.opencv.org/2.4.5/modules/refman.html
    [23] T. Watson. VideoInput Library. Available: http://www.muonics.net/school/spring05/videoInput/
    [24] D. C. Brown, "Decentering distortion of lenses," Photogrammetric Engineering, vol. 7, pp. 444-462, 1966.
    [25] G. Bradski and A. Kaehler, "Learning OpenCV," ed: O'Reilly Media, 2008, p. 433.
    [26] Wikipedia. Gaussian blur. Available: http://en.wikipedia.org/wiki/Gaussian_blur
    [27] Wikipedia. Difference of Gaussians. Available: http://en.wikipedia.org/wiki/Difference_of_Gaussians
    [28] C. Tomasi and R. Manduchi, "Bilateral Filtering for Gray and Color Images," presented at the 1998 IEEE International Conference on Computer Vision, Bombay,India, 1998.
    [29] D. G. Lowe, "Object recognition from local scale-invariant features," in Computer Vision, 1999. The Proceedings of the Seventh IEEE International Conference on, 1999, pp. 1150-1157 vol.2.
    [30] E. Rosten and T. Drummond, "Machine Learning for High-speed Corner Detection," Department of Engineering, Cambridge University, 2006.
    [31] Wikipedia. Sum of absolute differences. Available: http://en.wikipedia.org/wiki/Sum_of_absolute_differences
    [32] H. Hirschmuller, P. R. Innocent, and J. M. Garibaldi, "Fast, Unconstrained Camera Motion Estimation from Stereo without Tracking
    and Robust Statistics," Centre for Computational Intelligence, De Montfort University, 2002.
    [33] Y. Cheng, M. Maimone, and L. Matthies, "Visual Odometry on the Mars Exploration Rovers," Jet Propulsion Laboratory, California Institute of Technology, 2006.
    [34] Wikipedia, "RANSAC (RANdom SAmple Consensus)."
    [35] M. A. Fischler and R. C. Bolles. (1981) Random Sample Consensus: A Paradigm for Model Fitting with Applications to Image Analysis and Automated Cartography. Communications of the ACM.
    [36] K. S. Arun, T. S. Huang, and S. D. Blostein, "Least-Squares Fitting of Two 3-D Point Sets," Pattern Analysis and Machine Intelligence, vol. PAMI-9, pp. 698-700, 1987.

    QR CODE