台灣島位於西太平洋颱風路徑上,每年的夏秋兩季會有數個颱風經過台灣,伴隨颱風而來的強降雨造成嚴重的土石流坍塌。為了降低當地居民的財物損失,土石流的偵測是非常重要的。我們希望可得到一個經濟又實惠的預警系統,在土石流高潛勢溪流的危險區域安裝監控式攝影機,並將監控影像透過電腦演算法以達到自動偵測土石流之目的。 在本研究中,先將彩色影像轉換成灰階影像,其意指將RGB轉換到YUV的空間,其中Y是我們所要的灰階成分。接著,利用初始的監測影像建構一張背景影像,將它與即時影像作相減。根據相減之後的結果,應用中值濾波器來降低不均勻的雜訊;另外一方面,我們還需運用形態學中的閉合來填補影像相減後的殘缺細小的破洞。之後,利用熵值來計算畫面中的擾動強度,並根據它的斜率變化來設立門檻值即時判斷土石流。最後,將設計好的演算法建構在系統中模擬,我們便可透過架設好的攝影機即時偵測與分析。如果土石流發生,系統可以在輸出的畫面中立刻發佈危險訊息。 Every year in summer and autumn, there are usually several typhoons pass through Taiwan. They often bring heavy rains and sometimes cause serious debris flows in the mountainous regions. It is very important to detect the debris flows in order to reduce their damages. The economical and efficient approach to implement the early warning system is to setup surveillance camera in the remote area and design a computer aided algorithm to automatically detect the debris flow. In our proposed method, we adopted gray level the conversion from RGB into YUV to reduce the computation time. After color transformation, a background was built by previous frames and then subtract by current frame. Followed by the median filter to smooth the edges and reduce noise and then the broken objects is filled with morphology process. Finally we detect the debris flow in real-time for the video camera by calculating the entropy and changes with a preset threshold. Our experimental results demonstrate the proposed approach can process the video in real-time and display a warning when the debris flow is detected.