Next Article in Journal
Recent Trends of Authentication Methods in Extended Reality: A Survey
Next Article in Special Issue
Coopetition with the Industrial IoT: A Service-Dominant Logic Approach
Previous Article in Journal
Numerical Simulation and Development of a Continuous Microwave-Assisted Pilot Plant for Shelled Almond Processing
Previous Article in Special Issue
Industry 4.0 and Smart Systems in Manufacturing: Guidelines for the Implementation of a Smart Statistical Process Control
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Road Behavior Pattern-Detection Model in Querétaro City Streets by the Use of Shape Descriptors

by
Antonio Trejo-Morales
* and
Hugo Jimenez-Hernandez
*
Facultad de Informática, Universidad Autónoma de Querétaro, Av. de las Ciencias S/N, Juriquilla 76230, Querétaro, Mexico
*
Authors to whom correspondence should be addressed.
Appl. Syst. Innov. 2024, 7(3), 44; https://doi.org/10.3390/asi7030044
Submission received: 25 February 2024 / Revised: 20 May 2024 / Accepted: 23 May 2024 / Published: 27 May 2024
(This article belongs to the Special Issue New Challenges of Innovation, Sustainability, Resilience in X.0 Era)

Abstract

:
In this research, a proposed model aims to automatically identify patterns of spatial and temporal behavior of moving objects in video sequences. The moving objects are analyzed and characterized based on their shape and observable attributes in displacement. To quantify the moving objects over time and form a homogeneous database, a set of shape descriptors is introduced. Geometric measurements of shape, contrast, and connectedness are used to represent each moving object. The proposal uses Granger’s theory to find causal relationships from the history of each moving object stored in a database. The model is tested in two scenarios; the first is a public database, and the second scenario uses a proprietary database from a real scenario. The results show an average accuracy value of 78% in the detection of atypical behaviors in positive and negative dependence relationships.

1. Introduction

The rapid growth of urban areas has led to the development of equipment that measures and analyzes information to make day-to-day decisions. This equipment and infrastructure are known as smart cities and require reliable communication and interoperability between technologies. The infrastructure measures urban variables and analyzes data to develop efficient, reliable, adaptable, and robust algorithms capable of identifying events and atypical behaviors of interest. This information is stored in a database using camera technologies, and historical trends can be analyzed over time. These data are useful for decision-making on events and generating video analytics on the activity of an area.
The increase in population density and the growth in vehicle use have led to a decrease in the standard of living for inhabitants due to the saturation of communication, transportation, and telecommunication routes. This has resulted in road congestion, making road monitoring systems more in demand. However, existing monitoring systems have general drawbacks that need to be addressed:
  • Human operators are required to monitor day-to-day activities.
  • Human intervention is required to locate the same object if multiple cameras are used.
The physical infrastructure of roads is sufficient for the collection of information on traffic flow and speed. However, since this method is invasive, it requires frequent maintenance to ensure proper functionality. Additionally, the presence of monitoring equipment may cause drivers to alter their driving behaviors [1]. To address this issue, a model based on Granger causal patterns can be used to efficiently monitor roadways and detect abnormal behaviors. A distributed monitoring system that utilizes conventional camera technology is chosen to identify the behavior of moving objects and situations of interest. This model can help identify periodic behaviors in traffic patterns and analyze the relationships between them. Currently, a monitoring system consists of cameras that capture and store data in a database. These data include information such as the number of objects, their trajectories, size, color, and flow.
This article is divided into several sections. In Section 1.1, we provide information about the related work. In Section 2, we describe the materials and methods used in characterizing the behavior of the study scenario. In Section 3, we present the results. Section 4 concludes the article by discussing the model. In Section 5, we present the conclusion. Finally, we list the references that support this work.

1.1. Related Work

Smart cities are a new and growing concept that has attracted the interest of researchers, city authorities, and governments [2]. This offers a wide range of possibilities for research and industrial opportunities.
The issue of urban freight transport is not a new problem. Betanzo-Quezada and his team [3] carried out research on this topic in the Mexican city of Querétaro from 2003 to 2014. Their methodological approach included a multi-year research effort to create analytical tools, evaluation methods, and vehicle size categorization. They concluded that it is important to strengthen research on land use, economic trends, and freight activity characteristics. A similar study, focused on modeling and micro-simulation approaches to several loading/unloading bays, can be found in the references [4].
Trencher [5] conducted a study that provided evidence of how intelligence can be used to address social challenges [6]. The research examined the Aizuwakamatsu Smart City in Fukushima, Japan, to demonstrate how a smart city can be designed and implemented to meet the needs of its residents. The author suggests that social objectives should be formulated in response to social challenges and citizen needs, and that this is related to the development of apps and people-centered information communication technologies.
Wang et al. [7] presented data on the processing of traffic digital twins in smart cities using edge intelligent federation learning. This work utilized deep learning and digital twins (DTs) in the development of smart cities [8]. Edge computing technology was employed to build an intelligent traffic perception system based on edge computing combined with DTs. According to their experimental results, the SSD-ResNet50 and the improved DarkNet-53 algorithm showed fast training speeds, high recognition accuracy, and favorable training effects.
In their study, Amen, Afara, and Nia [9] examined the relationship between the centrality of street layout and walkability in promoting sustainable tourism in historic urban areas. The authors focused on the Turkish part of Nicosia’s old city, which is known for its narrow, winding streets, ancient stone houses, and lively markets. The study used digital maps for data collection and analysis. The results showed that betweenness centrality has a greater impact on tourist distribution than closeness centrality. This is because tourists tend to visit places with high betweenness centrality more frequently.
In a research paper published by Husain, Maity, and Yadav [10], a survey was conducted on vehicle detection in intelligent transport systems under hazy environmental conditions [11]. The study used cameras to capture data from an intelligent transport system (ITS) and reviewed various features such as traffic flow density, average velocity, and total vehicles passing through a point in a specific range of time. The authors also explored different technologies for data analysis, including machine learning, genetic algorithms, and recurrent neural networks. They concluded that weather conditions, illumination variability, and dynamic background scenes could affect the results of the detection algorithm [12].
In a research paper by Selvi and Amudha [13], they presented an automatic video surveillance system for pedestrian crossing using digital image processing [14]. The authors used a zebra crossing detection system to operate an intelligent vehicle and a self-similarity recognition method that yielded a 98.5% accuracy. The results suggest that this application can be used to track objects.
In the current era, computer vision research lines mention several approaches for vehicle classification and detection [15]. Thirumarai and Amudha [13] proposed a novel video surveillance technique with an image segmentation algorithm to track moving objects in a crosswalk of a road. They also applied several morphological filtering operations that improved the segmentation quality of moving objects in the video.
Shantaiya et al. [16] presented a multiclass image-based classification of vehicles using soft computing algorithms such as artificial neural network decision trees and support vector machines [17]. Gu et al. [18] proposed an online video object segmentation through boundary-constrained low-rank sparse representation. Their algorithm is based on a classical image partitioning algorithm (Graphcut, minimum of maximum current cut) [19].
Rawassizadeh et al. [20] developed a library of three algorithms for event detection in temporal spaces, clustering based on mobile contextual data, and identification of contrastive events within a cluster. Xiangyu et al. [21] developed a model that can produce automatic label assignments in images using label propagation. Their model is based on the theoretical foundation of the Bayesian conditional random field (BCRF) model.
Zambrano Martinez et al. [22] proposed an equation to model and characterize flow times in terms of vehicle load concerning travel time during peak traffic hours in urban environments.
Cities around the world are growing rapidly, but often in an uncontrolled way. This causes a negative impact on the quality of life, safety, and overall well-being of the population. Congestion and saturation of streets lead to car accidents, unplanned public investment costs, and general dissatisfaction among the people. Therefore, it is essential to measure urban variables accurately and develop efficient, reliable, adaptable, and robust algorithms to solve these problems. By analyzing typical road behaviors and unexpected events, we can propose a solution that can improve the situation. In this regard, researchers have applied causality techniques in various studies, such as Asuma-du-Sarkodie and Owusu [23], who implemented a research study in Kenya to examine the multivariate causality of carbon dioxide emissions [24,25]. They used a World Bank dataset spanning from the year 1961 to 2011 and the autoregressive distributed lag (ARDL) model for cointegration analysis [26]. On the other hand, Barnett and Seth [27] created a new method for Wiener–Granger causality inference, which avoids the explicit estimation of the standard Wiener–Granger causality model. This eliminates estimation errors and improves statistical power, while also facilitating fast and accurate estimation of the computationally cumbersome case of conditional Wiener–Granger causality in the frequency domain.
Currently, cities are growing in an undue way, thus affecting the quality of life and welfare of the population. The above is mainly due to the saturation and congestion of the streets, which results in car accidents, unplanned public investment costs, and generalized social dissatisfaction. In that sense, the measurement of urban variables, as well as the analysis and development of efficient, reliable, adaptable, and robust algorithms, becomes essential to developing a solution. The solution can be proposed in terms of data analyses of typical road behaviors and unexpected events.

1.2. Theorical 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 Wiener [32] and Granger [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   a n d   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].

2. Materials and Methods

The process described in Figure 1 involved the use of various materials (refer to Table 1). It began with a scenario composed of a sequence of images that were analyzed by a background model. This model helps to detect objects, enabling the application of geometric descriptors to extract characteristic features of moving objects. Feature extraction was carried out during offline periods of a week, specifically in the selected streets. The information obtained from this process was then used to generate a time series. Trajectories were grouped based on the number of detected objects, and causality analysis techniques were applied to characterize the behavior of the road scenario. The correlation matrix obtained in the causality analysis was then used to create an external dependence model using graphs.

2.1. Scenery

The scenery is a planned monitoring scheme that employed three professional dome cameras from PTZ VIVOTEK, model SD9364-EHL. These cameras have real-time compression in formats H.265, H.264, and MJPEG (triple codec), a 30× zoom lens, a wide temperature range (−50~55 °C) for extreme weather conditions, and a vandal-resistant enclosure with NEMA 4X. In addition, an Alienware Aurora Dell-branded computer with a Linux Ubuntu 18.04.6 LTS operating system and Core i7-9700K with a 3.6 GHz to 4.9 GHz processor. The above is to capture and analyze data for this work. This is a technological resource used to identify the behavior of moving objects (vehicles). Thus, identifying situations of interest is employed to model and find an optimal representation of the object’s movement. Figure 2 shows the camera positioning along the Paseo de la Constitución Avenue, Querétaro city in México.

2.2. Features Extraction

The feature extraction ( T , geometric measurements) was determined from the information related to the moving objects and the fixed objects. Thus, each particular position of the pixels in the image is x = x 1 , y 1 and is indexed as I i ( x ) for the dimensions of the images k × l . To characterize the behavior dataset, methods provided by the following references [50,51] were employed. Then, the geometric measurement extraction algorithm worked from a sequence of images expressed as I 0 , , I n . The extraction pseudocode is shown in Algorithm 1, and its purpose is to generate a dataset.
Algorithm 1. Pseudocode employed for geometric feature extraction.
Input Image   sequence   I t
Output Geometric   measurements   T
set intensity criterion;
set radius of the structuring object;
set connectivity pixel;
while has a sequence  I t  then
        get image(i);
        set image(i) to grayscale;
        set image(i) to normalize;
        set background model;
        set pixel intensity criterion;
        set morphological process;
        [L,n] = get moving objects;
        for each object found n then
             xy = get connected components;
             arx = calculate the area;
             per = calculate the perimeter;
             cxy = find the centroid in x,y;
             cir = calculate the circularity value;
             eul = find Euler’s number;
             std = calculate the standard deviation in x,y;
             [m1,..., m7] = calculating Hu’s inv. moments;
             [n,coord,puntos] = detect Harris corners;
             save and insert to T dataset;
        end
        return T;
end

2.3. Time Series

To find time series, representative routes and trends on trajectories were identified. Thus, a histogram was built to represent and visually summarize the trajectory distribution of the objects. The data employed in the histogram construction were the measured frequency of the pixels (trajectories).

2.4. Causality Analysis

Clustering was used to identify representative routes and common trends of several trajectories. Then, graph clustering algorithms were employed to find subgraphs as representative routes or centroids. Then, the groups were formed according to the similarity of the trajectories to those centroids. After the clustering and correlation were performed, the k value procedure was performed to obtain graphical information for its calculation, thus distinguishing between trajectories by some non-obvious characteristic, such as the type of movement, mode of transportation, or activity.
The correlation was classified as follows:
If r = 1 : perfect positive correlation.
If 0 < r < 1 : it reflects that there is a positive correlation.
If r = 0 : in this case, there is no linear relationship.
If 1 < r < 0 : there is a negative correlation.

2.5. External Dependence Model

This model consists of finding the temporary relationships to build a graph where a relationship has a higher associated likelihood to be observed within a time interval. It means that, if a time series causes another, the knowledge of the first series could help to predict the future values of the other (after the influence of the other variables). Here, the main contribution is to find automatic relationships by using a simple camera. The above is obtained by following the model proposed in reference [33].

3. Results

A system is implemented where moving objects are analyzed and categorized (characterized) by the shape and attributes observable in the movement. A set of algorithms is introduced that help us quantify moving objects over time, and from the evidence (generated database) of the set of cameras, c i C , a state-based and probabilistic model is created that defines the main movement zones and finds the temporal patterns of behavior P I k , I l for I K , I L c i , which are related to the semantics of the scenario that is useful for analysis; the patterns are the result of associating through causal relationships. For example, determining the origin of the traffic at a certain time of day, the effects that an accident generates on a road artery and which ones will be affected, and changes or closures of roads due to events, parades, or demonstrations. Patterns are the result of associating through Granger causal relationships.

3.1. Scenery

The results of the data acquisition are described in this section. As mentioned in Section 2, such data belong to three cameras installed along the analyzed street. In that sense, the cameras are represented by c i C to form c i = { I 1 , , I n } and each I j is an attribute generated by an intelligent process on the image. From the image dataset of the study scenery, we proceeded with the detection of object motion. Then, the background model was calculated from the information of moving objects and stationary objects. Then, the background model was calculated from the information of moving objects and stationary objects (see Figure 3), where each particular pixel position in the image x = x 1 , y 1 is indexed as I i ( x ) for the k × l image dimensions.

3.2. Features Extraction

As shown in Table 1 in Section 2, 1,514,286 images were generated for the study scenery, as well as 36,000 frames that were obtained from the Texas Advanced Computing Center [50]. Finally, 1700 images were generated as another dataset [51], to validate the functionality of the algorithm in the feature extraction task (see Algorithm 1). Shape descriptors are implemented in the algorithm (see Table 2) for normal dynamic detection. As a result, we have a dataset that has different objects and for each object, different measurements (see Table 3), so that, if viewed in time, we observe objects with measurements that can be related to the time instant t 1 with the time instant t 2 . These characteristics allow objects to be represented by a set of numerical values; the characteristics obtained are invariant to scaling, rotation, and translation.

3.3. Time Series

The dataset generated by the algorithm allows us to find the temporal relation R I K , I L for I K , I L c i and, subsequently, with these data the associated graph for this relation can be constructed. Figure 4 represents the acquisition of frequency data versus the values of each trajectory of the objects captured by the cameras on the dataset mentioned in Table 3.

3.4. Causality Analysis

The following figures (see Figure 5 and Figure 6) show the result of applying the k-means clustering algorithm to the data set of the trajectories of the objects of each camera belonging to the experiment scenario. This grouping allows us to distinguish trajectories by some non-obvious characteristic, such as the type of movement, mode of transport, or activity carried out.
As the traffic dynamics are changing, the square correlation ( R ) “ n × n matrix” is used to find the correlations of the flow intensity, which in this case is through geometric measurements/characteristics (see Figure 7 and Figure 8). Based on Section 2.4, a correlation close to zero means no relationship, but high or maximum local correlations in their absolute values represent indications of a positive or negative relationship.

3.5. External Dependence Model

Based on the results of the correlation matrices, we proceed to illustrate a situation with a high correlation (see Figure 9), in this case using camera c 3 with the highest correlation, which represents this correlation at certain changes; thus, the dependency model is observed.
The present results seek to find distantly related states; therefore, below, the high positive and negative correlations that are not within the same chamber are shown (see Figure 10).
This means that this relationship shows, when a flow is observed from the first state, which state will be associated with it and will be affected by that change in the flow (see Table 4). Low probabilities simply mean that this dependence is not always visible; only when there are peaks, which in certain situations are when there are many vehicles, are these dependencies observed, which is why they are close to zero.
  • High positive correlations: if the correlation value is high and positive, it means that the direction of the flow of the vehicles is downward (they go down), that is, if there is flow in camera c 1 , proportionally there will also be flow in camera c 2 .
  • High negative correlations: negative values represent a flow change; if high, it means that the number of vehicles decreases (opposite flow).
Now, two distant cameras and two different states represent the cause–effect relationships that could occur within the avenue itself (all those that have a high positive correlation are identified). Therefore, by generalizing the concept of correlation because the avenue is connected and is being monitored by several cameras, we can find the temporal relationships of the flow dependence in terms of the measurements/characteristics used. The case (see Figure 11) that represents the maximum relationship between the state of camera c 2 and the other camera c 3 represents a cause–effect relationship in the behavior of the vehicles that are observed.
It is shown that the high probability of +0.85 indicates the dependence between two states that are not adjacent but are at a distance and a behavior is being observed and that behavior helps to infer that possible states are altered once the state of reference begins to change the dynamics of the vehicular flow. For example, the positive correlation of +0.85 in blue between the zero regions of camera c 2 and camera c 3 (see Figure 12) means that when the zero region of camera c 2 presents traffic or there are high increases in their geometric measurements of the objects (area and perimeter, see Figure 12d), proportionally there is also traffic or high increases in the zero region of camera c 3 . These patterns are the result of associating through causal relationships to say what the origin of traffic is at a certain time of day, the effects that an accident generates on a road artery and which ones will be affected, and changes or closures of roads due to events, parades, or demonstrations.

4. Discussion

In terms of application, this research showed that, by using feature extraction, it is possible to find the relationships between a set of urban variables (traffic, pedestrians, traffic light timing, and road obstructions, to name a few), measured by a fixed zone monitoring system, resulting in the generation of a stochastic causal model using graphs. The proposed model generates positive and negative dependence relationships with an average accuracy of 78%, which provides the information to interpret the cause–effect relationships and allows the detection of atypical behaviors, helping to better understand the dynamics of the monitoring scenario. Existing algorithms in the literature were implemented to detect the local behavior of objects in each camera. In conjunction, these results can be obtained by implementing the stochastic model on general-purpose electronic cards, which can be applied for inferences and modeling of periodic behaviors of scenarios in smart cities. The originality consists of finding the temporal and spatial dependencies between the behavior of a particular camera and the other adjacent cameras in the study scenario.

5. Conclusions

This research consisted of finding the time relationship R I K , I L for I K , I L c i , and constructing the associated graph for this relationship; the relationship R has associated with it a high probability P ( R ) of being observed for an interval t 0 t T . If one time series causes another, knowledge of the first process will help to predict the future values of the other after the influences of other variables have been taken into account. The fundamental contribution is to automatically find the R relationships using the evidence observed by a particular camera c i . Therefore, the method for finding R is to employ a graph-based causal model.

Author Contributions

Conceptualization, A.T.-M. and H.J.-H.; methodology, A.T.-M. and H.J.-H.; software, A.T.-M. and H.J.-H.; validation, A.T.-M. and H.J.-H.; formal analysis, A.T.-M. and H.J.-H.; investigation, A.T.-M.; resources, A.T.-M. and H.J.-H.; data curation, A.T.-M.; writing—original draft preparation, A.T.-M.; writing—review and editing, A.T.-M. and H.J.-H.; visualization, A.T.-M.; supervision, A.T.-M. and H.J.-H.; project administration, A.T.-M.; funding acquisition, A.T.-M. and H.J.-H. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data presented in this study are available at: https://github.com/trejoan1/patterndetectionmodel (accessed on 20 May 2024). The source code was typed in Python 3 using Jupyter Notebook.

Acknowledgments

Thanks to the UAQ Informatics faculty, CIDESI, and CONAHCYT for the facilities for the development of this work (materials used for experiments). The authors wish to thank the anonymous reviewers for their positive and valuable comments to improve and refine this work.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Vishwakarma, S.; Agrawal, A. A survey on activity recognition and behavior understanding in video surveillance. Vis. Comput. 2013, 29, 983–1009. [Google Scholar] [CrossRef]
  2. Camero, A.; Alba, E. Smart City and information technology: A review. Cities 2019, 93, 84–94. [Google Scholar] [CrossRef]
  3. Betanzo-Quezada, E.; Romero-Navarrete, J.A.; Obregón-Biosca, S.A. Researches on urban freight transport in the Mexican city of Queretaro: From central and peri-urban areas. J. Urban Environ. Eng. 2015, 9, 12–21. [Google Scholar] [CrossRef]
  4. Ochoa-Olán, J.D.J.; Betanzo-Quezada, E.; Romero-Navarrete, J.A. A modeling and micro-simulation approach to estimate the location, number and size of loading/unloading bays: A case study in the city of Querétaro, Mexico. Transp. Res. Interdiscip. Perspect. 2021, 10, 100400. [Google Scholar] [CrossRef]
  5. Trencher, G. Towards the smart city 2.0: Empirical evidence of using smartness as a tool for tackling social challenges. Technol. Forecast. Soc. Chang. 2019, 142, 117–128. [Google Scholar] [CrossRef]
  6. Haluza, D.; Jungwirth, D. Artificial Intelligence and Ten Societal Megatrends: An Exploratory Study Using GPT-3. Systems 2023, 11, 120. [Google Scholar] [CrossRef]
  7. Wang, W.; He, F.; Li, Y.; Tang, S.; Li, X.; Xia, J.; Lv, Z. Data information processing of traffic digital twins in smart cities using edge intelligent federation learning. Inf. Process. Manag. 2023, 60, 18. [Google Scholar] [CrossRef]
  8. Yang, B.; Lv, Z.; Wang, F. Digital Twins for Intelligent Green Buildings. Buildings 2022, 12, 856. [Google Scholar] [CrossRef]
  9. Amen, M.A.; Afara, A.; Nia, H.A. Exploring the Link between Street Layout Centrality and Walkability for Sustainable Tourism in Historical Urban Areas. Urban Sci. 2023, 7, 67. [Google Scholar] [CrossRef]
  10. Husain, A.A.; Maity, T.; Yadav, R.K. Vehicle detection in intelligent transport system under a hazy environment: A survey. IET Image Process. 2020, 14, 1–10. [Google Scholar] [CrossRef]
  11. Mohammed, A.S.; Amamou, A.; Ayevide, F.K.; Kelouwani, S.; Agbossou, K.; Zioui, N. The Perception System of Intelligent Ground Vehicles in All Weather Conditions: A Systematic Literature Review. Sensors 2020, 20, 6532. [Google Scholar] [CrossRef] [PubMed]
  12. Su, Y.; Chen, X.; Cang, C.; Li, F.; Rao, P. A Space Target Detection Method Based on Spatial–Temporal Local Registration in Complicated Backgrounds. Remote Sens. 2024, 16, 669. [Google Scholar] [CrossRef]
  13. Selvi, C.T.; Amudha, J. Automatic Video Surveillance System for Pedestrian Crossing Using Digital Image Processing. Indian J. Sci. Technol. 2019, 12, 1–6. [Google Scholar] [CrossRef]
  14. Hsia, S.-C.; Wang, S.-H.; Wei, C.-M.; Chang, C.-Y. Intelligent Object Tracking with an Automatic Image Zoom Algorithm for a Camera Sensing Surveillance System. Sensors 2022, 22, 8791. [Google Scholar] [CrossRef]
  15. Dilek, E.; Dener, M. Computer Vision Applications in Intelligent Transportation Systems: A Survey. Sensors 2023, 23, 2938. [Google Scholar] [CrossRef] [PubMed]
  16. Shantaiya, S.; Verma, K.; Mehta, K.K. Multiple class image-based vehicle classification using soft computing algorithms. Int. Arab J. Inf. Technol. 2016, 13, 835–841. [Google Scholar]
  17. Moghadam, K.Y.; Noori, M.; Silik, A.; Altabey, W.A. Damage Detection in Structures by Using Imbalanced Classification Algorithms. Mathematics 2024, 12, 432. [Google Scholar] [CrossRef]
  18. Gu, S.; Wang, L.; Hao, W.; Du, Y.; Wang, J.; Zhang, W. Online Video Object Segmentation via Boundary-Constrained Low-Rank Sparse Representation. IEEE Access 2019, 7, 53520–53533. [Google Scholar] [CrossRef]
  19. Wang, Z.; Lv, Y.; Wu, R.; Zhang, Y. Review of GrabCut in Image Processing. Mathematics 2023, 11, 1965. [Google Scholar] [CrossRef]
  20. Rawassizadeh, R.; Dobbins, C.; Akbari, M.; Pazzani, M. Indexing Multivariate Mobile Data through Spatio-Temporal Event Detection and Clustering. Sensors 2019, 19, 448. [Google Scholar] [CrossRef]
  21. Zhuo, X.; Fraundorfer, F.; Kurz, F.; Reinartz, P. Automatic Annotation of Airborne Images by Label Propagation Based on a Bayesian-CRF Model. Remote Sens. 2019, 11, 145. [Google Scholar] [CrossRef]
  22. Zambrano-Martinez, J.L.; Calafate, C.T.; Soler, D.; Cano, J.-C.; Manzoni, P. Modeling and Characterization of Traffic Flows in Urban Environments. Sensors 2018, 18, 2020. [Google Scholar] [CrossRef] [PubMed]
  23. Asumadu-Sarkodie, S.; Owusu, P.A. The Kenya Case of Multivariate Causality of Carbon Dioxide Emissions. Preprints 2016, 1–28. [Google Scholar] [CrossRef]
  24. Liang, X.S. Normalized Multivariate Time Series Causality Analysis and Causal Graph Reconstruction. Entropy 2021, 23, 679. [Google Scholar] [CrossRef]
  25. Siggiridou, E.; Koutlis, C.; Tsimpiris, A.; Kugiumtzis, D. Evaluation of Granger Causality Measures for Constructing Networks from Multivariate Time Series. Entropy 2019, 21, 1080. [Google Scholar] [CrossRef]
  26. Ahmad, M.S.; Szczepankiewicz, E.I.; Yonghong, D.; Ullah, F.; Ullah, I.; Loopesco, W.E. Does Chinese Foreign Direct Investment (FDI) Stimulate Economic Growth in Pakistan? An Application of the Autoregressive Distributed Lag (ARDL Bounds) Testing Approach. Energies 2022, 15, 2050. [Google Scholar] [CrossRef]
  27. Baarnett, L.; Seth, A. The MVGC Multivariate Granger Causality Toolbox: A New Approach to Granger-causal Inference. J. Neurosci. Methods 2013, 223, 50–68. [Google Scholar] [CrossRef] [PubMed]
  28. Emonet; Varadarajan, J.; Odobez, J.-M. Multi-camera open space human activity discovery for anomaly detection. In Proceedings of the 2011 8th IEEE International Conference on Advanced Video and Signal Based Surveillance (AVSS), Klagenfurt, Austria, 30 August–2 September 2011; pp. 218–223. [Google Scholar]
  29. Jiménez-Hernández, H.; González-Barbosa, J.-J.; Garcia-Ramírez, T. Detecting Abnormal Vehicular Dynamics at Intersections Based on an Unsupervised Learning Approach and a Stochastic Model. Sensors 2010, 10, 7576–7601. [Google Scholar] [CrossRef] [PubMed]
  30. Costanzo, A.; Faro, A. Towards an Open and Interoperable Platform for Real Time Decision Making in Intelligent Cities. In Proceedings of the 2012 Eighth International Conference on Signal-Image Technology & Internet-Based Systems (SITIS 2012), Naples, Italy, 28 November–1 December 2016; pp. 571–578. [Google Scholar]
  31. Wang, X. Intelligent multi-camera video surveillance: A review. Pattern Recognit. Lett. 2013, 34, 3–19. [Google Scholar] [CrossRef]
  32. Wiener, N. The theory of prediction. Modern Mathematics for the Engineer; McGraw-Hill: New York, NY, USA, 1956; pp. 165–190. [Google Scholar]
  33. Granger, C.W.J. Investigating Causal Relations by Econometric Models and Cross-spectral Methods. Econometrica 1969, 37, 424–438. [Google Scholar] [CrossRef]
  34. Deshpande, G.; LaConte, S.; James, G.A.; Peltier, S.; Hu, X. Multivariate Granger Causality Analysisof fMRI Data. Hum. Brain Mapp. 2009, 30, 1361–1373. [Google Scholar] [CrossRef] [PubMed]
  35. Sossa-Azuela, J.H.; Cuevas-Jiménez, E.B.; Zaldivar-Navarro, D. Alternative Way to Compute the Euler Number of a Binary Image. J. Appl. Res. Technol. 2011, 9, 335–341. [Google Scholar] [CrossRef]
  36. He, L.; Yao, B.; Zhao, X.; Yang, Y.; Shi, Z.; Kasuya, H.; Chao, Y. A fast algorithm for integrating connected-component labeling and euler number computation. J. Real-Time Image Process. 2018, 15, 709–723. [Google Scholar] [CrossRef]
  37. Diaz-De-Leon, S.; Sossa-Azulea, J.H. On the computation of the Euler number of a binary object. Pattern Recognit. 1996, 29, 471–476. [Google Scholar] [CrossRef]
  38. SZenzo, D.; Cinque, L.; Levialdi, S. Run-based algorithms for binary image analysis and processing. IEEE Trans. Pattern Anal. Mach. Intell. 1996, 18, 83–89. [Google Scholar]
  39. Dyer, C.R. Computing the Euler number of an image from its quadtree. Comput. Graph. Image Process. 1980, 13, 270–276. [Google Scholar] [CrossRef]
  40. Sampallo, G. Reconocimiento de Tipos de Hojas. Intel. Artif. Rev. Iberoam. Intel. Artif. 2003, 7, 55–62. [Google Scholar]
  41. Cervantes, J.; Taltempa, J.; García-Lamont, F.; Ruiz-Castilla, J.S.; Yee-Rendon, A.; Jalili, L.D. Análisis comparativo de las técnicsa utilizadas en un Sistema de Reconocimiento de Hojsa de Planta. Rev. Iberoam. De Intel. Artif. 2017, 14, 104–114. [Google Scholar]
  42. Herrera-Navarro, A.M.; Jiménez-Hernández, H.; Terol-Villalobos, I.R. Framework for characterizing circularity based on a probability distribution. Measurement 2013, 46, 4232–4243. [Google Scholar] [CrossRef]
  43. Herrera-Navarro, A.M.A.M.; Hernández, H.J.; Guerrero, F.M.; Terol-Villalobos, I.R.; Peregrina-Barreto, H. A New Measure of Circularity Based on Distribution of the Radius. Comput. Sist. 2013, 17, 515–526. [Google Scholar]
  44. Hu, M.-K. Visual pattern recognition by moment invariants. IEEE Trans. Inf. Theory 1962, 8, 179–187. [Google Scholar]
  45. Mei, Y.; Androutsos, D. Affine invariant shape descriptors: The ICA-Fourier descriptor and the PCA-Fourier descriptor. In Proceedings of the 2008 19th International Conference on Pattern Recognition (ICPR), Tampa, FL, USA, 8–11 December 2008; pp. 3614–3617. [Google Scholar]
  46. Yang, H.; Sengupta, S. Intelligent shape recognition for complex industrial tasks. IEEE Control. Syst. Mag. 1988, 8, 23–30. [Google Scholar] [CrossRef]
  47. Harris, C.; Sttephens, M. A combined Corner and Edge Detector. In Proceedings of the 4th Alvey Vision Conference, Manchester, UK, 31 August–2 September 1988; pp. 147–151. [Google Scholar]
  48. Moravec, H.P. Obstacle Avoidance and Navigation in the Real World by a Seeing Robot Rove; Stanford University: Pittsburgh, PA, USA, 1980. [Google Scholar]
  49. Lima, V.; Dellajustina, F.J.; Shimoura, R.O.; Girardi-Schappo, M.; Kamiji, N.L.; Pena, R.F.O.; Roque, A.C. Granger causality in the frequency domain: Derivation and applications. Rev. Bras. Ensino Física 2020, 42, e20200007-10. [Google Scholar] [CrossRef]
  50. Dubrow, A. Artificial Intelligence and Supercomputers to Help Alleviate Urban Traffic Problems; Texas Advanced Computing Center: Austin, TX, USA, 2017. [Google Scholar]
  51. Wang, Y.; Jodoin, P.-M.; Porikli, F.; Konrad, J.; Benezeth, Y.; Ishwar, P. CDnet 2014: An Expanded Change Detection Benchmark Dataset. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, Columbus, OH, USA, 23–28 June 2014; pp. 387–394. [Google Scholar]
Figure 1. Data acquisition methodology to be followed in the characterization of the behavior of the study scenery.
Figure 1. Data acquisition methodology to be followed in the characterization of the behavior of the study scenery.
Asi 07 00044 g001
Figure 2. Geographic location of inspection points.
Figure 2. Geographic location of inspection points.
Asi 07 00044 g002
Figure 3. Dataset generation and ground truth of the study scenery. Although, a change in image quality can be noted, all the data were acquired correctly: (a) dataset of 504,762 images obtained from camera c 3 ; (b) dataset of 504,762 images obtained from camera c 2 ; (c) dataset of 504,762 images obtained from camera c 1 . The above was recorded at an instant of time 0 t T for an image sequence I j 1 , , I j T .
Figure 3. Dataset generation and ground truth of the study scenery. Although, a change in image quality can be noted, all the data were acquired correctly: (a) dataset of 504,762 images obtained from camera c 3 ; (b) dataset of 504,762 images obtained from camera c 2 ; (c) dataset of 504,762 images obtained from camera c 1 . The above was recorded at an instant of time 0 t T for an image sequence I j 1 , , I j T .
Asi 07 00044 g003
Figure 4. Histogram of trajectories. In subsections: (a) the histogram, the x-axis is a numerical line that visualizes the range of values of trajectories in the images that have been divided into ranges of numbers or bins (nBins = 100, changing the number of bins allows to see more or less detail in the structure of the data). A bar is drawn for each bin where the width of the bar represents the number density range of the bin, and the height of the bar represents the number of trajectories included in that range; (bd) it can be seen that the most representative paths and the most common trends of the trajectories are concentrated in a range of values from approximately 30 to 110 sampling points.
Figure 4. Histogram of trajectories. In subsections: (a) the histogram, the x-axis is a numerical line that visualizes the range of values of trajectories in the images that have been divided into ranges of numbers or bins (nBins = 100, changing the number of bins allows to see more or less detail in the structure of the data). A bar is drawn for each bin where the width of the bar represents the number density range of the bin, and the height of the bar represents the number of trajectories included in that range; (bd) it can be seen that the most representative paths and the most common trends of the trajectories are concentrated in a range of values from approximately 30 to 110 sampling points.
Asi 07 00044 g004
Figure 5. Result of k-means clustering of object trajectories with elbow point value k = 5 , represented with different colors.
Figure 5. Result of k-means clustering of object trajectories with elbow point value k = 5 , represented with different colors.
Asi 07 00044 g005
Figure 6. View of the grouping of trajectories in the experimentation scenery.
Figure 6. View of the grouping of trajectories in the experimentation scenery.
Asi 07 00044 g006
Figure 7. Correlation coefficient of geometric characteristics in cameras c 1 ,   c 2 , a n d   c 3 .
Figure 7. Correlation coefficient of geometric characteristics in cameras c 1 ,   c 2 , a n d   c 3 .
Asi 07 00044 g007
Figure 8. Dendrogram of geometric characteristics in the cameras c 1 ,   c 2 , a n d   c 3 .
Figure 8. Dendrogram of geometric characteristics in the cameras c 1 ,   c 2 , a n d   c 3 .
Asi 07 00044 g008
Figure 9. Dependency model for a situation with high correlation in camera c 3 .
Figure 9. Dependency model for a situation with high correlation in camera c 3 .
Asi 07 00044 g009
Figure 10. Correlation coefficients between regions of each camera c 1 ,   c 2 , a n d   c 3 .
Figure 10. Correlation coefficients between regions of each camera c 1 ,   c 2 , a n d   c 3 .
Asi 07 00044 g010
Figure 11. Cause–effect relationship in distant cameras with different states: (a) objects that are just reaching the camera c 3 ; (b) moving objects and how they are seen on the camera c 2 .
Figure 11. Cause–effect relationship in distant cameras with different states: (a) objects that are just reaching the camera c 3 ; (b) moving objects and how they are seen on the camera c 2 .
Asi 07 00044 g011
Figure 12. The particular case of high positive correlation: (a) attributes that describe the correlation between two cameras; (b) illustration of regions between different cameras and their correlation; (c) experimental scenario showing the direction of flow and correlation; (d) trend graph of the geometric variables area and perimeter that reference to correlation behavior.
Figure 12. The particular case of high positive correlation: (a) attributes that describe the correlation between two cameras; (b) illustration of regions between different cameras and their correlation; (c) experimental scenario showing the direction of flow and correlation; (d) trend graph of the geometric variables area and perimeter that reference to correlation behavior.
Asi 07 00044 g012
Table 1. Description of materials used.
Table 1. Description of materials used.
NameDescriptionValue
Dataset TACC [50]Scenery: Lamar and 38th street.36,000 frames.
Dataset: CDnet [51]Scenery: Highway.1700 frames.
Dataset: study sceneryScenery: Av. Paseo de la Constitución, Querétaro, Qro., México.1,514,286 frames.
Lambda serverWorkstation with NVIDIA GPU, Ubuntu S.O.RTX4090, 16,384 CUDA.
PythonProgramming language.3.9.13 version.
Dome camerasThree dome cameras PTZ VIVOTEK.Model SD9364-EHL.
Table 2. List of geometric characteristics.
Table 2. List of geometric characteristics.
NameDescription
Object numberNumber of connected objects in the image.
AreaArea of objects, pixels of the area of objects in the image.
PerimeterPixels of the perimeter of the image objects.
CentroidIt is the geometric center of the body/point where the total area of a figure is considered to be concentrated.
Standard deviationA most common measure of dispersion that indicates how dispersed the data are concerning the mean.
Circularity [43]Percentage of circularity of objects.
Euler number [46]It is the total number of objects in the image minus the total number of holes in those connected objects.
Harris corners [47]It is used to extract certain types of features and infer the content of an image. A corner is the intersection of two edges and/or a point for which there are two dominant edge directions.
Hu moments [44]Set of seven invariant descriptors that quantify the shape of an object (centroid, area, and orientation)/[ordinary, centralized, and normalized].
Table 3. Overview of the structure of the study scenery dataset.
Table 3. Overview of the structure of the study scenery dataset.
OBJAREAPERIMETERXYSTDXSTDYCIREULERHARRISMHU1MHU2MHU3MHU4
16227.58969.80697.3232.95781.80870.80645120.202910.012380.002860.01120
23719.815132.5757.16202.23041.36450.86486120.189190.008080.000680.00725
16327.98669.82597.6672.92671.91770.7619120.209120.013000.002450.01360
22415.316132.557.51.74461.14210.83333120.194440.005250.000910.01108
.....
.....
.....
16227.58997.32397.3232.95781.80870.80645120.202910.012380.002860.01120
.....
.....
.....
16227.58969.80697.3232.95781.80870.80645120.202910.012380.002860.01120
Table 4. Interpretation of results of correlation coefficients between camera regions c 1 ,   c 2 , a n d   c 3 .
Table 4. Interpretation of results of correlation coefficients between camera regions c 1 ,   c 2 , a n d   c 3 .
ValueDescription
+0.93The positive correlation of 0.93 in blue between the zero regions of camera c 2 and camera c 3 means that when the zero region of camera c 2 presents traffic or there are high increases, there will also be increases proportionally in the zero region of camera c 3 .
−0.69On the other hand, in the negative correlation of −0.69 in red between region one of camera c 2 and region zero of camera c 3 , an inverse behavior is presented, which means that, if there is a lot of traffic in camera c 2 of region one, it will decrease in region zero of camera c 3 .
−0.67A similar case occurs in the negative correlation of −0.67 in red between region two of camera c 2 and region zero of camera c 3 , where an inverse behavior occurs, that is, if a lot of traffic occurs in camera c 2 of region two, it will decrease in the zero region of camera c 3 .
−0.43Also, for the negative correlation of −0.43 in red between region three of camera c 2 and region zero of camera c 3 , there is an inverse behavior, inferring that, if a lot of traffic occurs in camera c 2 of region three, it will decrease in the zero region of camera c 3 .
−0.46A similar case occurs for the negative correlation of −0.46 in red between region four of camera c 2 and region zero of camera c 3 , where an inverse behavior occurs, deducing that, if there is a lot of traffic in camera c 2 of region four, it will decrease in the zero region of camera c 3 .
+0.85For the positive correlation of 0.85 (blue) between the zero regions of camera c 1 and camera c 3 , it means that when the zero region of camera c 1 presents traffic (high increases), proportionally there will also be traffic in the zero region of camera c 3 .
−0.43Finally, in the negative correlation of −0.43 in red between region one of camera c 1 and region zero of camera c 3 , an inverse behavior is presented, which means that, if there is a lot of traffic in camera c 1 of region one, it will decrease in region zero of camera c 3 .
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Trejo-Morales, A.; Jimenez-Hernandez, H. A Road Behavior Pattern-Detection Model in Querétaro City Streets by the Use of Shape Descriptors. Appl. Syst. Innov. 2024, 7, 44. https://doi.org/10.3390/asi7030044

AMA Style

Trejo-Morales A, Jimenez-Hernandez H. A Road Behavior Pattern-Detection Model in Querétaro City Streets by the Use of Shape Descriptors. Applied System Innovation. 2024; 7(3):44. https://doi.org/10.3390/asi7030044

Chicago/Turabian Style

Trejo-Morales, Antonio, and Hugo Jimenez-Hernandez. 2024. "A Road Behavior Pattern-Detection Model in Querétaro City Streets by the Use of Shape Descriptors" Applied System Innovation 7, no. 3: 44. https://doi.org/10.3390/asi7030044

Article Metrics

Back to TopTop