近年來,交通安全已經成為重要的議題,其中因為駕駛者沒有與前方車輛保持安全距離,而導致發生交通意外為大部分原因。為了確保駕駛者的行車安全,許多研究單位與汽車製造公司都致力於發展量測與警示系統,以提升安全性能與保護駕駛者的行車安全,此系統稱為進階安全駕駛輔助系統(Advanced Driver Assistance Systems, ADAS)。因此,本論文提出一種新的方法來偵測前方障礙物或路面凹陷,當偵測到障礙物或坑洞時,系統會提醒駕駛者保持行車安全間距,以提供駕駛者安全警示。 本系統中,我們使用一個CCD攝影機擷取即時影像輸入到電腦後,建立多重背景並且透過一致性方法比對出精確的影像樣板。接著,一個經由dsPIC 30F4011微處理器控制的2D雷射網格被使用於照射車輛前景,並得到一經過雷射照射的2D雷射照射影像。此2D雷射照射影像則伴隨著一個USB觸發信號,傳給個人電腦進行分析,利用2D雷射照射影像減去影像樣板,我們可以得到二維雷射影像前景網格資訊。此二維雷射前景網格資訊與標準二維雷射網格比對後,可以找出障礙物的位置與大小。接著顯示在LCD螢幕上並以聲音警示提醒駕駛者注意前方障礙物與保持行車距離,以達到車輛行車安全之目的。In recent years, traffic safety has become an important issue. Most traffic accidents happened because drivers do not keep a safe distance from front cars. In order to ensure drivers’ safety on road, research units and automobile manufacturing companies have engaged themselves to develop measurement and warning system to improve the safety performance of vehicles. These systems are known as advanced safety driving assist system (Advanced Driver Assistance Systems, ADAS). Therefore, this paper presents a new method to detect obstacles on road. When obstacles or gaps on road being detected, the system will remind the drivers to keep safety distances from obstacles or gaps, providing safety alertness to drivers.In this study, we use a CCD camera to real-time capture the front scenes of vehicles. Establishing multiple background model and using a consistent approach to obtain accurate template images. A 2D laser lattice is then generated, controlled by a dsPIC30F4011 microcontroller to produce a 2D lattice-laser illuminated image. The 2D lattice-laser illuminated image, along with a USB trigger signal, is transmitted to a computer. The 2D lattice-laser illuminated image is subsequently subtracted by the template image to obtain a 2D lattice-laser pattern of front scene. By comparing the 2D lattice-laser pattern of front scene with the standard lattice pattern, the obstacles’ size and locations can be identified. The identified obstacles will be displayed on a LCD screen and the system verbally reminds the drivers of keeping safe distances from obstacles, to achieve the purpose of vehicle traffic safety.