本文的研究目的為利用影像視覺來發展一套道路標線偵測系統,並應用於自走車之行進追蹤控制。整體架構分為三個系統,分別為影像處理系統(OpenCV)、微控制器系統(Arduino),以及馬達驅動系統。影像處理系統採用影像處理套裝軟體OpenCV,將OpenCV建構在Visual C++上,並利用藍芽通訊當作電腦和微控制器溝通之橋梁。當系統啟動時,自走車上的網路攝影機會擷取道路標線影像經USB介面傳給電腦,透過影像處理系統演算後,得到自走車縱軸與車道線的相對角度,利用此角度來做為追蹤控制之依據。 為了使自走車能平順的依循車道線行進,本文運用Lyapunov穩定準則推導出「適應模糊滑動模式控制法則」(AFSMC),以Visual C++將此控制法則建立在筆記型電腦裡面運算;經攝影機擷取左右輪與車道線相對角度後,利用此角度為基礎,AFSMC演算出左右輪驅動馬達的適當控制量,並透過藍芽通訊將此控制量訊號傳送給微控制器,利用微控制器輸出PWM脈衝訊號透過橋式電路來控制左右輪馬達,使自走車能平滑的行駛於道路標線內。 實驗結果顯示,本文所提研究方法可以辨識並適應道路上的各種車道線變化,包括行經大於90°的轉彎,以及遇到十字路口時左、右轉或直走的選擇,使得自走車能在各種車道線內平滑的行駛。
In this paper, a vision-based lane tracking system is developed for an autonomous cart. The proposed system is composed of a microcontroller (Arduino), a Visual C++ based image processing system (OpenCV), and a motors controlled system. The image processing system is built in notebook (NB) by using image processing packaged OpenCV. As a wireless technology standard, the Bluetooth comunication is adopted to connect the notebook with the microcontroller for exchanging datas. When tracking the lane marking, the image processing system uses two webcams to capture the lane images by the Universal Serial Bus (USB) comunication for developing a stereo vision. After extracting the lane images by OpenCV, the relative angle between autonomous cart and lane can be calculated by a geometric algorithm. Using this relative angle informations, an adaptive fuzzy sliding mode control (AFSMC) algorithm can be derived from the Lyapunov stability theory to produce the control lows for the two steering motors individually. Finally, the autonomous cart can track the center of the lane. A comparative analysis with experimental results showed that the developed AFSMC can drive the autonomous cart smoothly in variety of the road conditions.