Threshold Modeling of Basic Statistical Methods for Effective Motion Detection in Video Surveillance

This paper empirical investigates two basic statistical methods namely Adaptive Median and Adaptive Mean for motion detection in video surveillance for the optimization of parameters namely threshold and the refresh rate of background frame used in these methods. Experimentation shows that the optimum choice of parameters majorly affects the quality of motion detection. The performance of methods for different parameters is measured using precision, recall and f1-score. PR curves are also drawn which are based on precision and recall values to show the effect of different parameters. Test data includes six data sets from different scenarios of ‘CDNet2012’. Experimental results verify that for every method there are fixed values of parameters with slight variations which gives better result of object motion. These parameter values can be used or adapted for future experimentation on these methods with respect to each scenario.


Introduction
Frame differencing is the most logical and basic method for determining the motion in a video stream which requires thresholding the difference between two consecutive frames for motion detection. The thresholding is done to prevent the spurious noise to be falsely taken as foreground or motion. The choice of thresholding value in different scenario greatly affects the quality of motion detection. There is no fix method to determine threshold value, usually it has to be determined empirically from video sequence. Frame differencing is a crude method which is primarily dependent on frame rate for quality extraction of motion from the frames.
To overcome this limitation, background subtraction (BGS) methods are devised in which a background scene is modeled which is subtracted from the current frame to get moving object. Modeling of background is a tedious process and ideal modeling should be capable of managing dynamicity of scene, detection of ghost objects, sudden illumination and multi modal background. There are many statistical methods for background modeling which range from most basic such as Adaptive Mean (AM) and Adaptive Median (AMD) to highly complex methods based on Kernel Density Estimation (KDE) and Mixture of Gaussians (MOGs). Former methods are faster but lacks the ability to model dynamic scenes and multimodal scenes. The later category of methods is effective but time consuming and hence cannot be used in real time video surveillance, complex methods cannot be used. In AM and AMD methods, in order to handle dynamic scenes, the background needs to be updated periodically either through adaptive mean or through adaptive median methods. This updation rate is also called the refresh rate of background frame. There is no predefined method of choosing an optimum frame rate. Hence, there is no alternative but to determine optimum values of threshold and frame refresh rate through empirical investigation every time for a particular scenario.
This paper recommends to find optimum and adaptive values of threshold and the background frame refresh rate for moving object detection in video surveillance by using empirically study. The rest of the paper includes the following sections: Section I introduces the requirement of empirical investigation of the optimum values of methods' parameters. Section II discusses different detection methods and related works. Section III explained AM and AMD object detection methods. Section IV describes the experimental setup for empirical investigation. Section V discusses the results and is followed by the concluding part of the paper.

Object Detection Methods in Literature
Many literature survey [Yilmaz2006, Benezeth2008, Bouwmans2011, Athanesious2012, Parekh2014] critically evaluate and compare different methods of object detection qualitatively only. Many of these also failed to use rigorous benchmarks data which provide challenging environment of object detection. The above literature surveys also failed to discuss and evaluate the impact of various algorithmic parameters on efficiency. Our experimentations have used benchmark test data and evaluate methods quantitatively using precision, recall and F-measure so that control parameters values can be determined. In AM and AMD both threshold and background frame refreshing rate are two parameters which need attention. In literature, we didn't find any paper which critically evaluated the effect of these two parameters. Most of the object detection algorithms fixed them empirically based on the test data. In literature, threshold is taken mostly as the tuning parameter. Some of these methods and subsequent improvements are explained below: Rosin

Basic Motion Detection Methods
Frame Differencing method suggests thresholding the difference of temporally adjacent frames to obtain motion in a video.
Diff(x,y) 〖=F〗_t (x,y)-F_(t-1) (x,y) (1) M_t (x,y)={1 iff abs(Diff(x,y)) ≥Τh ;0 otherwise} (2) Where F_t (x,y) is current frame intensity (x,y) pixel. M_t (x,y) is object detection at (x,y) thresholded with a predetermined value 'Th' usually determined by empirical investigation on initial frames of video streams under consideration. The optimum value of threshold is crucial for effective results in basic statistical methods. The above method is fast but usually fails due to improper frame rate. It can be further improved by modeling a background frame. The background in the starting of object detection process is initialized by some fix number of frames from the video. Now in order to detect moving object difference is calculated between the current frame and the background frame which is further thresholded using equation (2).
Step 2: For each of remaining frame say Step

Results and Discussion
The essential techniques for object identification have been tried on a benchmark informational collection "CDnet2012" (Goyette, Jodoin, Porikli, Konrad, and Ishwar, 2012) utilizing MATLAB programming on an Intel i3 4GB memory framework. It contains six unique situations portraying different issues of movement identification, for example, elements of scene, impediment, shadow, apparition, interleaved developments and so on Every situation incorporates a few video grouping and for analyze reason, haphazardly six arrangements specifically Highway (baseline), Traffic (camera jitter), Canoe (dynamic background), Sofa (intermittent object motion), copy machine (shadow) and lake-side (thermal imagery) scenes have been looked over these situations. Some underlying edges are utilized from each succession to show an underlying foundation picture. The outcomes are determined utilizing review, exactness, F1-measure by contrasting groundtruths. Fifteen edges for ten qualities foundation outline revive paces of are utilized to draw P-R bends which speaks to the nature of recognition as region secured by these bends. Higher secured territory means better outcomes. Accuracy and Review based F1score are utilized to discover the ideal estimation of α and β independently for the two techniques. Accuracy, which is number of pertinent examples out of complete recovered occasions and Review which is important occurrences that are recovered out of all out applicable cases are found by contrasting the movement outline and real groundtruths. Both are joined to frame a superior measure which is called F1-score. This is given by the accompanying condition: F1=(2*Precision*Recall)/((Precision+Recall)) (8)  Table 1 and Table 2 displays best threshold and best frame rates for every scenario with its corresponding best F1 score for Adaptive Mean and Adaptive Median BGS methods respectively. If we analyze the table, it is clearly seen that no one fix value of threshold and frame rate can be fixed for all scenario. We have taken only one data set from one scenario. So, instead of fixing a fix value for parameters, it is suggested to define a range of parameters. Based on the analysis of whole data, one more thing, we have observed from results, is that F1 score is continuous with parameters i.e. it is either decreasing or increasing with increase or decrease of parameter values. So a range may be safely defined for each scenario. These range values are given in table3.

Conclusion
This paper proposes an empirical evaluation method for determining the parameters' values for BGS based edge detection methods AM and AMD. Two parameters global threshold value and the background frame refresh rate from AM and AMD have been identified and empirically evaluated to fix their values. Experiments hasve found that one threshold value can't be fixed for all data sets in a scenario but a narrow range of these values can be defined for both BGS methods. One range of threshold values for AM and AMD both has been defined but frame refresh rates for both methods can't agree on one range because of its inherent different approach of background refresh rate. So, two separate ranges for refresh rate have been defined. These value ranges can be effectively used in future for fine tuning object detection methods.
As the values are still in a range, more experiments are required to determine or model a fix value automatically based on scenario, data set properties. An adaptive value can also be a solution but need more experimentation on different types of scenario before generalization.