# Dynamic Queries through Augmented Reality for Intelligent Video Systems
## 2 Methodology
### Detection of Movement Dynamics  
In the literature, several works have proposed different methodologies and tools to automatically or semi-automatically detect information of interest such as contours, trajectories, and characteristic extraction to represent objects of interest or abnormal behavior. For example, [PERSON] et al. [32] proposed an unsupervised approach to detect the atypical behaviors of vehicles at intersections; in [16], the movement of vehicles was encoded as a set of finite states generating hierarchical rules that are associated with normal behaviors in a scenario; in [39], the authors described the basic methods for motion detection and object tracking in video systems in addition to describing the steps required to carry out this process. There are three steps for this: the detection of the object of interest (people, vehicles, birds, etc. ), classification, and the tracking of the object. For object detection, the methods that are most frequently used in the literature are mentioned: image difference, background subtraction, and optical flow. In distributed monitoring systems, it is common for each camera to have a particular method applied; this is identified as a \(M_{i}\) model, which helps to interpret the dynamics in specific scenarios. Each \(M_{i}\) model generates historical information \(H_{i}=\{h_{1},h_{2},\ldots\}\); however, for a couple of models \(M_{i}\), \(M_{j}\), for an instant in time \(t\), it is known that \(h_{i}^{i}\
eq h_{i}^{l}\). This means that the information is not comparable; therefore, searches or data queries require that an \(M_{i}\) model contain a \(T_{i}\) transformation. This transformation is defined as \(dom(H_{i})\leftrightarrow E\). This work aims to show the feedback of the heterogeneous historical information stored in a data repository that was generated from a distributed camera system by applying different motion detection methods. Motion dynamics detection aims to represent objects of interest with a set of pixels on a sequence of images [59]. Table 2 shows some of the models widely used in the literature for detecting the movement dynamics of objects of interest [39,60]. It is known that, by applying an \(M_{i}\) model to the information provided by a camera, results can be obtained that allow feedback on what has happened or is happening in a specific scenario. Based on this idea, by combining the results of different \(M_{i}\) models, the information can be complemented to better interpret the dynamics generated by the objects of interest. The latter can only be achieved if a way is defined to homogenize the information from different models. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Model of Detection** & **Detected Movement** & **Description** \\ \hline Temporal differences & \(|l_{n}(x)-l_{n-1}(x)|>T\) & The moving object is determined by calculating the difference between two consecutive images. \\ \hline Image average & \(\varepsilon=\sum_{x}[F(xA+h)-(\alpha G(x)+\beta)]^{2}\) & The moving object is determined by calculating the addition of images in every frame and dividing by the total number of images added. \\ \hline Optical flow & \(l_{m\times n}=(l_{1}+l_{2}+\ldots+l_{n})/n\) & Optical flow is to calculate the optical flow field of the image and perform clustering processing according to the optical flow distribution characteristics of the image. \\ \hline Gaussian of mixture & \(l(x,t)=\sum_{i=1}^{k}G_{i}(\mu_{i},\sigma_{i})\) & This method is used when there are multi-modal backgrounds. This method proposes modeling each pixel as a mixture of multiple Gaussians. \\ \hline Background model & \(|l_{l}(x,y)-B_{l}(x,y)|>T\) & This method compares a sequence of images with a reference image containing static elements; the reference image is called a background image. \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Models of detection of movement.