Monitoring Debris Flows Using Spatial Filtering and Entropy Determination Approaches

We developed an automatic debris flow warning system in this study. The system uses a fixed video camera mounted over mountainous streams with a high risk for debris flows. The focus of this study is to develop an automatic algorithm for detecting debris flows with a low computational effort which can facilitate real-time implementation. The algorithm is based on a moving object detection technique to detect debris flow by comparing among video frames. Background subtraction is the kernel of the algorithm to reduce the computational effort, but non-rigid properties and color similarity of the object and the background color introduces some difficulties. Therefore, we used several spatial filtering approaches to increase the performance of the background subtraction. To increase the accuracy entropy is used with histogram analysis to identify whether a debris flow occurred. The modified background subtraction approach using spatial filtering and entropy determination is adopted to overcome the error in moving detection caused by non-rigid and similarities in color properties. The results of this study show that the approach described here can improve performance and also reduce the computational effort.


INTRODUCTION
Typhoons (hurricanes) are one of the major global natural disasters.The heavy precipitation accompanying cyclonic storms cause serious damage and there is evidence that climate change might result in an increase in storm intensity (Gore 2006).Flooding in mountainous areas, debris flows and landslides are major concerns for disaster prevention in regions with steep terrain, especially in Taiwan and Japan.Thus, establishing a warning system which can be activated in the early stage of a debris flow occurrence is a critical need.A successful warning system will protect the residents living downstream at a critical moment when even a few seconds could save lives.In this study, we discuss the use of a video camera system to monitor debris flows using intelligent surveillance techniques.
The general concept of a debris flow warning system utilizing a fixed video camera mounted at locations on the upstream rivers identified as high risk for debris flow is a simple one.With high speed broadband network transmission, the video can be transmitted to a laboratory for processing in real-time.When a debris flow occurs, the system is able to automatically recognize the initiation of the debris flow and send a warning signal.The kernel of detecting debris flows relies on the video (image) processing techniques used.In the last few years, vast improvements in video camera technology have not only improved resolution but also the capability for the detection and recognition of the target.With advanced remote sensing techniques, automatic monitoring has effectively lightened the burden of land cover inspection in the field.Here we introduce several main approaches using advanced intelligent surveillance techniques to detect a moving target (a debris flow) using a CCD (Charge Coupled Device) camera video.We also discuss how remote sensing techniques can be applied to monitor landslides or debris flows.
Detecting debris flows in a riverbed can be seen as one application of moving target detection.There are several successful approaches for detecting moving objects in video which have many applications in industry, traffic safety, and medical care.The optical flow technique is based on the fact that the moving object will affect the brightness distribution.The variation in brightness distribution can be used to estimate the optical velocity field and the moving object is detected by the velocity field.Horn-Schunck (1981) employed an iterative approach operated with conservation and smoothness constraints to estimate the motion velocity.Lucas and Kanade (1981) used a least squares method to improve the iteration time.Optical flow techniques can perform well when the object is rigid.However because of the intensive computations needed and high sensitivity to noise, this method is unsuitable for real-time applications.
Adaptive background mixture models (Stauffer and Grimson 1999) represent another approach for data analysis.Using histogram statistical analysis, the background can be estimated from the images and the background model is built by a mixture of several Gaussian distributions.In adaptive background mixture models, all the video signals are analyzed in the histogram.After the background mixture model has been processed, the model is used to analyze the current frames.If the pixels reside outside of the model, they are identified as the moving object.Using histogram analysis, this approach is able to avoid the influence of noise.However, the drawback of this technique is that the moving object detected is usually not complete.
Another object detection method uses temporal differences (Dailey et al. 2000), which subtracts the current frame from the previous frame and the object is detected by the difference between each adjacent pair of frames.The principle of temporal difference is simple and substantially reduces the computation time.Even though the temporal difference method is conveniently implemented in real-time, if the object moves slowly, the results of object detected become poor and the accuracy is reduced.
In addition to the temporal difference method, background subtraction can also be used to detect a moving object (Fathy and Siyal 1995;Lipton et al. 1998;Chalidabhongse et al. 2003;Cheung and Kamath 2004;Piccardi 2004;Chen et al. 2009).The background subtraction method builds a reference background from the video and subtracts the background from the current frames (foreground) to detect the moving object.Background subtraction is a simple and widely used method in steady camera applications because the computational effort is low and the moving object is completely detected.However, this method is sensitive to changes in illumination.Therefore the detection performance may be affected.Background subtraction is based on the background estimation so the timing of background estimation and update is a critical issue.Several groups have successfully developed some modifications of background subtraction to overcome the drawbacks.Fathy and Siyal (1995) used the edge detection method to reduce the effect of the illumination of the environment.Lipton et al. (1998) used a classification matrix to classify the targets (e.g., human, vehicle) and background; therefore the target tracking can be carried out using background subtraction.Cheung and Kamath (2004) used robust techniques to overcome the interference of illumination changes in moving vehicles detection in urban traffic video.Chalidabhongse et al. (2003) and Piccardi (2004) compared the performance of several approaches that based on background subtraction.Their studies analyzed the speed, memory requirements, accuracy and discussed the benefits and limitations for selecting the most suitable method for various applications.
With progress in artificial intelligence and pattern recognition techniques, the methods for object surveillance have improved.Nevertheless, debris flows are usually a non-rigid object having similar color with the background color.Using the methods mentioned above may not provide sufficient performance.Here we describe an algorithm which has the characteristics of low computational effort so that real-time detection can be implemented.Together with a broad band high speed network transmission, an effective warning system can be realized.

METHODS
The moving object detection algorithm proposed by Chen and Ren (2011) is shown in Fig. 1.The camera video frames have to be converted to smaller and more useful data, which not only increases the sensitivity but also decreases the computing effort.In the proposed algorithm, the background subtraction is the kernel to detect the moving object.The color of the debris flow is similar with the background and some spatial approaches (filters) can be used to remove the noise.After subtraction and spatial filtering, the moving object can be identified.In order to detect the moving object precisely, we use the entropy function to evaluate the uncertainty level and this index can be used to determine whether the debris flow occurred (Chen et al. 2009).

Computation Reduction
Most video camera sensors are able to detect three primary colors, named RGB (Red, Green and Blue).Because three channel images represent a three-fold increase in data computation times, reducing the channel number should be an effective approach to realize real-time image processing.Chen and Ren (2010) compared the performance of the classification approach (Fisher's Linear Discriminant Analysis, FLDA) and the color coordinate transformation (YUV).
In FLDA (Fisher 1938), the frames with debris and nondebris flow are selected as the training sample.Each group (debris and non-debris pixels) can have an estimated covariance matrix of "between class" and "within class" (Fig. 2).The value of "ratio matrix" dividing the "between class" and "within class" can be seen as an index to evaluate whether these two groups of pixels (debris and non-debris) can be separated.FLDA uses eigenvector decomposition to search the projection vector to maximize the ratio.The projection vector is one of the eigenvectors of the ratio matrix with the vector corresponding to the maximum eigenvalue.The optimum separation component can be obtained by projecting the 3 channels frames (RGB) to the vector (one of the eigenvectors) which corresponds to the maximum eigenvalue.
In the YUV color system, Eq. ( 1) shows the formula of transformation between RGB and YUV.RGB is the 3 primary colors in YUV, Y is luminance, and U and V represent chrominance.In YUV mode, the Y component (luminance) should contain the most information to determine whether a debris flow has occurred or not.Because when a debris flow occurs, the river usually reveals a white or high brightness for the image.Besides the color variation, the Y component also includes more than 90 percent of the total energy of the image (Y = 0.299R + 0.587G + 0.114B).In addition, the Y component can be acquired only by a simple transformation from RGB to YUV (Chen and Ren 2010), the simple procedure can also contribute to reducting the computational effort.
Chen and Ren (2010) also compared classification (FLDA) and color coordinate transformation (YUV) using an entropy value which had been used to determine if a debris flow has occurred (Chen et al. 2009).Figure 3 shows the entropy of Fisher's LDA and YUV.It is obvious that the YUV shows better performance for determining the occurrence of a debris flow.Therefore the luminance component (YUV, Y component) can be considered as containing more information which is correlated with debris flow and therefore is used in the following procedure.

Background Subtraction
The main concept of background subtraction is using the background frame to subtract the current frames where the revealed pixels are considered as the moving object pixels (Fathy and Siyal 1995;Lipton et al. 1998;Chalidabhongse et al. 2003;Cheung and Kamath 2004;Piccardi 2004;Chen et al. 2009).In our method, the standard background subtraction is the kernel of the algorithm.When the object is non-rigid (river) and has similar spectral characteristics (visible light, color) with the background, it is necessary to carry out additional processing after background subtraction to improve the accuracy.The approach used in this study focused on the processing after subtraction (sections 2.3 and 2.4), thus improving the performance of the spatial filters and algorithms.For the background subtraction, the background is estimated as the average of the first 30 frames.According to the background color properties (containing only a river or stream, uniform light source), the background update step is not necessary.

Spatial Filtering
After background subtraction, the difference between the background and the current frame is displayed.The moving object can be clearly identified only when the color (object) appears distinct from the background.However, when a debris flow occurs, the color of the debris flow is similar to normal river condition and the colors for both of the object (debris flow) and background (normal current) also have non-rigid properties.The color similarity and nonrigid property might cause blurring of the result.Therefore, spatial filtering approaches, including a median filter or morphology approach can be used to reconstruct the data following subtraction.

Median Filter
After subtraction, the detection is still affected by the non-rigid characteristic and the color similarity between the moving object and the foreground, resulting in noise.The median filter (Tukey 1977) has properties that can eliminate the noise (e.g., salt and pepper noise) and reserve the edge features (Haralick and Shapiro 1993;Baxes 1994;Yin et al. 1996).In this study, a 2-D (2 dimensional) median filter was implemented using a 2-D mask to process every pixel following subtraction and the window size is assigned.Equation ( 2) represents the 2-D median filter: y ij is the median value placed in the central position, x ij is the original data point at the center of the filter, N is the filter size.There are 2 steps: the first is arranging the values in ascending order within the mask region, and selecting the median as the median value.The second step is using the median value to replace the value in the central position of the mask.The mask shape is defined by the user, such as a square, circle, or cross.In general, the mask is usually the square of the odd pixels.For example, Fig. 4a shows that a 3 × 3 mask was assigned.After sorting the pixel values in ascending order, the fifth-ranked is 20 which is used as the median value.In Fig. 4b, the median value (20) was replaced to the central position (100) as the pixel value.By replacing the central pixel value, unusual pixel values are removed and the edge character will be preserved.

Morphology
Even though the median filter eliminates most of the noise, the non-rigid property and color similarity sometimes cause serious defects that the median filter cannot process (e.g., breach, holes or rough boundary).The mathematical morphology approach was born in 1964 by Matheron and Serra.The basic concept is that the object shape of an image can be changed by a structure element (Gonzalez et al. 2004).The structure element is usually defined as a matrix or a vector for a mask to process the image pixel by pixel (analogous to convolution).The basic morphology operator is dilation and erosion which follow the rules to expand and shrink the image.Most of the morphology methods are based on the combination of these two operators.Closing and opening are typical applications.
Equation ( 3) shows the procedure for closing operator, where B is structure element, A is the image data. 5is dilation operation, and H is erosion.Closing consists of erosion after dilation and the opening operator consists of dilation after erosion.Both opening and closing are smoothing operations for an object.The opening operator breaks narrow isthmuses and removes thin protrusions.The closing operator has the opposite effect that melts narrow breaks and long thin ditches, reduces small holes and fills gaps in the contour (Gonzalez et al. 2004).Figure 5 shows an example to demonstrate the performance of these operators.Figure 5a is the original binary (pixel value is 0 or 1) image and for this study the structure element is defined as Fig. 5b.The effect of dilation is shown in Fig. 5c, with the object expanded.Figure 5d shows the erosion operator.The effect of opening and closing (combination of dilation and erosion) was shown in Figs.5e and f.Compared to the original object (Fig. 5a) and the closing result (Fig. 5e), the closing is able to fill the thin gulfs in the contour.Therefore, the morphology closing is employed in our algorithm to enable the shape of the moving object to be more complete.By means of the spatial filtering process, the noise and irregular pattern (e.g., thin gulfs) can be eliminated and the moving object better represents a realistic debris flow.

Entropy Determination
The main goal of this study is to identify debris flows using a video camera monitoring system.Although the image of a debris flow can be enhanced in each frame by subtraction and spatial filter approaches, each frame should have an index to evaluate whether it contains a debris flow or the normal current.This study employs entropy function as the index to evaluate the status of the moving object.Chen et al. (2009) used entropy to the frames after background subtraction.Figure 6 compares the histogram for background subtraction between frames with non-debris and debris flow current.Figures 6a and b show the background subtraction results of non-debris and debris flow.In Figs.6c and d Entropy is one of the main principles of information theory (Shannon and Weaver 1963).It is based on the probability of each state by the histogram of subtraction result in each frame.Although entropy measures the amount of information, it also can be used to evaluate the distribution or uncertainty of a data set, in Eq. ( 4): Entropy H represents the uncertainty level, P is probability with each gray scale, i is the gray scale (8 bit: 0 ~ 255).The magnitude of entropy represents the sum of the quantity of information in the frame.In this study it is used to evaluate the uncertainty in the video frames.For example, Fig. 6c has a narrow distribution indicating lower entropy.In contrast, Fig. 6d has a wider distribution showing higher entropy.Consequently, the entropy analysis obtains a score to represent the uncertainty of the data set.This score (entropy value) is used to indicate whether a debris flow has occurred in the frame.

Moving Average
Figure 7 shows the entropy of a short section of video which includes non-debris and debris flow frames.In Fig. 7 shows that the original entropy distribution is able to identify whether a debris flow is present.However, the curve of entropy still shows some minor variations.This will affect the trend of the curve, sometimes causing fatal error when performing slope estimation.Using a short term moving av-erage (Box and Pierce 1970) should overcome this problem.Equation ( 5) shows the moving average process convolution procedure: where y n 6 @ is the averaged output, x n 6 @ is the original signal and M is the average filter length.Figure 7 shows that the moving average smoothes the entropy curve.After calculating the moving average, the presence of a debris flow can be evaluated by the slope and a threshold for the slope of the entropy.

RESULTS
The proposed algorithm is based on background subtraction.Color transformation reduces the computation effort for real-time implementation.In order to remove the effects of non-rigid properties and color similarity (target and background), median filtering, morphological closing and entropy determination are included.This result shows that a debris flow occurrence is properly detected with the approach proposed here and is compatible with real-time implementation.

Detection System
The proposed detection algorithm is based on subtraction of the background and current frames.However the moving object in this study is fluid (non-rigid).Therefore part of this study focused on improving the accuracy of detection using a morphology filtering technique (Fig. 1).In addition to spatial filtering, the entropy is used to evaluate the histogram of the result from the subtraction procedure.

Video Data Sets
Three videos were used (Fig. 8, Table 1).These videos include most of the conditions encountered such as: simulated and realistic debris flow, non-debris and debris flow, and the river bed in dry and wet condition.Figure 8a shows a simulated current flow in the USA; the view point is high which is easy to show the whole watercourse.Before any debris flow occurs, a limited amount of water flows, simulating a normal condition.Figure 8b shows a realistic debris flow in Japan.In this example the river bed is almost dry until a debris flow occurs suddenly.Figure 8c shows a realistic debris flow in Taiwan.This example is the most challenging for detecting debris flow because the normal current velocity is high and in addition, the weather conditions include heavy rain and fog, which increases the difficulties in detecting a moving object.

Color Transform
Initially, color transformation has been used to reduce each frame from three channels to one channel (Fig. 9).The transform was obtained using the YUV transformation matrix [Eq.( 1)] and only the Y component (luminance) was selected for analysis.The transform uses the function Y = 0.299R + 0.587G + 0.114B [Eq.( 1)] to obtain the luminance (Y component), which contains most of the information in the video frames.After the processing, the computational effort is reduced to about one third and nearly all of the information content is preserved.

Selection of Region of Interest (ROI)
In most rivers, the river (debris or non-debris) flows in a channel and the target (debris flow) also flow in the same path.This characteristic provides an opportunity to reduce the required computation and improves accuracy.Using this approach, the region in the video frame which contains the channel where debris flow is certain to flow through must be selected.Figure 10 shows the selection of region of interest (ROI) for these three data sets.With the ROI technique, the factors which are able to interfere with  accurate detection (e.g., animals or vegetation movement) can be eliminated.Another benefit of ROI is the reduction in computational effort.

Region of Interest
Table 1 and Fig. 9 show the ROI procedure and the position of the ROI in the data sets.When the detection process begins, the first step is creating the background (Fig. 1).We used the simplest approach to create background with only the first 30 frames selected as the background.In ROI, the first 30 frames are selected and the average background is obtained (Fig. 10).
Figures 11 -13 show the results from the subtraction and filtering ROI procedures for the three data sets (Data 1 -3), where (a) is the original video frame, (b) is the frame after background subtraction, (c) is after median filtering and (d) is after median filtering and morphology closing.In Figs.11 -13, each figure also contains 4 frames including: non-debris flow, warning before a debris flow, warning trigger and continuing warning.
After background subtraction, Figs.11b and 12b show more signals at high frequency before the arrival of the debris flow which are considered as noise.A 3 × 3 median filter is applied which removes the noise and retains the edges (Fig. 11c and 12c).In Figs.11d -13d, the morphology used a structure element with a square length of 3 for the closing operation to fill broken holes (Figs.11c and 12c).After processing, the noise from non-rigid flow background is eliminated and the event should be easily detected.As observed in Figs.11 -13 for the background subtraction result (Figs.11 -13b, c, d), only when the debris flow reaches ROI, will the alarm be properly triggered.

Whole Image
In whole image process mode, the first 30 frames were selected to form the background average.The results of background subtraction with current frames are shown in Figs.Comparing the background subtraction c,d) between non-debris and debris flow may not appear as clear as for the ROI, but the warning alarm is still triggered if a debris flow occurs.In the simulated video (Data 1, Fig. 14), the flow and the operators' movement are detected.Although the median filter and closing processing give more reasonable results, the unallied object (operators) still have influence of detection.Figure 15 shows the actual debris flow video in Japan.In this experiment, the detection performance is fine: even the vegetation movement from the blowing wind is detected.Figure 16 (actual debris flow in Taiwan) shows the situation for the difficult weather conditions.Another difficulty is that the river current is abundant in normal time and the moving current could be heavily interfered when the debris flow comes.Even after performing media filter and closing process, the improvement is still limited.

Entropy Detection
After subtraction, median filter, and morphological closing, the moving object usually could be detected in each image subtraction frames.Entropy is used to evaluate the histogram distribution of each subtracted result.In subtraction, the experiment could be separated to two parts, the ROI (region of interest) and the whole image.The comparison of the performance is discussed below.

Region of Interest
The entropy of each subtracted frame of the ROI is shown in Fig. 17.After performing subtraction, the median filter, closing and moving average are processed (moving average window size is 5, MA5, Fig. 17).The slope process is the difference between the current frame and the previous 10 th frame.The slope process could make the determination easier which only by a simple threshold, while the entropy slope larger than the threshold the warning signal will appear .In addition, the entropy curve also shows the improvement of the performance of proposed approach.In Figs.17a and b the entropy after applying the median filter show a larger difference with only performing background subtraction and the agreement is slightly better than with median filter processing.However, in Fig. 17c the difference between debris and non-debris flows is minor and the performance is similar with all the processes (subtraction, median filter, closing and the moving average).Even though the disparity is small the slope still could provide enough information for identifying debris flows when they occur.

Whole Image
In entropy analysis of whole image mode, the process procedure and parameters of moving average and slope are the same with ROI.It is obvious that the performance of the whole image processing is worse than ROI in all three data sets (Fig. 18).In all three cases, only the median filter improved the detection performance.Therefore the morphological closing apparently did not result in improved performance.Even though the performance is worse than the result using the ROI approach, the entropy slope in Fig. 18 shows that a clear signal to identify debris flow occurred in all three data sets.

DISCUSSION
Background subtraction is the simplest approach to detect a moving object.However, due to the complexity of background and non-rigid target property, the system has to add some processing to improve the detection performance.Improving the background subtraction (median filter and morphology closing) to eliminate the noise and strengthen the signal  is the focus of this study.After subtraction, the entropy function is also employed to evaluate the histogram distribution of the subtraction result and the entropy curve (Figs. 17 and 18) is also used to evaluate whether a debris flow occurs.Figure 1 shows the proposed method composed by several well known image processing techniques (such as: color transform, background subtraction, median filter, morphology, entropy and moving average).Although these techniques have been used in image processing for years, this study develops some improvements to obtain an acceptable performance for real-time detection purpose.
A main challenge is that the object has non-rigid (water current) properties and the color is similar to the background color.In Figs.11 -16, the filtering approaches not only eliminate the noise of detection but also make the detected object more complete.After applying the entropy function the distribution of the subtraction result can be evaluated.Figures 17 and 18 show that detection performance is improved after the spatial filtering processing (section 3.6).In addition, the ROI mode also makes the detection more accurate by removing the interference caused by operators, vegetation, fog, haze and others.Comparing the entropy result between Figs. 17 and 18, the ROI has better ability than the whole image mode for debris flow detection.Tables 2 and 3 also show the detection accuracy of ROI and whole image mode, by subjective threshold determination.The results show improved performance and no false alarm was triggered.
In the beginning of the process, the video frames are transformed to YUV and only the Y component (luminance) is chosen for processing.The transform not only simplifies the computation capacity into one third but also reserves most of the information in image frames.In addition to color transformation, the ROI selection is another approach to reduce the computational effort and also improve the performance.For real-time implementation, a video film should be obtained at 20 -30 FPS (frame per second) to acquire     (a)    4 shows that using ROI selection, the computing speed could reach the general standard (20 -30 FPS).Thus using the complete image model it is difficult to approach the standard.Comparison of Figs. 17 and 18 shows that the entropy curve in ROI might be easier to detect debris flow than for the complete image case.Consulting the experiment result of ROI selection (Table 4, Figs. 17,18), the size of region selected (ROI) should both consider the performance of computing efficiency and detection accuracy.The proposed method is tested using three different debris flow videos (involving a laboratory experiment and actual field debris flow described in section 3.2).Each of the test video also involves situations of debris and non-debris flow.In theory the tests should be adequate to apply to a real world debris flow.The algorithm utilizes the variation of entropy to trigger the warning alarm.Even though a series of process (median filter, morphology, moving average and slope) is used to trigger the signal more clearly, the warning threshold still needs to be established subjectively.The threshold is usually designed according to experience.If a better test is conducted, then an improved threshold could be estimated.Unfortunately the number of available databases from fixed camera instrumentation for monitoring debris flows are too few.Therefore a subjective threshold was assigned for this study.Nevertheless, a wide range of situations was considered in the testing of the 3 image sets, so the results represent a significant advance towards a practical solution.
Another drawback of the proposed system is that even though the detection performance using ROI is acceptable, in complete image mode, proper detection is affected by a moving background.The movement of operators, trees, fog or current flow causes errors .Even though a debris flow occurred and the warning signal has been triggered (Table 3, Fig. 18), the whole image mode still requires improvements.In the future, using an object tracking technique may be able to reduce the interference.
As a result of advances in monitoring and network transmission, fixed cameras have been rapidly installed on high risk debris flow regions in some mountainous areas.This study used an installed hardware (fix monitor and broadband network) as the basement to develop a real-time automatic debris flow (or landslide) detection system.Although there have been some other approaches such as: radar/NIR motion sensor or steel wire which could obtain similar results, the algorithm proposed here adds software to the original monitoring computer which does not increase costs off the system.In addition, the real-time fixed camera system not only detects debris flow automatically but also provides visual information to help the local government for evacuation or rescue decision-making.
Another practical problem is related to the video or network system malfunctions.Does the system still work in extreme conditions?In some extreme conditions (i.e., extreme rainfall), the fixed camera and the network system might be destroyed by a landslide or debris flow.Because the proposed system is a real-time image processing system, the images are transmitted to the laboratory in real-time.Before a fixed camera system is destroyed during extreme conditions, the alarm signal should have been triggered already.

CONCLUSIONS
This study designs an algorithm for monitoring debris flows from a fixed video system.Using background subtraction, spatial filtering and entropy determination, challenges related to non-ridge and color similarity properties can be overcome and the moving object (debris flow) can be properly detected.In addition, approaches using YUV transform and ROI selection also show improvements for detecting debris flows.The proposed system not only has high accuracy for debris flow detection but also requires low computational capacity for real-time implementation.This video monitoring system is effective for detecting debris flows or landslides.

Fig. 1 .
Fig. 1.The flow chart of the proposed method.

Fig. 3 .
Fig. 3. Comparison of Fisher's LDA and YUV by entropy.(a) The entropy derived by Fisher's LDA.(b) The entropy derived by YUV.The dot indicates the time when the debris flow occurr.
the histogram is obviously different for nondebris and debris flow frames.Therefore the histogram statistic should have the potential to evaluate the occurrence of a debris flow.

Fig. 4 .
Fig. 4. The example of 2-D median filter.(a) The first step of median filter.(b) The second step of median filter.

Fig. 6 .
Fig. 6.The background subtraction frames and histograms.(a) The frame of background subtraction of non-debris flow.(b) The frame of background subtraction of debris flow.(c) The histogram of background subtraction of non-debris flow.(d) The histogram of background subtraction of debris flow.

Fig. 7 .
Fig. 7.The comparison between before and after using moving average (MA5) of the entropy.
14 -16 of Data 1 -3.The figures are: (a) the original video frame, (b) the subtraction of the current and background, (c) the subtraction after median filter, and (d) the subtraction after median filter and morphological closing.Each figure also contains 4 frames: non-debris flow, warning before a debris flow, warning trigger and retaining warning in order to compare with the warning triggered.
Fig. 12.The ROI mode results of i th frame for Data 2. (a) The original video frame.(b) Background subtraction.(c) Median filter.(d) Closing.
Fig. 13.The ROI mode results of i th frame for Data 3. (a) The original of video frame.(b) Background subtraction.(c) Median filter.(d) Closing.

Fig. 14 .
Fig. 14.The whole image mode results of i th frame for Data 1.(a) The original video frame.(b) Background subtraction.(c) Median filter.(d) Closing.

Fig. 15 .
Fig. 15.The whole image mode results of i th frame for original Data 2. (a) The original video frame.(b) Background subtraction.(c) Median filter.(d) Closing.

Fig. 16 .Fig. 17 .
Fig. 16.The whole image mode results of i th frame for original Data 3. (a) The original video frame.(b) Background subtraction.(c) Median filter.(d) Closing.

Fig. 18 .
Fig. 18.Output entropy with a whole image mode.(a) Data 1.(b) Data 2. (c) Data 3.The yellow is the background subtraction.The cyan is median filter.The red is closing.The green is moving average of closing.The pink is the entropy slope.

Table 1 .
Information about the test videos.

Table 2 .
False alarm of debris flow with ROI mode.

Table 3 .
False alarm of debris flow with whole image mode.