# Dynamic Queries through Augmented Reality for Intelligent Video Systems
## 6 Augmented Reality for Querying and Visualization Data  
Augmented reality systems have shown a novel way through which to visualize information, allowing for direct interaction between the real world and virtual elements that can be added to enrich the information contained in a scenario. The importance of using feedback through augmented reality in this work consists of generating queries and visualizing information in real-time to obtain a different analysis and interpretation by being present directly in the scenario where the trajectories of the objects of interest were raised. In this work, the results obtained in the queryings were displayed via augmented reality through a client-server model. This model consists of a device (client) that helps to generate reference trajectories in the scenario where information on movement dynamics was previously acquired; these reference trajectories are sent and processed in a central unit (server) that returns the results for display to the device. An application developed in Unity3D was installed on the device, which is designed to work in the global space that is generated where the trajectories of moving objects are mapped. Figure 10 shows roughly how the application works. First, the reference trajectory was created in the unified space, as shown in Figure 11, and then the trajectory information was sent to a central unit (server) that contains the trajectory data repository. In the same central unit, all the processing was carried out to calculate the similarities between the trajectories stored in the data repository, and the resulting information was then sent back to the application for viewing. Figure 9: Representation graphics of the proposed metric. The communication between the developed application and the central unit was carried out by employing the TCP/IP protocol. The reference trajectory was encoded in a string message that traveled to the central unit; it was decoded for use in comparison with the trajectories stored in the data repository, and the ordering was performed according to the metric used. The five most similar trajectories to the reference were selected, encoded again in a message type \(string\), then they traveled back to the application where they were decoded again for use, and then the results were displayed in augmented reality, as seen in Figure 12a,b. For the performance of the augmented reality application, the following points can be commented on:  
1. Communication: The complete system is provided by Ethernet communication. The video cameras are Ethernet interfaces. The communication is achieved via a 1 Mbps camera streaming. The Ethernet infrastructure becomes a 1 Gb Ethernet VPN. Simultaneously, we process two cameras, which, in peak situations, give around 20 Mbs sustained in continuous streaming. 2. Computation of data for storage: The backend server aims to execute the tracking algorithm and store it in the global reference space. The transformation in a global reference space becomes complex because the cameras become fixed, and the projection is based on the active markers in the scenario. Once the camera computes the matrix projection, it becomes fixed until the camera position or orientation changes. Figure 11: Process of creation of the reference trajectory—result visualization. Blue dots represent the construction of the reference trajectory created by the user. The QR code is the active mark necessary for the augmented reality application. Figure 10: Breakdown of the creation of the reference trajectory—result visualization. 3. Computation of data for querying: This process involves the client (personal gadget) and requires sampling in a field of view of the orientation into the scene. A client app captures the trajectory for querying after locating the active markers. Projection markers are commutated to transform into active markers and global reference space. This operation is performed once after capturing the trajectory to be consulted as a reference. 4.