# A Road Behavior Pattern-Detection Model in Queretaro City Streets by the Use of Shape Descriptors
## 1 Introduction
### Theoretical Background  
Traffic image processing has attracted the attention of researchers in the recent past who have tried to use indirect methods for flow monitoring and behavioral analysis [28]. These approaches include non-invasive methods by computer vision [29], instrumentation using road pressure sensors, and the use of radar, to name the most commonly used [30], for pattern recognition, signal processing, communication, embedded computing, and image sensing, as well as object identification, multi-camera activity analyses and cooperative video surveillance with active and static cameras [10; 31]. However, the amount of information generated by the geographical dispersion of sensors and the lack of computer and algorithmic infrastructures cause a lack of reliable and efficient criteria for decision-making.  
The concept of causality, first formulated by [PERSON] [32] and [PERSON] [33], has become a cornerstone theory in the analysis of dynamic relationships between variables.  
This theory, which is used to determine the unidirectional, bidirectional, or independent causal relationship in terms of temporal precedence between two time series \(\{X,\ Y\}\), has practical applications in traffic analysis. It is a statistical test based on the concept of cross-prediction [34], which can be used to forecast traffic patterns based on historical data, thereby aiding in traffic management and planning.  
A binary digital image is a two-dimensional numerical matrix with two levels of gray hue at \(\{0,1\}\). In simpler terms, an image is a collection of connected dots, each representing an object in the picture [35]. From these dots, we can extract various features to describe the objects. These objects are sets of connected dots, or pixels, with a value of one [36, 37, 38, 39].  
On the other hand, the shape of objects is one of the most straightforward features to extract from a digital image [40], for which the basic contour-based and region-based methods are used [41]. The region-based method commonly implements moment descriptors, which include geometric moments, to name one. The contour-based method usually obtains the perimeter using methods based on the curvature of objects. The descriptors developed in different research range from basic simple shape descriptors such as perimeter, area, and circularity [42, 43] to invariant descriptors such as Hu moments [44], Fourier descriptors for contour recognition [45], Euler features [46] describing the structure of an image, and the Harris corner detector [47, 48] used to extract and infer features in an image. These descriptive features are invariant to image transformations, such as translations, rotations, scale changes, and projections, and robust to changing motion and illumination conditions [35].  
Granger causality [49] is a statistical concept of causality based on prediction given two stochastic signals or variables, \(X_{t}\) and \(Y_{t}\). In this concept, \(X_{t}\) (Granger) causes a variable \(Y_{t}\). The previous values of \(X_{t}\) must contain information that helps predict \(Y_{t}\) over and above the information contained in the previous values of \(Y_{t}\) alone and vice versa. Its mathematical formulation is based on linear regression modeling of stochastic processes [33].