Open access peer-reviewed chapter

Particle-Filter-Based Intelligent Video Surveillance System

Written By

Ying-Jen Chen

Submitted: 19 October 2017 Reviewed: 03 April 2018 Published: 05 November 2018

DOI: 10.5772/intechopen.76960

From the Edited Volume

Intelligent Video Surveillance

Edited by António J. R. Neves

Chapter metrics overview

1,109 Chapter Downloads

View Full Metrics

Abstract

In this study, an intelligent video surveillance (IVS) system is designed based on the particle filter. The designed IVS system can gather the information of the number of persons in the area and hot spots of the area. At first, the Gaussian mixture background model is utilized to detect moving objects by background subtraction. The moving object appearing in the margin of the video frame is considered as a new person. Then, a new particle filter is assigned to track the new person when it is detected. A particle filter is canceled when the corresponding tracked person leaves the video frame. Moreover, the Kalman filter is utilized to estimate the position of the person when the person is occluded. Information of the number of persons in the area and hot spots is gathered by tracking persons in the video frame. Finally, a user interface is designed to feedback the gathered information to users of the IVS system. By applying the proposed IVS system, the load of security guards can be reduced. Moreover, by hot spot analysis, the business operator can understand customer habits to plan the traffic flow and adjust the product placement for improving customer experience.

Keywords

  • intelligent video surveillance (IVS)
  • Gaussian mixture model
  • particle filter
  • Kalman filter

1. Introduction

Video surveillance systems are often utilized at some specific places such as exits, entrances, parking lots, convenient stores, etc. for management. Traditionally, security guards watch screens of monitored places for surveillance. However, according to statistics, one security guard can only watch four monitors at the same time, and the concentration can last only for 10 minutes such that more than 50% of key information is lost. Moreover, it is not economically worthwhile to hire multiple security guards to monitor one video surveillance system. Therefore, intelligent video surveillance (IVS) systems have become more and more important in commercial sector and have attracted a lot of attention in research area as well [1, 2, 3].

IVS system can be defined as the real-time monitoring of both persistent and transient objects within a specific environment. IVS is also referred to as video analytics (VA) which involves the use of software to automatically detect the objects of specific interest and analyze their behaviors. For finding the objects of interest, it is usually done by detecting the movements or changes in the image that can be achieved by background subtraction technique. To do background subtraction, an effective way to build up the background is the Gaussian mixture model [4, 5]. After the object of interest is detected, the goal is to analyze their behavior that sometimes can be done by tracking them. Usually, particle filters and Kalman filters are employed for the purpose of tracking objects in IVS systems [6, 7, 8, 9, 10].

IVS systems have been applied for different kinds of purposes. Ref. [11] presents an architecture for a perimeter security system dedicated to critical transport infrastructure protection. Ref. [12] addresses a framework for event decision of vision-based intelligent surveillance system based on the fuzzy model. A shape-perceived algorithm using the building block-based matching method is presented in [13] for object tracking of intelligent surveillance applications. A way of unification of flame and smoke detection algorithms by merging the common steps into a single processing flow is proposed in [14] for IVS systems.

The aim of this study is to design a IVS system based on the particle filter. The designed IVS system can gather the information of the number of persons being in the area, the number of persons having been in the area, and hot spots (places of more than usual interest, activity, or popularity) of the area. The Gaussian mixture background model is utilized to detect moving objects by background subtraction in the designed IVS system. The moving object appearing in the margin of the video frame is considered as a new unit (person). When a new person is detected, a new particle filter is established and assigned to track the new person. For saving the computational load, the particle filter is terminated when the corresponding tracked person leaves the video frame. Moreover, the Kalman filters is utilized to estimate the position of the person when the person is occluded. Information of the number of persons in the area (having been in the area) and hot spots is gathered by tracking persons in the video frame. Finally, a user interface is designed to feedback the gathered information to users of the IVS system. By applying the proposed IVS system, the load of security guards can be reduced. Moreover, by hot spot analysis, the business operator can understand customer habits to plan the traffic flow and adjust the product placement for improving customer experience.

Advertisement

2. Preliminary

In this section, three well-known techniques, i.e. adaptive Gaussian mixture model, particle filter, and Kalman filter, are presented for constructing the IVS system.

2.1. Adaptive Gaussian mixture model

The recent history of each pixel, X1X2Xt, is modeled by a mixture of k Gaussian distributions. The probability of observing the current pixel value is given as Eq. [4]:

PXt=i=1kωi,tηXtμi,tΣi,tE1

where k is the number of distributions, ωi,t is an estimate of the weight of the ith Gaussian distribution in the mixture at time t, μi,t is the mean value of the ith Gaussian distribution in the mixture at time t, Σi,t is the covariance matrix of the ith Gaussian distribution in the mixture at time t, and η is a Gaussian probability density function:

ηXtμΣ=12πΣ12e12XtμTΣ1Xtμ.E2

The updating rules for the parameters of the adaptive Gaussian mixture model can be found in [5]. After the Gaussian mixture model is established, the foreground pixels (representing the moving objects) can be obtained by applying the Mahalanobis distance:

DiXt=Xtμi,tTΣi,tXtμi,t.E3

The adaptive Gaussian mixture model has been applied for different kinds of applications, such as automatic speech emotion recognition [15], tracking targets on long-range radar systems [16], fast sampling-based motion planning [17], etc.

2.2. Particle filter

The key idea of particle filtering is to approximate the probability distribution by a weighted sample set [18]:

S=snπnn=1N.E4

Each sample consists of an element s which represents the hypothetical state of the object and a corresponding discrete sampling probability π where n=1Nπn=1. The evolution of the sample set is calculated by propagating each sample according to a system model. Each element of the set is then weighted in terms of the observations, and N samples are drawn with replacement. The mean state of the object is estimated at each time step by

ES=n=1Nπnsn.E5

Particle filter provides a robust tracking framework.

The particle filter has been successfully applied to many applications. An algorithm to track the vehicle with the adaptively changed scale based on particle filter is propose in [19]. The vehicle guidance with control action computed by a Rao-Blackwellized particle filter is proposed in [20]. The localization of indoor robot based on particle filter with EKF proposal distribution is proposed in [21].

2.3. Kalman filter

The Kalman filter [22] addresses the general problem of trying to estimate the state of a discrete-time controlled process that is governed by the linear stochastic difference equation:

xt=Fxt1+wtE6

with measurement equation

φt=Hxt+vtE7

where xt is the state vector, F is the transition matrix, φt is the measurement output, H is the output matrix, wt is the process noise, and vt is the measurement noise. The process noise and measurement noise are assumed to be independent of each other, white, and with normal probability distributions:

pωN0QE8
pvN0RE9

where Q is the process noise covariance matrix and R is measurement noise covariance matrix. Moreover, x̂t is defined to be the a priori state estimate at step t, and x̂t is defined to be the a posteriori state estimate. Then, etxtx̂t is defined to be a priori estimate error, and etxtx̂t is defined to be the a posteriori estimate error. The a priori estimate error covariance is then

Pt=EetetTE10

and the a posteriori estimate error covariance is

Pt=EetetT.E11

The equations for the Kalman filter fall into two groups: time update (predictor) equations and measurement update (corrector) equations. The time update equations are given as

x̂t=Fx̂t1E12
Pt=FPt1FT+Q.E13

The measurement update equations are given as

Kt=PtHTHPtHT+R1E14
x̂t=x̂t+KtφtHx̂tE15
Pt=IKtHPt.E16

Figure 1 shows the operation architecture of Kalman filter.

Figure 1.

The operation architecture of Kalman filter.

The Kalman filter has been widely applied to time series analysis and statistical modeling problems. This study [23] improves the navigation performance, when refraction starlight is used to compute the position and velocity of a satellite in unscented Kalman filter. An anti-spoofing algorithm based on adaptive Kalman filter for high dynamic positioning in global positioning system is proposed in [24]. In this work [25], the robust Kalman filter is applied to the people occupancy estimation problem, and an iterative algorithm is developed to handle the state-dependent model uncertainties.

Advertisement

3. IVS system design

The IVS system design is presented in this section. Figure 2 shows the operation process of the IVS system. Firstly, the adaptive Gaussian mixture model is applied for constructing the background model to detect moving objects in the video image frame. The moving object appearing in the margin of the video image frame is considered as a new unit (person), and then a new particle filter is established and designated to track the new person. Moreover, the Kalman filter is utilized to correct the position obtaining by the particle filter and to estimate the position during occlusion. After that, the information of the number of persons in the area, the number of persons having been in the area, and hot spots are obtained by analyzing the tracking paths. Finally, the information is fed back to the user by the user interface. Each block of the IVS system design shown in Figure 2 will be illustrated in the following subsections.

Figure 2.

The operation process of the IVS system.

3.1. Gaussian mixture model for detecting new units

By applying the adaptive Gaussian mixture model described in Subsection 2.1, the moving objects can be detected by using the Mahalanobis distance of Eq. (3). Figure 3 illustrates the foreground pixels representing the moving objects obtained by the adaptive Gaussian mixture model. Here, we assume that a new unit (person) will appear only from the border of the monitored place. Therefore, for a moving object detected in the margin of the monitoring video frame, we need to determine that it is a new person or not.

Figure 3.

Foreground pixels representing the moving objects obtained by the adaptive Gaussian mixture model: (a) background, (b) moving object, and (c) foreground pixels.

Figure 4 shows the checking process for determining the object detected in the margin of the monitoring video frame as a new person or not. At first we need to check the size and ratio of the detected object to identify that the detected object is a person or not. If the size and ratio of the detected object are identified as a person, then we have to check that the detected person is new or not. In the case that there is no tracked person in the video frame, the detected person in the margin of the video frame is determined to be a new person. In the case that there has (have) been tracked person(s) in the video frame, we need to calculate the distance(s) between the detected person and tracked person(s) to check that the detected person is new or not. If the distance(s) is (are all) longer than a predefined threshold Td, the detected person is considered as a new person. If some distances are shorter than Td, we need to apply Eq. (18), which will be described in the following subsection, to calculate the similarities of color distribution between the detected object and the tracked units with distance shorter than Td. If all similarities between the detected object and the tracked units with distance shorter than Td are lower than a predefined threshold Ts, the detected object is determined as a new person.

Figure 4.

The checking process for determining the object detected in the margin of the monitoring video frame as a new person or not.

It is noted that there are several people detection methods [26, 27]. However, in the designed IVS system, we assume that the only moving objects are persons. Hence, we choose a simple method, which is adaptive Gaussian mixture model, to detect that the persons appear from the border of the monitored place for reducing the computational load.

3.2. Particle filter for tracking units

For a new detected person, a new particle filter is established and designated to track the new person. In the design of the particle filter, the target model of target region (the detected person) is the color distribution which is represented by histograms calculated in the HS (Hue, Saturation) space using 8 × 8 bins. A popular measure between two color distributions is the Bhattacharyya coefficient. Considering discrete densities such as two color histograms

p=puu=1m,q=quu=1mE17

the Bhattacharyya coefficient is defined as

ρpq=u=1mpuqu.E18

The larger ρ is, the more similar the two distributions are. For two identical histograms, we obtain ρ=1 indicating a perfect match. The target region of the detected person is represented by a rectangle so that a sample is given as

s=xyHxHyTE19

where x and y represent the center location of the rectangle and Hx and Hy are the width and length of the rectangle, respectively, as shown in Figure 5. The sample set is propagated through the application of a dynamic model:

st=Ast1+wt1E20

Figure 5.

The target region of the detected person represented by a rectangle.

where A is an 4×4 identity matrix and wt1 is a random vector drawn from the noise distribution of the system. Assuming that the target histogram is q and the histogram of the sample sn is psn, the observation probability of each sample is given as

πn=ρpsnq.E21

The tracking result can be calculated by Eq. (5). During filtering, samples with a high weight may be chosen several times, leading to identical copies, while others with relatively low weights may not be chosen at all. Figure 6 illustrates persons tracked by particle filter.

Figure 6.

Persons tracked particle filter.

Although the particle filter is a robust method for tracking objects, it cannot deal with some special cases. Since we use color distribution for the target model of the particle filter, it may lose tracking when the color of the background is similar to the color of the tracking object. Moreover, if the tracking object is occluded, still the particle filter will lose tracking.

3.3. Kalman filter for correcting and estimating positions

In the IVS system design, the Kalman filter is utilized to correct the position obtained by the particle filter and to estimate the position during occlusion. Here, the uniform linear movement is considered. Hence, the linear stochastic difference equation is given as

x̂tŷtx̂̇tŷ̇t=1001100100001001x̂t1ŷt1x̂̇t1ŷ̇t1+wt1E22

and the measurement equation is given as

x̂tŷt=10010000x̂tŷtx̂̇tŷ̇t+vtE23

where x̂ŷ is the estimating position and x̂̇ and ŷ̇ represent the estimating speeds on x and y directions, respectively. In the measurement update equation of Eq. (15), the measurement φt=xtytT is obtained from the tracking result of the particle filter.

For improving the tracking results of particle filter, after propagation by Eq. (20), the estimating speeds x̂̇t1 and ŷ̇t1 of the Kalman filter are added to the position of each sample of the particle filter such that

stn=xtn+x̂̇t1,ytn+ŷ̇t1,Hx,Hy.E24

When the tracked object is occluded, the Kalman filter is applied to estimate the position of the occluded object. Therefore, for the case that all the similarities between samples of particle filter and the target are lower than lower than a predefined threshold Tp, the Kalman filter doesn’t use the measurement correction and only takes the filter prediction as object position. Moreover, all samples of the particle filter are uniformly distributed around the estimating position such that the particle filter can retrieve tracking after the object recovering from occluded. However, if the occluded object is stayed in the back of obstacle without moving, the Kalman filter will still lose the tracking.

3.4. User interface for feeding back information

Finally, by analyzing the tracking paths, the information of the tracking result, the number of persons in the area, the number of persons having been in the area, and hot spots are obtained and then fed back to the user through the user interface as shown in Figure 7. Furthermore, several parameters can be adjusted through the user interface for adapting different environments.

Figure 7.

User interface of the IVS system.

Advertisement

4. Experiment results

The experiment is done in the San Shia Campus of the National Taipei University, Taipei, Taiwan. Figure 8 illustrates the operation process of the IVS system. In Figure 8, the up-left frame is the original image; the up-right frame is the background subtraction binary image applying Gaussian mixture model; the left-down frame shows the tracking result by applying particle filter (green rectangle) and the result corrected by Kalman filter (white rectangle), and the right-down frame is the final tracking result. Figure 9 makes a comparison to show the utility of adding the estimating speeds of the Kalman filter to the position of each sample of the particle filter, i.e., to show the utility of Eq. (24). It can be seen that a fast-moving bicycle can be tracked by the particle filter with Eq. (24) as shown in Figure 9(a). However, the fast-moving bicycle cannot be tracked by the particle filter without Eq. (24) as shown in Figure 9(b). Figure 10 makes a comparison to show the utility of applying Kalman filter to estimate the position of the occluded object. It can be seen that the particle filter can retrieve tracking after occlusion with applying Kalman filter to estimate the position of the occluded object as shown in Figure 10(a). However, it can be seen that the particle filter cannot retrieve tracking after occlusion without applying Kalman filter to estimate the position of the occluded object as shown in Figure 10(b). Moreover, it can also be seen in Figure 10(a) that all samples of the particle filter are uniformly distributed around the estimating position such that the particle filter can retrieve tracking after the object recovering from occluded.

Figure 8.

Illustration of the IVS operation process.

Figure 9.

A fast-moving bicycle tracked by the particle filter (a) with Eq. (24) and (b) without Eq. (24).

Figure 10.

(a) Applying Kalman filter to estimate the position of the occluded object and (b) without applying Kalman filter to estimate the position of the occluded object.

Advertisement

5. Conclusion

Based on the particle filter, an IVS system has been designed in this study. Utilizing the Gaussian mixture background model, the moving objects appearing in the margin of the video frame can be detected and considered as a new person. Then, a new particle filter is established and designated to track the new considered person. Moreover, the Kalman filter is applied to correct the tracking result and estimate the position when the tracked person is occluded. By analyzing the tracking paths, the information of the number of persons in the area, the number of persons having been in the area, and hot spots can be obtained. Finally, the information is fed back to the user through the user interface.

References

  1. 1. Li SR, Tsai HC, Wang YK, Sun TH, Chen YJ. Particle-filter-based intelligent video surveillance system. In: Proceedings of the International Conference on System Science and Engineering (ICSSE'16); 7-9 July. 2016. pp. 1-4
  2. 2. Collins RT, Lipton AJ, Kanade T. A system for video surveillance and monitoring. In: Proceedings of American Nuclear Society (ANS) Eighth International Topical Meeting on Robotic and Remote Systems; April 1999
  3. 3. Nam Y, Rho S, Park JH. Intelligent video surveillance system: 3-tier context-aware surveillance system with metadata. Multimedia Tools and Applications. 2012;57:315-334. DOI: 10.1007/s11042-010-0677-x
  4. 4. Stauffer C, Grimson WEL. Adaptive background mixture models for real-time tracking. Computer Vision and Pattern Recognition. 1999;2:252-258
  5. 5. KaewTraKulPong P, Bowden R. An improved adaptive background mixture model for real-time tracking with shadow detection. In: Proceedings of the 2nd European Workshop on Advanced Video Based Surveillance Systems (AVBS'01); September. 2001. pp. 1-5
  6. 6. Zhai Y, Yeary M. An intelligent video surveillance system based on multiple model particle filtering. In: Proceedings of the IEEE Instrumentation and Measurement Technology Conference Proceedings (IMTC'08); 12-15 May 2008; Victoria, BC, Canada
  7. 7. Li SR, Tsai HC, Wang YK, Sun TH, Chen YJ. Particle-filter-based intelligent video surveillance system. In: Proceedings of the International Conference on System Science and Engineering (ICSSE'16); 7-9 July 2016; Puli, Taiwan. pp. 1-4
  8. 8. Gaddigoudar PK, Balihalli TR, Ijantkar SS, Iyer NC. Pedestrian detection and tracking using particle filtering. In: Proceedings of the International Conference on Computing, Communication and Automation (ICCCA'17); 5–6 May 2017; Greater Noida, India. pp. 110-115
  9. 9. Amor N, Chebbi S. Performance comparison of particle swarm optimization and extended Kalman filter methods for tracking in non-linear dynamic systems. In: Proceedings of the International Conference on Control, Automation and Diagnosis (ICCAD'17); 19–21 Jan. 2017; Hammamet, Tunisia. pp. 116-119
  10. 10. Cheng HY, Hsu SH. Intelligent highway traffic surveillance with self-diagnosis abilities. IEEE Transactions on Intelligent Transportation Systems. 2011;12:1462-1472. DOI: 10.1109/TITS.2011.2160171
  11. 11. Banu VC, Costea IM, Nemtanu FC, Bădescu I. Intelligent video surveillance system. In: Proceedings of the IEEE 23rd International Symposium for Design and Technology in Electronic Packaging (SIITME'17); 26–29 October 2017; Constanta, Romania. pp. 208-212
  12. 12. Wahyono, Filonenko A, Kurnianggoro L, Jo KH. A fuzzy model-based integration framework for vision-based intelligent surveillance systems. In: Proceedings of the IEEE International Conference on Mechatronics (ICM'17); 13-15 February 2017; Churchill, VIC, Australia. pp. 358-361
  13. 13. Chung YC, Lai YK. A shape-perceived object tracking algorithm for intelligent surveillance systems. In: Proceedings of the IEEE International Conference on Consumer Electronics-Taiwan (ICCE-TW'15); 6-8 June 2015; Taipei, Taiwan. pp. 394-395
  14. 14. Filonenko A, Hernández DC, Shahbaz A, Jo KH. Unified smoke and flame detection for intelligent surveillance system. In: Proceedings of the IEEE 25th International Symposium on Industrial Electronics (ISIE'16); 8–10 June 2016; Santa Clara, CA, USA. pp. 953-957
  15. 15. Yang JH, Hung JW. A preliminary study of emotion recognition employing adaptive Gaussian mixture models with the maximum a posteriori principle. In: Proceedings of the 2014 International Conference on Information Science, Electronics and Electrical Engineering (ISEEE'14); 26–28 April 2014; Sapporo, Japan. pp. 1576-1579
  16. 16. Davis B, Blair WD. Adaptive Gaussian mixture modeling for tracking of long range targets. In: Proceedings of the 2016 IEEE Aerospace Conference; 5-12 March 2016; Big Sky, MT, USA. pp. 1-9
  17. 17. Huh J, Lee B, Lee DD. Adaptive motion planning with high-dimensional mixture models. In: Proceedings of the 2017 IEEE International Conference on Robotics and Automation (ICRA'17); 29 May-3 June 2017; Singapore, Singapore. pp. 3740-3747
  18. 18. Nummiaro K, Koller-Meier E, Van Gool L. Object tracking with an adaptive color-based particle filter. In: Van Gool L, editor. Pattern Recognition. DAGM 2002. Lecture Notes in Computer Science, vol 2449. Berlin, Heidelberg: Springer; 2002. pp. 353-360. DOI: 10.1007/3–540-45783-6_43
  19. 19. Yang S, Hao K, Ding Y, Liu J. Adaptively self-driving tracking algorithm based on particle filter. In: Proceedings of the 4th International Conference on Smart and Sustainable City (ICSSC'17); 5-6 June 2017; Shanghai, China
  20. 20. Sans-Muntadas A, Brekke E, Pettersen KY. Vehicle guidance with control action computed by a rao-blackwellized particle filter. In: Proceedings of the 11th Asian Control Conference (ASCC'17); 17-20 December 2017; Gold Coast, QLD, Australia. pp. 2855-2860
  21. 21. Xiao Y, Ou Y, Feng W. Localization of indoor robot based on particle filter with EKF proposal distribution. In: Proceedings of the 2017 IEEE International Conference on Cybernetics and Intelligent Systems and IEEE Conference on Robotics, Automation and Mechatronics; 19–21 November 2017; Ningbo, China. pp. 568-571
  22. 22. Welch G, Bishop G. An Introduction to the Kalman Filter. Tech. Rep. TR95041. Chapel Hill: Dept. Comput. Sci., Univ. North Carolina; July 2006
  23. 23. Si F, Zhao Y, Zhang X. Memory fading unscented Kalman filter and its application in navigation by stellar refraction. In: Proceedings of the 2017 IEEE Aerospace Conference; 4-11 March 2017; Big Sky, MT, USA. pp. 1-8
  24. 24. Zhang T, Gao J, Ye F. Anti-spoofing algorithm based on adaptive Kalman filter for high dynamic positioning. In: Proceedings of the 2017 Progress in Electromagnetics Research Symposium-Fall (PIERS-FALL'17); 19–22 November 2017; Singapore, Singapore. pp. 838-845
  25. 25. Li K, Zhang K. Building occupancy estimation with robust Kalman filter. In: Proceedings of the 11th Asian Control Conference (ASCC'17); 17-20 December 2017; Gold Coast, QLD, Australia. pp. 1406-1410
  26. 26. Ren X, Du S, Zheng Y. Parallel RCNN: A deep learning method for people detection using RGB-D images. In: Proceedings of the 10th International Congress on Image and Signal Processing, BioMedical Engineering and Informatics (CISP-BMEI'17); 14–16 October 2017; Shanghai, China, China
  27. 27. Andriluka M, Roth S, Schiele B. People-tracking-by-detection and people-detection-by-tracking. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR'08); 23-28 June 2008; Anchorage, AK, USA

Written By

Ying-Jen Chen

Submitted: 19 October 2017 Reviewed: 03 April 2018 Published: 05 November 2018