Identification of Trajectory Anomalies on Video Surveillance Systems

Recently, CCTV surveillance applications have remarkably developed for public welfare. However, the investigation of different techniques for online implementation is always significantly restricted. Numerous implementations propose for detecting irregularities of moving objects in the videotape. Performance of fuzzy in trajectory’s anomaly is one of the most robust detection procedures. In this paper, the authors propose a fuzzy implemented trajectory anomalies detection technique with the help of some parameters such as velocity, path deviation, and size of the moving objects. The critical aspect of the framework is a compact set of highly descriptive features extracted from a novel cell structure that helps us define support regions in a coarse-to-fine fashion. This paper also illustrates a small outline of different detection techniques. The authors also exhibit the outcome of experiments on the Queen Mary University of London junction dataset (QMUL).


INTRoDUCTIoN
Anomaly detection is one of the most difficult problems in computer vision, mostly because it is difficult to extract a particular feature that connects to a particular occurrence.Instead of merely encoding spatial information on a picture, video also encodes motion information.However, the process of extracting more information necessitates large resources.Video analysis using two modalities provides significantly more information to detect a specific activity.Designing an information extraction approach that can efficiently and quickly represent information from videos is crucial.
Several studies have tried to use handcrafted features to categorise anomalies in videos.Edge Oriented Histogram (EOH) and Multi-layer Histogram of Optical Flow (MHOF) are two suggested techniques for detecting anomalies that represent appearances and motion, respectively (Cong, Yuan, & Tang, 2013).A different approach makes use of the shift in the temporal pattern by computing Markovian differences from the local pattern while the time scale is modelled globally (Dogra, Ahmed, & Bhaskar, 2016).With the use of the Gaussian Mixture Model (GMM), which uses mean shift to calculate location, speed, and direction, it is possible to identify vehicles in video and determine whether or not an accident will occur (Hui, Yaohua, Lu, & Jiansheng, 2014).
A generic technique to detecting anomalies, in addition to identifying anomalies in a particular criminal activity, involves employing a spatio-temporal feature detector to extract local descriptors of a normal event and training a classifier to obtain the global representation of a normal event.Despite the high cost of computing required, iDT is usually recognised as the best hand-engineered approach (Tran, Wang, Torresani, Ray, Lecun, & Paluri, 2018).When trained on a dataset of typical movies, all of these algorithms will identify patterns with low probabilities as anomalies.
At present days, our real−world network requires an automatic surveillance system.It is impossible to go after and review every entity in a surveillance network from everywhere in the real-time world.Detecting and identifying isolated and unfamiliar events from surveillance areas is exceptionally required to protect our society from massive illegal activities.To reduce human resources and preserve our essential institution, we utterly require an automated detection of abnormality on a surveillance system from several dimensions.In the present life, abnormality detection is an integral part of different research fields of computer vision.This research integrates and employs distinct sectors like person activity detection, human identification, visual surveillance, object trailing, etc.The researchers in this domain have done the execution of different experiments (Chandola, Banerjee, Kumar, 2009).The explorers furnish the inspection of various propositions to innovative outlooks in the publication (Sodemann, Ross, & Borghetti, 2012).However, it is insufficient to convey the necessary circumstances and challenges in this area.A colossal view and understanding of the presence of a data bank are essential, and no such endeavors are built in the orientation relating to our expertise.Here, we propose an innovative approach to detect anomalies in the video to help automated visual surveillance search organization.This paper also affects the new investigators, scientists, explorers, and students to take part in cracking drawbacks in this domain.
In the present situation, to terminate criminal offenses or traffic violations, CCTV (Closed− Circuit Television) surveillance the system has made other desires in numerous surroundings such as different stations, airports, critical convergence, etc. Acceptable identification and estimation of unpredictable activities within an area of interest are integral to a video surveillance network.Prompt detection of these relatively rare events that enable proactive calculation involves constant analysis of all the directions.
In this study, we suggest a brand-new framework for detecting video anomalies that is appropriate for all types of uncertain situations.Our framework uses a new cell structure to extract motion information from the scene based on local activity like velocity, path deviation, and object size.As a result, there are much less characteristics to process throughout the training and testing phases, which speeds up calculation.Our framework's primary features are: • Foreground occupancy and optical flow features can be found in the short set of features that was extracted.While features from optical flow are helpful to detect events connected with abrupt motion, such as panic or fighting, features from foreground occupancy are valuable to capture events associated with weak motion, such as loitering or the aberrant presence of items.• In complex settings where anomalous occurrences may be caused by quick motion, weak motion, or a combination of the two, a novel inference model has been used to appropriately explain the activity.This is especially helpful for sequences portraying realistic events, such as robbery, automobile accidents, and other perilous scenarios.
We use a well-known existing dataset to test our framework.The evaluation findings demonstrate that our framework outperforms several methods and produces outcomes that are competitive with those of other methods.Our framework achieves frame processing times in both scenarios that are appropriate for computation of sequences with up to 30 frames a second (FPS).
The details of the paper have been arranged in a sequence.Section 1 discusses the literature survey on detecting an anomaly in the video.We focus on building an expert surveillance system for tracking uncommon behaviors of moving objects in section 2. Origin, destination, path, deviation, and velocity are taken as an inspection to analyze the situation.In section 3, we describe the dataset and empirical result.The conclusion and future scope of the research work are presented in section 4. In the last section, we extract the references.
More contemporary achievements have been obtained in surveillance areas, such as the Service− Oriented Architecture (SOA), the approach applied in unorthodox CCTV applications.Most of the modern research compositions have been enlarged to model and analyze specific activities in an arranged way by skilled understandings.Nevertheless, they are inadequate to convey learning new context of interest with the help of previous scene examinations.There is some need for powerful processing techniques like non-template-based that analyze massive monitoring and observed datasets.Normal and anomalous patterns have contradicted it during the experimental study of the research.Such viewpoints are typically referred to as abnormality, novelty, or outlier detection methods, helping that a large amount of archival data is used for learning to detect normal behavior.
On the other hand, the two primary kinds of anomaly detection techniques are accuracy-oriented techniques, which focus on increasing detection accuracy, and processing time-oriented techniques, which emphasize speeding up frame processing.The latter category seeks to improve performance online.
It is clear that in video anomaly detection algorithms, there is a trade-off between detection accuracy and processing speed.The problem is then to effectively manage this trade-off by utilizing a minimal number of highly descriptive attributes in order to achieve competitive accuracy for online performance.By using a small number of highly descriptive optical flow variables like velocity, path deviation, and moving object size, our proposed system strikes a balance between these trade-offs.This is accomplished by creating a fresh cell structure on the scene, from which only features from cells deemed important to the investigation are extracted.

PRoPoSeD MeTHoD
Our proposed method is divided into two stages, the training stage and the testing stage.These two stages are explained in Figure 1 and Figure 2.
According to the diagram, the proposed method has started with segregating plotted visual images into a set of segments (Sultani, Chen, & Shah, 2018) depending on each trajectory.After dividing the picture, we can get several regions, as illustrated in Figure 3.We also have each trajectories size and image size.So, we have calculated a Δw and Δh in Equation 1. Δw and Δh help to determine the number of rows and columns in a region.∆w = imagewidth / trajectorysize , ∆h= imageheight / trajectorysize (1) Here we have explained the generating of a non-overlapping region in the image extracted from video in algorithm 1.
Our first objective is to find out the average velocity of each region.To find the average speed, we have chosen the maximum number of areas from all the trajectories because if we can divide the image into smaller spaces, we will not get almost the actual velocity of the object.Choosing the maximum number of regions from all trajectories is explained in algorithm 2. Now, we take a trajectory one by one from the testing set and select the regions for all the trajectory points.After selecting the areas, we have calculated the Euclidian distance among the points for all regions explained in algorithm 3. When we get these distances, we can be easily computed the velocity(v) of all areas with the help of Frame Per Second (FPS) in Equation 2. Here,dist(p1,p2,p3,....,pn) means the distance among the points p1,p2,p3, ...., pn.These points are pixel coordinate values for each region.v = (dist(p1,p2,p3,…………,pn)) / FPS (2) So, our first objective achieves after getting the velocity of all the selected regions by the trajectory.Afterward obtaining speed, we have determined the average speed of all courses for a particular area described in Figure 4.After that, we implemented average path deviation from the training set and made classes according to the fuzziness of the path deviation through all trajectories.for j = 1 to height in increasing order of (Δh+1) do 9 for j = 1 to width in increasing order of (Δw+1) do 10 assign 4 co-ordinates of each region have been added for each trajectory; 11 calculate the number of region for each trajectory; 12 end 13 end 14 add all the segmented region into the output trajectory; 15 end Algorithm 2: choose the maximum number of the region Result: we have chosen the maximum number of non-overlapping regions of all trajectories; /* This procedure has been worked for only train set */ 1 read all trajectories from training set having non-overlapping region; 2 for i = 1 to the number of trajectories in increasing order do 3 get the number of the non-overlapping region for each trajectory; 4 if this is the maximum number of the region then 5 choose the number of the region for future usage; 6 end 7 end Algorithm 3: calculate Euclidian distance and velocity among all non-overlapping regions Result: we have got Euclidian distance and velocity among all nonoverlapping regions; /* This procedure has been worked for a train set and test set data both */ 1 read all trajectories having non-overlapping region; 2 using the maximum number of region, we have divided all the trajectories; 3 calculate the number of trajectory points in each region and also store their co-ordinate points; 4 for i = 1 to the number of trajectories in increasing order do 5 get all the non-overlapping region; 6 calculate Euclidian distance and velocity with the help of frame per second; 7 store them into the output trajectory database for the next phase; 8 end Algorithm 4: calculate fuzziness of path deviation for each trajectory Result: We have got fuzziness of all trajectories using path deviation with the help of the class; /* This procedure has been worked for a train set and test set data both */ 1 read all trajectories from the dataset; 2 for i = 1 to the number of trajectories in increasing order do 3 apply trapezoidal membership function on path deviation and 4 separates into three classes (low velocity, medium velocity, and high velocity); 5 end The implemented path deviation has also been taken from a training set and applied to testing for generating the classes in the test set.That fuzziness (explained in algorithm 4) have shown in Figure 5. Algorithm 5 illustrates the calculation of the size of the moving objects to take as a parameter in and testing set.The selection of moving objects is shown in Figure 6.We have also implemented fuzziness on the velocity (explained in algorithm 6) and assigned those velocities into two levels illustrated in Figure 7 and Equation 3 where avgv, highv, and lowv are average speed high−velocity low speed, respectively.After implementing Fuzziness, we can easily detect an abnormality of an object of a particular region with the help of the SVM (Support Vector Machine) (Lin, Lin, & Weng, 2007) classifier.

eXPeRIMeNTAL ReSULTS
In this context, we have shown the results of the proposed detection technique of abnormality.Primarily, we have illustrated the data that is used for events.Then, we showed the outcomes.

DATASeTS
In our experiments, we have used the Queen Mary University of London junction dataset (QMUL) (Long, Kapoor, 2015).This dataset is having 360 × 288 image resolution.It also has 50 minutes duration of video and 166 trajectories.We have taken 112 trajectories as training data, and the other has testing data.We have also shown the overall movement patterns of the dataset in Fig. 8.

Results
We have applied a trapezoidal fuzzy membership function on region-wise velocity values to draw a diagram for understanding the low, medium, and high velocity depicted in figure 9.The estimated values on the QMUL junction dataset for generating the graph are below.
Trapezoidal fuzzy membership functions have also been used on path deviation to understand the low, medium, and high velocity of moving objects in Figure 5, and estimated values are given below.
We have extracted seven regions of entry points of all trajectories and 4 clusters of exit points of all courses using the DBSCAN algorithm.The results are shown in Figure 10.We also generated a heat map to analyze the region−wise trajectory benchmark with different colors.With this, we can  Now, we are shown in figures 12 and 13 on video images where the actual trajectories are drawn concerning the regions.We have trained that region−wise trajectory velocity with Support Vector Machine (SVM) [Hsu, &Lin, 2002 andLin, Lin, &Weng, 2007) to get a model through which we have tested other trajectories to detect the abnormalities.Here, region velocities and path deviation are features of the SVM.We have used radial basis function kernel and soft margin with no cross− validation.After testing, we have got 80.6994% abnormality among 473 region−velocities.We have also trained with path deviation with SVM getting 70.1493% accuracy on the testing set.We have combined the velocity, path deviation, and size.Then, we got 98.514% abnormality after adding all three parameters.Our method has outperformed both approaches [Loy, Xiang, Gong, 2008 andMondal, Roy, &Mandal, 2021).

FUTURe SCoPe AND CoNCLUSIoN
Understanding and analyzing random surveillance surroundings is an existing drawback worldwide.Therefore, it is essential to construct an eminent and competent artificial methodology to integrate with the consecutive changeable environment and combination of information.In this paper, we have proposed a detection technique for abnormalities from moving video objects.Here, we have only used the primary fuzzy method to detect the anomalies of moving objects using velocity, path deviation, and size of the moving things.
We also demonstrated as part of the evaluation that our framework is adaptable and can be customized to the properties of the sequences, if these are known a priori, in order to enhance performance.By utilizing this adaptability, our future work aims to improve the detection accuracy of our framework.Specifically, we will think about how to optimize our framework's parameters given a specific combination of environmental factors that were used to capture a sequence.
Our recent aim is to extend this method by collaborating with convolution neural networks or Long-Term Short-Term Memory (LSTM) which will show exact alarm activation for all regions of all trajectories.

Algorithm 1 :
divide the non-overlapping region Result: we have got non-overlapping region; /* This procedure has been worked for only train set */ 1 read all trajectories from training set and extracted image from video; 2 get number of trajectories in the training data set; 3 get image with and height; 4 for i = 1 to number of trajectories in increasing order do 5 get each trajectory size; 6 Δw = imagewidth / (each trajectory size); /* Δw means each non-overlapping region width */ 7 Δh = imageheight / (each trajectory size); /* Δh means each non-overlapping region height */ 8

FigureFigure 3 .
Figure 1.Training phase calculate fuzziness of the Size of the moving objects Result: We have got fuzziness of all objects using size; /* This procedure has been worked for a train set and test set data both */ 1 read all moving objects are involved from video surveillance; 2 for getting all the moving objects from the video do 3 apply the Lukas−Kenedy algorithm for calculating the size of the all moving objects 4 end Algorithm 6: calculate region-wise fuzziness of velocity for each trajectory and generate the heat map Result: We have got fuzziness of all trajectories using velocity values with the help of the class; /* This procedure has been worked for a train set and test set data both */

Figure 4 .Figure 5 .
Figure 4. Explanation of obtaining the average velocity of all trajectories for a particular region

Figure 6 .
Figure 6.Size of some moving objects

Figure 8 .
Figure 8. Fifty minutes cumulative sample of motion in QMUL junction video

Figure 9 .
Figure 9.After applying trapezoidal member function on (a) training set and (b) testing set for velocity