# Dynamic Queries through Augmented Reality for Intelligent Video Systems
## 2 Methodology
### Common Global Space  
A common global space can be defined as where information becomes homogeneous, thus allowing for comparison and manipulation. Different ways through which to obtain equivalences exist in artificial vision systems with different workspaces. To obtain equivalences of the information provided by different cameras, a process that can be divided into two aspects must be generated. The first is through a calibration process where the intrinsic and extrinsic parameters of the cameras are considered; this also requires a pattern, or elements within the scenario, that allows for characteristics to be extracted, the same ones from which, by applying a transformation, equivalences are obtained between the information obtained by the cameras expressed in pixels and the real-world information commonly expressed in millimeters or centimeters. The second is to obtain equivalences without a calibration process. A linear transformation is applied through homography, which is based on the information extracted from the scenario that can be taken from active or passive marks. In this work, it is necessary to define the global space and its units of measurement to create a unified space. The global space becomes defined in a global position and local orientation. The global position is given by the UTM coordinates of the building. The center of the building represents the origin. The UTM ID is then used to store the information in DB. Each camera becomes linked to this origin by the projection of a local homograph. As a linear transformation, the homograph becomes constructed by active color markers in the scenario. These markers are associated with all cameras used, and the colors are used to orientate the camera direction in the scenario. Then, all camera positions are indexed and stored relative to the origin. The global space is expressed with two-dimensional coordinates. The transformation is carried out using the information obtained by each camera, which contains all the  
Figure 1: Trajectories obtained by each camera. Red dots represent movement dynamics, and colorful blocks represent matching areas. information expressed in centimeters to make queries that can provide feedback through visualizations in augmented reality in the real world. To obtain the equivalences between the 2D or 3D coordinates of two different spaces [63], a linear projective transformation is estimated using homography on a homogeneous vector of \(3\times 1\), which is represented by a non-singular matrix of \(3\times 3\). \[ \begin{pmatrix}x_{j}^{{}^{\prime}}\\ x_{j}^{{}^{\prime}}\\ x_{3}^{{}^{\prime}}\end{pmatrix} = \begin{bmatrix}h_{11}&h_{12}&h_{13}\\ h_{21}&h_{22}&h_{23}\\ h_{31}&h_{32}&h_{33}\end{bmatrix} \times \begin{pmatrix}x_{1}\\ x_{2}\\ x_{3}^{{}^{\prime}}\end{pmatrix} . \tag{1}\]  
In other words \(x^{{}^{\prime}}=Hx\). To map the spaces generated by each camera to the common global space, several common points, which were defined as active marks, were installed (rectangles: red, yellow, green, and blue), as shown in Figure 2.  
A representation of the distributed system and the common points is shown in Figure 3, where the colorful blocks represent the active marks called points of interest. The centroid of each mark indicates the four reference coordinates for the transformation from each of the spaces generated by each camera to the global space, which is physically defined in the real world by measuring from one point to another, thus establishing the coordinates \((0,0)\) at the centroid of the blue rectangle. The other physical measurements are shown through an image in Figure 4; each physical measurement is expressed in centimeters. Figure 3: Active marks—points of interest. Colorful blocks represent the marks shown in Figure 2.  
Figure 2: The perspective of each camera. Colorful blocks are reference marks necessary for the construction of the global space. A segmentation is carried out within the images obtained in each perspective to obtain the information used in the process of applying homography.