2.1.2. Perceptual Layer

The perceptual layer is the lowest-level layer of the proposed architecture. It contains the set of basic low-cost processing sensors that will be deployed in the physical environment to perform the image capture. In this layer, these sensors are not aware of the existence of the rest of the sensors. In other words, each sensor is independent of the others and its responsibility is limited to taking pictures at a certain physical point, sending them to the upper-level layer, and, periodically, notifying they are working properly. Since the sensor design represents a major component of the proposed architecture, a detailed description of its main characteristics is done in Section 2.2.

#### 2.1.3. Smart Management Layer

The smart managemen<sup>t</sup> layer provides the functionality needed to (i) facilitate the deployment of low-cost sensor networks and the execution of experiments, (ii) process the images captured by the perceptual layer sensors, performing automatic license plate detection, and (iii) persistently store all the information associated with an experiment for further forensic analysis.

This layer of the architecture follows a Platform-as-a-Service (PaaS) model, i.e., using the infrastructure deployed in the cloud, which provides the computational needs of the tra ffic analysis system. This approach makes it possible to o ffer a scalable solution that responds to the demands of the automatic license plate detection system, avoiding the complexity that would be introduced by deploying our own servers to provide functional support.

Particularly, "Google App Engine" [37] has been used as a functional support for the system's server, using the Python language to develop the di fferent components of the system and the Flask web application framework to handle web requests. The information retrieval with respect to the sensors of the perceptual layer is materialized through web requests, so that these can ask for the initial configuration of a sensor, or send information, as the so-called "control packages", as the state of a tra ffic analysis experiment evolves.

In this context, the control package concept stands out as the basic unit of information to be handled by the smart managemen<sup>t</sup> layer. The control package is composed of the following fields:


There are three di fferent modules in this layer, which are detailed next:


It is important to note that the processing module offers two modes of operation: (i) online and (ii) offline. In the online mode, the processing module carries out an online analysis of the images obtained from the perceptual layer, parallelizing the requests received by them to provide results in an adequate time. In contrast, the offline mode of operation is designed to analyze large sets of images associated with the past execution of a traffic analysis experiment.

#### 2.1.4. Online Monitoring Layer

The general objective of this layer is to facilitate the monitoring, in real time, of the evolution of a traffic analysis experiment. In order to facilitate the use of the system and avoid the installation of software by the user, the interaction through this layer is made by means of a web browser. From a high level point of view, the online monitoring layer offers the following functionality:


In both cases, the information represented in this layer, through a web browser, is obtained by making queries to the layer of the immediately lower level, that is, the smart managemen<sup>t</sup> layer. The latter, in turn, will obtain the information from the perceptual layer, where the sensors deployed in the physical scenario are located.

**Figure 3.** Visualization obtained from one of the sensors. (To protect personal data, the first three digits of the license plate have been blurred.)
