# Dynamic Queries through Augmented Reality for Intelligent Video Systems
## 7 Results  
The work was designed for application to any metric that can compare vectors of different lengths, such as those found in [66; 67; 68; 69; 70; 27]. To prove the validity of the proposed metric, tests were first carried out with the trajectories being generated through a code developed in MATLAB; the trajectories were mapped to the global space such that the coordinates could be expressed in millimeters. The objective was to make a comparison with a widely used metric to compare data of different lengths, such as the Hausdorff distance [71]. Figure 13 shows the two trajectories to be compared. The process was carried out by applying the proposed metric where an orthogonal analysis was carried out for each trajectory, as well as by dividing the information into its components, \"x\" and \"y\". Subsequently, the derivative was applied, as shown in Figure 14. An adjustment of them was calculated by applying the least squares method, and Figure 15 summarizes the abovementioned process. Finally, the proposed metric and the Hausdorff distance were applied, and a notable difference in the results was obtained. Figure 16 shows the two trajectories to be compared. The third figure has two equal trajectories only out of phase in space, so it can show how the proposed metric works since it analyzes the dynamics of the data, which is why the value obtained should be equal to or very close to zero. Table 3 shows the results of each of the tests carried out by applying the same metrics. Figure 12: (**a**) Server: communication process. (**b**) Client: communication process. Figure 14: Process of the proposed metric. Figure 13: Trajectories to compare. Figure 15: Breakdown of the proposed metric. Once the validation of the proposed metric has been reviewed by comparing it with one of the metrics used in the literature, its implementation is carried out through real-time query generation that is applied augmented reality. The reference trajectory generation was carried out on the tablet gadget so that it could be sent to the central unit where a metric was applied and the results were displayed. Figure 11 shows an example of elaborating a reference trajectory in the augmented reality application. A spatial metric tolerant to trajectories of different lengths was applied first to obtain results and to compare them with the proposed metric. As mentioned before, the Hausdorff distance metric was used. Figure 17 presents the results when applying this metric, and it shows a three-dimensional space that exemplifies the trajectories seen through augmented reality, where each one of them can be shown in an orderly manner starting with the one most similar to the reference followed by a less similar one (performed according to the similarity results obtained with the metric used). The user generates the blue color trajectory, which is the reference trajectory. Based on the results and the study of the Hausdorff distance, it can be seen that, with a spatial metric, the results are trajectories closer to the reference user generated. Figure 16: Example trajectories to compare. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Trajectories** & **Proposed Metric** & **Hausdorff** \\ \hline Trajectories in Figure 13 & 118.12 units & 8.80 units \\ \hline Trajectories in Figure 16, first & 10.00 units & 20 units \\ \hline Trajectories in Figure 16, second & 19.14 units & 0 units \\ \hline Trajectories in Figure 16, third & \(5.6843\times 10^{-12}\) units & 10 units \\ \hline Trajectories in Figure 16, fourth & 27.64 units & 10 units \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Results of the comparative proposed metric vs. the Hausdorff. The proposed metric differs from the metrics that are currently better known and used in the literature because it analyzes the trajectory dynamics.