## 3 Related Works
The proposed system first applies background subtraction to obtain a binary image, which is used to determine which pixels belong to the bottom and to the front of the area that has movement. After that, morphological operations (e.g., erosion, dilatation, opening, and closure) were applied to eliminate noise and also small, isolated areas that exhibit minimal movement. The resulting image is sent to a stage of detection and classification of blobs, which detects contiguous pixels and calculates its bounding box. Bounding boxes that do not meet certain criteria (e.g., wide-high ratio and area) are discarded and those that potentially contain people are identified. [PERSON] et al. [21] addressed the problem of detecting and tracking people in very dense crowds. Specific problems arise in this scenario, such as occlusion and change of shape and location of people, which pose big challenges for detection. The proposed approach is based on detecting heads, in order to mitigate occlusion problems when detecting the whole body. Background subtraction and segmentation techniques are not useful in this type of scenario, because they cannot isolate people. [PERSON] et al. applied an object detector, trained to detect human heads, and density estimation algorithms, which provide information about the number of persons within a region (but not their locations). The detector was applied to all regions of the image, generating a map that contains scores that indicate the possible presence of people. The map of scores was combined with data obtained by the density estimation algorithms to obtain accurate detection results. [PERSON] et al. [22] analyzed the best approaches for people detection. A set of evaluations were performed for varying scenarios and data sets, studying the performance and limitations of different approaches. Authors concluded that people detectors are far from perfection, even under the most favorable conditions. Significant performance degradation was detected when working with images of people whose area is below 30 pixels or when occlusion is greater than 35%. Several areas were identified to improve people detection, including dealing with images between 30 and 80 pixels, \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Method** & **Speed** & **Memory** & **Accuracy** \\ \hline Running Gaussian Average & O (1) & O (1) & L/M \\ \hline Temporal Median Filter & O (\(n_{s}\)) & O (\(n_{s}\)) & L/M \\ \hline Mixture of Gaussians & O (\(m\)) & O (\(m\)) & H \\ \hline Kernel Density Estimation & O (\(n\)) & O (\(n\)) & H \\ \hline Sequential Kernel Density Approximation & O (\(m+1\)) & O (\(m\)) & M/H \\ \hline Concurrence of Image Variations & O (\(8n/N^{2}\)) & O (\(8 nK/8N^{2}\)) & M \\ \hline Eigen-backgrounds & O (\(M\)) & O (\(n\)) & M \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Performance of the background subtraction methods (adapted from the work of [PERSON] [16]). improving performance against occlusions, using movement patterns, and using temporary and context information together with monitoring information. [PERSON] et al. [23] studied the problem of detecting subtle behavior anomalies in surveillance videos. A decision-making process was presented, taking into account _social signals_, i.e., information about the scenario and social context. Social context is based on the premise that two individuals who share a high degree of information in their trajectories (direction, speed, proximity, and trajectory overlap) have similarities and a'social dependency'. Four scenarios were considered: traffic, with a high number of trajectories; idle, with stationary trajectories; convergence and divergence, with separate or join trajectories; and general, not classifiable in the previous ones. Pedestrian detection [24] and a follow-up Tracking-Learning-Detection method [25] were applied. The process was focused on detecting human heads to reduce the problems generated by the occlusion. Experiments were performed on data from PETS 2007 and Oxford datasets.