Keywords

1 Introduction

The design and execution of several tasks in the area of transportation analytics are directly tied to the rising economic and social expenses associated with the ever-increasing number of autos on the road. These responsibilities consist of, but are not limited to, addressing the following: Poor traffic safety measures and traffic congestion are two of the most pressing issues facing today’s most populous cities across the globe. While there is clearly an increasing need for financial resources to meet these difficulties, the quantity now at hand is woefully inadequate.

Adaptive traffic control systems might be installed on city roadways as one solution. Delays and congestion have been reduced and other issues have been addressed thanks to traffic control technology.

Detection of accidents and cars parked in the improper spot. Keeping an eye out for compliance and making a note of any traffic violations.

Another crucial component is the collecting of statistics on traffic. This study aims to provide solutions to problems that arise in traffic management systems, such as identifying and counting the number of vehicles that are in motion. A technique for recognizing road markings is also provided in this article. These problems with a stationary video camera that is situated high above the street are being examined along with potential solutions. We took care to factor in the necessity for deployment on an embedded platform made up of smart video cameras while we designed these algorithms.

Figure 1 shows a schematic of the technology used to detect and tally the number of vehicles on the road-1.

Fig. 1
figure 1

Vehicle detection and counting system

The quantity of data that is sent to the traffic control center may be reduced thanks to the online video processing that has been included in the system. As a direct result of this, the processing power and bandwidth requirements for the server will be significantly reduced. However, it is important to remember that these cameras have limited processing power, and that advanced image processing needs access to powerful computers in order to account for a broad range of aspects. However, it is important to remember that these cameras do have a certain practical use.

The darkness of a scene may be affected by the shadows that are thrown by things like clouds, trees, and buildings.

The path that the sun takes across the sky produces ever-changing shadows and illuminates the ground below in a way that is mesmerizing.

  • Light from incoming cars and streetlights that reflect off the asphalt surface of the road.

How the weather is now being (Rain, Snow, Fog).

  • Multiple viewing points and views captured by the camera.

  • Road segment designs and intersection arrangements that deviate from the standard.

2 Related Work

Various research initiatives are now being carried out with the purpose of improving techniques for detecting things based on the motion in which they are moving. In the field of video analytics, the usage of such approaches has reached an optimal point at which it may be implemented. There are two basic focuses of investigation in the academic world [1].

To begin, research efforts are concentrated on improving approaches for estimating optical flow in order to provide more accurate estimates of optical flow and cut down on the amount of processing that is necessary [2, 3].

The second step is to investigate and improve different methods of modeling the backdrop [4,5,6,7]. The objective of several ongoing investigations in this area is to develop more accurate statistical models of the brightness distribution of the background. In this section, we also explore several methods for predicting the time-variable changes in the parameters of these models. Background modeling as a result of matrix decomposition [8] and background modeling as a result of tensor decomposition [9] has been the focus of a number of research in the recent past.

Machine learning techniques may be used in many fields. Neural networks, decision trees, cascade classifiers, and other approaches are only some of the many that have been developed to handle these mathematical difficulties. In the field of machine learning, the availability of a wide variety of mathematical methods, the possibility of combining a number of different mathematical models, and the development of new heuristic processes all contribute to the development of one-of-a-kind discoveries in this area of research. It is now impossible to single out even a single piece, much less a number of works, that are of great quality. Although a great deal of work has been achieved, the produced algorithms are not yet widely used. Furthermore, the extent to which a training set is exhaustive and how well it adheres to typical operating parameters is a crucial factor in the success of the algorithms.

It should be brought to everyone’s attention that the effectiveness of the industrial solutions that are now available for recognizing and counting moving items is inadequate. Because the primary emphasis of academic research is on the development of theoretical methods, it may be challenging to determine whether or not these methods are effective across the full range of real-world contexts. In academic research, it is common practice to ignore the computational complexity of algorithms. This indicates that a significant number of the proposed approaches have a level of computational complexity that prevents them from being realistically applicable in the absence of specialized hardware.

3 Vehicle Detection and Counting Algorithm

Giving local transportation officials a reliable estimate of the number of vehicles using the city’s roads, highways, and streets might help them better allocate funds and enhance the level of service they provide. Road traffic analysis systems have the ability to aid in both the real-time problem-solving (for adaptive traffic management) and the statistical study of traffic flow. These technologies have the potential to be useful. We are in a position to make recommendations regarding the implementation of practical solutions to improve the flow of passenger and cargo traffic as well as the safety of traffic as a result of our capability to process and analyze statistics. This ability is made possible by the fact that we are able to process and analyze statistics. The installation of traffic signals and the establishment of rules for their use, the alteration of the configuration of a road junction, and the building of extra lanes are all examples of potential solutions [10].

The vehicle counter will be incremented by one if the sensor determines that any of the following circumstances have been met.

There was an object in the region just before the threshold.

The object was seen in the area just before exiting the zone.

The object has now moved beyond the point of no return.

In the first stages of the algorithm, most of the focus is placed on doing background modeling in each area. The system has at this point determined which frames do not include any motion. To do this, a rough estimate of the total number of active locations in each frame is first calculated:

Figure out the difference between one frame and the next.

The thresholding approach is used to find out how many discrete events have occurred in total.

The area is considered to have motion when the number of moving points in the region is larger than a threshold, which changes based on the picture’s quality. It depends on the answer to this question whether or not motion sensors can pick up activity there. No innovation can take place unless there is some kind of change or transition.

When a car departs the entrance zone, it is also recorded as having left the exit zone, since the two are time-synchronized. This must be done to prevent selecting a reference frame based on the time a vehicle came to a stop inside the zone. In order to avoid any misunderstandings, this is essential. A reference frame will be chosen for use in the background estimate if there is no motion in the region during the period of the allotted time.

Following the selection of a reference frame, an analysis of the background stability over a predetermined period of time is performed (usually several seconds). In order to do this, we examine the ways in which the current frame deviates from the reference frame.

As soon as the phase of estimating the background is over, the zone will transition into its normal mode of operation, which will consist of the following processes:

Calculating the amount of time that has elapsed between background frames F and B by using the following steps [10]:

$$d_{x,y} = \left\{ {\begin{array}{*{20}c} {F_{x,y} - B_{x,y} ,} & {if~F_{x,y} \ge B_{x,y} ,} \\ {B_{x,y} - F_{x,y} ,} & {Otherwise} \\ \end{array} } \right.$$
(1)

where x, y—coordinates of the pixel.

Using thresholding to classify a set of dots as either an object, background, shadow, or excessive illumination. (For general consumption and for use on public transportation) and a few more.

For the created algorithm to successfully recognize and count vehicles, it is necessary to define unique zones of interest for the sensors in the picture. Each lane of the road receives a sensor. The sensors in each device are split into two halves. By specifying the distance between the zones, we can calculate an approximation of the passing vehicle's speed and use this information to predict the direction of its progress.

$$ b_{x,y} = \left\{ {\begin{array}{*{20}c} {1~,} & {if~d_{x,y} \ge t_{bin} ,} \\ {0~,} & {Otherwise} \\ \end{array} } \right. $$
(2)
$$l_{x,y} = \left\{ {\begin{array}{*{20}c} {1,} & {if~F_{x,y} \ge B_{x,y} d_{x,y} ~and~b_{x,y} \equiv 1~,~~F_{x,y} > t_{light} ,} \\ {0,} & {Otherwise} \\ \end{array} } \right.$$
(3)
$$s_{x,y} = \left\{ {\begin{array}{*{20}c} {1,} & {if~F_{x,y} < d_{x,y} ~and~b_{x,y} \equiv 1~,~~F_{x,y} < t_{shadow} ,} \\ {0,} & {Otherwise} \\ \end{array} } \right.$$
(4)

where “bx, y” indicates that the pixel is not part of the background, “lx, y” suggests that there is too much light, and “sx, y” indicates that there is too much darkness.

Whether a spot falls under the shadow (tshadow) or is bathed in too much light, the defining thresholds are laid forth (tlight). These points must be filtered out to prevent false positives. The zone enters the “vehicle detected” stage when points associated with an item take up a significant portion of the zone's available space. As was previously said, the choice to detect a vehicle is ultimately made at the sensor level.

4 RMD Algorithm

Pixels that have the coordinates (bx, y) but are not in the background; pixels that have the coordinates (lx, y) but have an excessive amount of light; and pixels that have the coordinates (sx, y) but not enough amount of dark.

The lines that demarcate what it means to be in the shade (tshadow) and what it means to be dazzled by the sun are drawn (tlight). It is crucial to eliminate certain data points so as to prevent producing false positives in the analysis. After a certain number of points associated with an item have occupied a significant portion of the zone, the “vehicle detected” phase will start. As was said before, the sensors are the ones that make the choice as to whether or not a vehicle will be detected by them [11,12,13,14,15].

$$\begin{array}{*{20}c} {T(s,\alpha ) = \int^s_{\sigma = s_{\min } } {S(\sigma ,\alpha )d\sigma ,\,\,\,s \in [s_{\min, }s_{\max} ]} } \\ \\ \end{array} ,$$
(5)

where S(σ, α)—VRT result; (s, α)—line parameters.

The following limitations, on the other hand, reduce its usefulness in dealing with the problem as it is described.

The Interactive Voice Responses Technology (I.V.R.T) is unable to establish the positions of the endpoints of the marking lines; it can only detect the straight paths along which the marking lines are positioned.

The I.V.R.T. is unable to recognize curving marking lines as separate entities. Certain video cameras generate footage that is considerably warped, which may dramatically alter marking lines that are normally straight. This may be a problem when trying to create accurate maps.

In order to get around these restrictions, it is recommended that the original picture be cut up into smaller pieces (blocks). In this scenario, we ignore the possibility that lines might be curved, and as a result, it is frequently difficult to precisely locate the ends of segments within these blocks.

The line detections made by the IVRT on a block-by-block basis need to be pieced together to create continuous curved or straight lines that may be read as road markings [16]. Each newly identified segment is connected to a proactive agent that is responsible for the ongoing search for connections with other agents in the area. Following a number of iterations of agent interaction, a demand-resource network (DR-network) of sufficient stability is formed. The structure of the network itself incorporates several lines of investigation [17].

5 Experimental Results

In order to test the efficacy of the created algorithms and software, researchers analyzed real-world footage captured by embedded smart cameras while monitoring various stretches of road in real-time.

Video was taken during various times of the day and night, and in a variety of climates. Images after processing are 1024 pixels wide by 768 pixels high, and the data set used for experimental study is the ImageNet classification task at half the resolution (224 × 224 input image) and then double the resolution for detection [10].

  1. A.

    The Conclusions Reached by the Road Marking Detection Algorithm

The vehicle recognition and counting system’s operational settings can only be set with the help of the road marker detection algorithm. Thus, the operator of the traffic control center needs the outcomes of this algorithm. Because of this, all experiments were conducted on a computer equipped with a 3.40 GHz Intel (R) Core (TM) i7-3770 CPU. Eleven videos worth of stills were used. Location and lighting conditions affect what is captured in photographs.

The findings of experimental study conducted on various photographs. According to these findings, the average detection accuracy of road markings is around 76%. Fig. 2 shows the road marking detection vehicles.

Fig. 2
figure 2

Road marking detection

  1. B.

    Results for Vehicle Detection and Counting Algorithm

The created vehicle recognition and counting algorithm will be optimized for use on an embedded platform of smart cameras. The AXIS M2026-LE Mk II network camera, which uses an Ambarella ARM CPU, was used to evaluate the algorithm. With five lanes of traffic under observation, it took 4 m/s to analyze a single picture.

Vehicle identification and counting algorithm process is shown in Fig. 3. Multiple camera angles were used to study three- and four-lane stretches of road.

Fig. 3
figure 3

Process of vehicle detection

Table 1 presents the findings of the various empirical investigations. Carried out on the algorithm for vehicle detection and counting for video sequences that were taken in a number of different observational settings.

Table 1 Results of vehicle detection

5.1 Conclusions and Future Scope

The present paper's main contribution are Hybrid smart technology, Simple to deploy on all devices and systems, Algorithm improvements were also made to improve the accuracy and speed of searching, and detailed instructions on how to do an analysis of video sequences obtained from an optical sensor in the course of monitoring road sections were provided. These kinds of algorithms are able to recognize road markers, count cars, and analyze information about traffic flow. The proposed algorithm for vehicle recognition is built on top of an integrated platform of smart cameras, which is also utilized to test and validate the algorithm.

The effectiveness of the algorithms and software has been shown via experimental testing. The findings demonstrate that the suggested algorithms make it possible to solve the problem in question in real-time and in a variety of observation settings, as was anticipated. The scope of the paper is to help traffic police and Maintaining records. Traffic surveillance control modern traffic management system.