Research on the Method of Determining Highway Truck Load Limit Based on Image Processing

Over-limit transportation is the leading cause of highway pavement diseases and traffic accidents. The Ministry of Transport of China has determined the weight limit for different trucks entering the highway based on the number of truck axles and the coupling method. However, because determining the truck weight limit is more complicated, the current work is mainly done manually by the toll station staff at the expressway entrance, and the recognition speed is slow Cand the recognition result is inaccurate. In response to this problem, we first analyzed and established the relationship between the number of axles and the position distribution, and the truck weight limit. Based on the above, we developed a circle detection method with an improved Hough and CURE algorithm as the core to identify truck wheel axles. We collect 100 test images at the expressway entrance and use 50 of them to perform detection experiments to determine the radius step, angle step, and the maximum and minimum circle values during the detection process. After using the entire data set, comparing the hough algorithm, the improved Hough algorithm, and our proposed method, the results show that our proposed method has higher accuracy and efficiency.


I. INTRODUCTION
Overload transportation will damage highway pavement and subgrade and bridge, which will shorten the service life. Simultaneously, overload transport due to its large carrying mass, motion inertia, and braking distance will increase transport safety hazards. China banned overloaded trucks from entering expressways on January 1, 2020, from comprehensively banning crowded transportation. Due to the different towing form and axle number of transport trucks, other transport trucks have different weight limit values, so transport trucks' entrance detection on expressways mainly consists of two parts: entrance weighing and weight limit identification. The form of towing and the number of axles make the determination of truck weight limit complicated, which is why it is mainly judged by manual title. However, due to the expressway toll collection, personnel have to handle the toll procedures and carry out identification. Simultaneously, there is a low line of sight and other conditions, resulting in a long time for manual titles and a high error rate. This study developed a method to determine highway trucks' load limit based on image processing based on the above problems.
The associate editor coordinating the review of this manuscript and approving it for publication was Yiming Tang .
It is necessary to develop an automatic method for determining the weight limit of highway trucks. The weight limit value of highway trucks has a specific correlation with their axles' number and arrangement. The truck axles' number and structure can be identified through image processing, and then the weight limit value of the truck can be obtained. Based on the analysis of the relationship between the number and arrangement of truck axles and their weight limits, Research has developed a method for determining highway truck load limits based on image processing. This method can replace the determination of the truck weight limit completed by the highway toll personnel, quickly and accurately complete the truck weight limit at the highway entrance, ensure highway transportation safety, and improve highway entrance efficiency.
The truck's profile feature is one of the most significant parts of the car. It has a useful recognition feature, so most truck type recognition algorithms are based on the truck profile for truck identification. This research aims to solve the truck's towing characteristics and the number of axles through image recognition. Both of these problems can be solved by identifying the side wheels of the truck. The number of axles is equal to the number of side wheels of the truck. The distribution of the side wheel positions is obtained, so the VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ critical issue in this research is identifying the truck's side wheels. In recognition of truck side profile features, recognizing truck tires' profile and position is the core content. Therefore, according to the tire profile characteristics, circle detection technology has become a key technology. In recognition of truck profile features, truck tire profile and position recognition are the core content. Therefore, according to the characteristics of the tire profile, circle detection technology becomes the key technology. The circle detection algorithm originally comes from an extension of the Hough transform algorithm for detecting straight lines, which has developed many unique algorithms with their characteristics after several decades. The existing circle detection algorithms can be roughly divided into voting/clustering algorithms and optimization algorithms.
The voting/clustering algorithm mainly uses the Circle equation and the points' coordinates to map the image's edge points to parameter space. This algorithm includes mostly the Circle Hough Transform (CHT) and various improved methods. The Hough Transform (HT) was initially used to detect and draw the linear trajectory of subatomic particles in the bubble chamber photos. The author skillfully transformed the global curve detection problem into the peak detection problem in the parameter space by using the linear point-slope equation.
The optimization algorithm mainly includes the leastsquares algorithm and genetic algorithm. Direct least square fitting and numerical stable least-square fitting fit the circle to the edge to obtain the minimum error. This kind of method's detection results are accurate and can get the product with the minimum deviation. However, they can only fit one target at a time and are highly susceptible to the influence of interference points. Sometimes, the results with a variation or even complete errors will be produced. In our study, multiple circles need to be detected simultaneously, so the voting/clustering algorithm is adopted. Now the commonly used Hough transform is an important tool for circle recognition. Hough transform was originally used to detect and draw the subatomic particles' straight-line trajectory in the bubble chamber photograph and then applied to the circle detection direction. Its basic idea is to transform the original image into the parameter space [1]. To reduce the Hough Transform of a circle's calculation amount and memory consumption, some researchers propose the Randomized Hough Transform (RHT) and the Randomized Algorithm for Detecting Circles (RCD). RHT is used to avoid the huge calculation amount formed using standard Hough transform [2], [3]. When the image noise is lower than 170%, RCD's detection speed is significantly better than that of the RHT algorithm [4]. Although RHT only accumulates the number of parameter allocation units from more than one mapping, it still introduces many invalid units into complex image processing, The gradient-based Hough transform is introduced to use the edge points' gradient information to detect The center of the circle. finally, the one-dimensional Hough transform is used to solve the radius length to reduce invalid accumulation (Yuen et al., 1990). Later, the gradient direction information was used to judge the validity of random 3 points in THE RHT algorithm, which also reduced the invalid accumulation to a certain extent [6]. Kiryat N and some people proposed a probabilistic Hough transform [7], [8]. To overcome the increase of computation and the increase of dispersion degree of statistical results caused by arbitrary selection of combination points, the point Hough transform is proposed to realize circle detection. [9]. Later, a circle analysis method was proposed to identify the edge of the target for chain code. On this basis, the basic elements of roundness and radius were analyzed and calculated [10]. For the detection of circular objects in the circle analysis class, an adaptive random Hough transform is proposed [11]. To optimize the edge chain coding, Chen proposed a method that uses four adjacent priority eight directions to track points on the edge of a circular target, thereby forming a series of edge chains. Then, three non-collinear points on edge were randomly selected to determine the circle's position, thus improving the accuracy and speed of circle detection [12]. A threedimensional Hough transform method is proposed. The radial distance, azimuth, and time in radar echo data correspond to three cartesian coordinate systems. Then, the range-time plane and angle-time plane are respectively Hough transform method to realize target detection. The formula of Hough transform in three-dimensional space is also derived [13]. For the multi-dimensional Hough transform, a weak target TBD algorithm based on the multi-dimensional Hough transform is proposed, which has good robustness for detecting and tracking linear moving targets in three-dimensional or highdimensional space [14].The multi-dimensional Hough transforms pre-detection tracking algorithm based on odorless transformation USES the target amplitude, prior information, and odorless transformation method, and improves the detection and tracking of Hough's performance transform while reducing the amount of computation [15]. When the image data is messy, random Hough transform is not ideal, and real-time detection is poor. Therefore, a K-means clustering method is proposed first to separate the arc data points from the contour image, and finally use the random Hough algorithm to detect the circle [16]. Research on the Circle Detection Algorithm based on the Connected Region Marker algorithm [17]. To solve the problems of the large calculation amount, low operating efficiency, and low detection accuracy in the traditional Hough transform circle detection algorithm, an improved Hough transforms circle detection algorithm based on circular symmetry, and a random selection is proposed [18]. Aiming at the traditional random algorithm's problems with many invalid accumulations, low execution efficiency, and improved circle detection algorithm is proposed. The two-step invalid circle model selection strategy is studied [19]. Contour tracking is to track the boundary by sequentially finding the edge points. The criterion is to scan pixel by pixel from the lower-left corner of the image. When an edge point is encountered, it starts to track 205478 VOLUME 8, 2020 sequentially until the tracking return is following points to the starting point (for closed lines). Alternatively, there is no new follow-up point (for non-closed line) or its follow-up point [20].To solve the problems of multiple interference factors, the irregular shape of circles under complex background, slow detection speed of traditional random Hough transform circle, and low detection accuracy, detecting irregular circles under complex background was proposed [21]. In recent years, optimization algorithms have been widely applied to the detection of circles. Proportional genetic algorithm [22], bacterial foraging algorithm [23], differential evolutionary algorithm [24], electromagnetic optimization [25], artificial immune algorithm [26], and artificial bee colony algorithm [27] have been successively applied to the detection of circular targets. These methods do not adopt the hypothesis verification method but set an objective function in advance and repeatedly iterate the feature information extracted from the image to the objective function to obtain the circle's center and radius. The time complexity of these methods is large and cannot guarantee a more accurate recognition result. Simultaneously, because of the image's complexity, more interference factors in the image will harm circular detection accuracy. This paper proposes a circle detection algorithm that improves Hough circle detection and CURE cluster analysis to solve these problems. The algorithm can effectively process the image and reduce the noise of the image. Combined with the typical CURE cluster analysis algorithm in data mining, the circles existing in the image can be detected by better classification, improving detection speed, and efficiency.

II. DETECTION PROCESS
There are various types of trucks with different models and different classification standards. In China, highway management departments have other load limits for different kinds of trucks.
The weight limit value of an ordinary lorry with four axles and below is the lowest. In contrast, the middle axle's weight limit value, articulated, and the fully articulated car is higher. Take the four-axle truck as an example to compare its axle distribution. It can be seen from Figure 1 that the distance between the first two axles of the four-axle ordinary truck and other trucks is smaller than that of different types of trucks, to make a judgment based on this. Of the five-axis trucks and above, only the articulated car type 2 differs. The axles of freight cars' distribution characteristics with different towing forms are other, and the distribution characteristics are similar to those of four-axle trucks.
Through the truck's side's image processing, the number and position of the wheel and axle of the truck can be identified, and then the number and distribution position of the wheel and axle can be obtained. If the wheelbase ratio range is met, the weight limit within the field is output. If it is not completed, other weight limits are output. It can be seen that determining the number and location of freight car wheels through image processing is the key to the research.  Based on this decision basis, we designed the fusion algorithm. After determining the freight car's wheel and axle's number and position, the freight car's limited weight value shall be determined according to the ratio as mentioned above of the wheel and axle. The whole detection process is divided into two parts: image processing and upper limit calculation. The image processing part mainly includes image preprocessing, edge detection, and wheel recognition.

III. IMAGE PROCESSING METHOD A. IMAGE PREPROCESSING
The identified truck image should be preprocessed to obtain the image information with recognition value and extract and recognize the truck profile better. Images taken by cameras on highways can contain many things that are not needed for recognition, such as color information and light intensity. VOLUME 8, 2020 TABLE 2. Truck wheelbase ratio. The wheelbase ratio range under the coaxial number is determined through the wheel axle distribution characteristics, and the wheelbase ratio range is satisfied. The weight limit within the field is output.

FIGURE 2.
Detection flow chart. The image processing part mainly includes image input, image preprocessing, edge detection, identify the axle, wheel recognition, and determine weight limit.
The preprocessing of the identified truck images is mainly to convert the color images into grayscale images.
In image preprocessing, sometimes the grayscale image obtained during image preprocessing is too low in brightness, so it is necessary to adjust its brightness. Gamma correction [28] is applied to the image to increase the contrast of features recognized in the image, thus improving its display effect. There is the mathematical formula of Gamma correction: wheres is the pixel value of the image after transformation, r is the pixel value of the image before the conversion, c and γ are constants. When γ > 1, the grayscale value of short-ranges and the grayscale value of the large-ranges are interchanged, the low grayscale value of the short-range transition to the high grayscale value of the large-ranges, while the high grayscale value of the large-ranges transition to the low grayscale value of the short-ranges; When γ < 1, on the contrary, the high grayscale value of the short-ranges transition to the low grayscale value of the large-ranges, while the low grayscale value of the large-ranges transition to the high grayscale value of the short-ranges. The gamma curve of CRT can be changed by changing the power value (γ ). It is experienced that γ = 1 is the calculated boundary value when c is 0.5.

B. EDGE DETECTION
After the pretreatment, the edge detection of the truck should be carried out. The commonly used edge detection operators are Roberts edge operator, Sobel edge operator, Prewitt edge operator, Laplacian edge operator, Laplacian of Gaussian edge operator, and Canny edge operator [29]- [34]. The Canny edge detection operator is a multilevel edge detection operator proposed by John F.Canny in 1986 [35]. The Canny operator and other operators' main difference is that the Canny operator calculates and stores the gradient and amplitude in all four directions. The direction with the largest amplitude is more likely to be the direction of the edge. Then the lag threshold is used to limit the gradient amplitude and determine the edge of the image. The steps of the Canny operator to find the edge point are as follows.
1) Smooth the image with a Gaussian filter: σ is the standard deviation of the Gaussian function. The value of σ directly affects the weight of the spatial domain. The smaller the value is, the smaller the weight of the spatial domain will be. f (x, y) is the input image; I (x, y) is the image filtered by a convolution operation.
2) The first partial derivative is used to calculate the gradient amplitude and direction. The first partial derivative sum of each pixel point is calculated in the 2 × 2 neighborhood to obtain the image pixel gradient amplitude and direction. The calculation method is as follows: The gradient amplitude M and direction at point (x,y) are: 3) The maximum gradient amplitude inhibition: NMS's maximum inhibition for short can refine the image edge and restrain the edge points. The canny algorithm in which the vertical and horizontal comparison gradient size, simultaneously all pixel points in the gradient direction of the four trends similar to replace. If the pixel gradient value is greater than the adjacent point gradient in the direction of the gradient values, is to determine the pixel edge points and keep the gradient value; If the gradient value is less than the adjacent threshold in the same direction, the pixel point is judged as a non-edge point, and the gradient value is set to 0, to realize the refinement treatment of the edge. 4) The double threshold method is used to detect and connect edges: after non-maximum suppression, the gradient threshold needs to be set to extract reality. By placing a high and low point, the real edge's credibility can be improved, and the false edge can be reduced. Canny Canny selects 1/2 of the high threshold as the low threshold, and the high point divides the image into three parts: the right edge part, the false edge part, and the non-edge part. The faulty edge part contains both edge points and non-edge points, and it is determined whether the issue is an edge point according to the number of edge points in the neighborhood of the pixel point of the false edge part. The Canny algorithm parameter can be adjusted appropriately according to different occasions to meet different edge characteristics, and it has more substantial applicability in the application and better detection effect. Therefore, a Canny operator is used in this paper to detect the edge of the image.

C. HOUGH CIRCLE DETECTION BASED ON EDGE GRADIENT IMPROVEMENT
After a Canny operator was used for edge detection, the detection edge deviated from the actual boundary due to the image and edge detection algorithm, so the circle could not be intuitively detected.
The Hough transform algorithm uses the line-point duality of image space and Hough parameter space to transform the image space's detection problem into parameter space.
The general equation of a known circle is in the formula: (a, b)-center of the circle, r-radius of the process. Invert the unknowns in the above formula; y and x are constants. Furthermore, a, b, r as unknowns. The above equation becomes a cone equation. Three points on the circle can determine the circle equation. Then three points on the image can determine a set of parameters, determining a circle. This algorithm uses this principle. Randomly go to three points in the image space to determine a set of parameters, then go to three points, and then determine a set of parameters. The latter is compared with the former. If the same, the parameter is added. If it is different, use it as a new parameter source, put it into the parameter table. We know that the accumulator of a parameter group reaches the preset threshold or reaches the upper limit of the number of cycles we set. The test stops.
The random Hough transform algorithm can recognize the circle, but it can also introduce invalid accumulation. A flexible gradient calculation is presented in the algorithm, and the Canny operator is used to calculate the edge gradient [36] to reduce the invalid accumulation. We use this method to detect circles.
The gradient detection circle can be used in the following steps: 1) The Canny operator formulas (4)-(7) are used to calculate the first-order derivatives in the x and y directions of the non-zero points of the preprocessed image to obtain the gradient. 2) Store gradients of all non-zero points; 3) All non-zero curves are defined by the slope. According to the circle's characteristics, it finds the gradient of the point on the circle and makes straight lines. Straight lines intersect at the center of the circle. 4) The intersection points of all the lines are accumulated.
When the line through the intersection points is accumulated to the preset threshold, the candidate center and radius are determined. 5) Calculate the distance between the radius and the center of the circle, and determine it to be a right circle when it conforms to the maximum value r max and minimum value r min of the set radius and the minimum distance d of the center. 6) Draw the right circle in the original image. 7) At the end of the detection, the circle in the original image is displayed.
Using the gradient to determine the center and radius of the circle and relative random Hough transform can avoid invalid accumulation, reduce operation time, increase accuracy, and avoid false detection and missing detection.

D. CURE CLUSTERING ALGORITHM
After the detection circle is completed by improving the Hough transform, multiple circles can be detected for each wheel. Meanwhile, circles can be detected at the non-wheel in the picture due to some disturbances, which will cause specific interference to the detection results. In this case, it is necessary to gather the data into a similar sample point through cluster analysis, and then gather the similar sample points into the same class cluster to minimize the similarity between sample points of different classes of clusters and thus reduce the interference of non-wheel circle. The present clustering analysis techniques mainly include dividing clustering, merging clustering, density-based clustering, grid clustering, spectral clustering. The CURE algorithm applied to cluster analysis has several essential characteristics [37]: a. It can recognize clusters of arbitrary shapes, such as round, oval shape; b. It has linear space complexity and time complexity, and for images in low-dimensional data space, the complexity is relatively simple; c. Most of the clustering algorithm is good VOLUME 8, 2020 at dealing with similar object clustering, only in outlier presence when dealing with low efficiency and accuracy. CURE algorithm chooses not to use a single center of mass or object to represent a cluster. It chooses to have a fixed number. It has a particular representative in the space point to represent a cluster. The more representative points in the clusters are used to indicate a cluster to reduce the wheel around the interference of the results significantly. We use this method to determine the location of the circle, finally.
First, choose the furthest distance cluster center of mass of a point as the first point, and then select from the selected to the point farthest point, until it is chosen to n (generally n ≥10), these points to capture the shape and size of the clusters. Then the study according to the parameters α(0≤ α ≤1) less to the bunch of contraction and get after contracting representative point, the distance between the clusters can be defined as the distance between the two representative points, are defined as follows: The calculation steps of the CURE clustering algorithm are as follows: Input: the original data set X, cluster number K, represents the point number m, the q shrinkage factor Output: Clusters clustered 1) Sample set D was obtained from the original data set through random sampling 2) Evenly divide the sample set D into N parts 3) Select representative points for each divided area for local clustering, and shrink the representative points in each cluster with α toward the cluster center.
W is the whole area, U and V are W classifications. There is a |U | = m representing a point in the U category, and |V | = n representing a point in the V category.
Step1: Find the mean value of representative points W i : Step2: Choose any k points P i , i ∈ [1, k] from U and V classification. Anyone represents the point: α is the shrinkage factor. U , V classification has done agglomeration and contraction operation, and the representative point W i , (i = 1, 2, 3, . . . , k), on the whole W represents the new information after agglomeration. 4) Perform further CURE hierarchical clustering with a clustering number of K for all the obtained clusters 5) Eliminate the noise points and divide the remaining samples in the sample set to obtain the final cluster

IV. PARAMETER OPTIMIZATION
Our proposed algorithm maps the edge points in the circle image to the parameter space (a, b, r) through a = x-r * cos(angle), b = y-r * sin(angle). Since the digital image uses polar coordinates, angle, and r both take a certain range and step length. Through the double loop (angle loop and r loop), the points in the original image space can be mapped to the parameter space, and then the center of the circle can be found in the parameter space (that is, a large cube composed of many small cubes), and finally the radius coordinates are calculated. The parameters to be set in the algorithm implementation include detection radius step size, angle step size, minimum circle radius, and maximum circle radius.
Different pictures will affect axle circles' detection due to the different axle numbers, shooting Angle, and image graying according to the detection data set. Therefore, we need to adjust the parameters so that the Hough circle detection algorithm in this paper can achieve the highest detection accuracy in the entire data set's detection process.
To calibrate the relevant parameters in our proposed method and test our proposed method's effectiveness, we continuously took (100) pictures of trucks entering the highway at the highway entrance at a fixed point. We select (50) sheets as the parameter calibration data set. With the increase of step size, the detection time becomes shorter, and the detection accuracy presents a trend of first increasing and then decreasing. Within a specific range, the step size will not have a significant impact on the detection results. When the detection step size is 1, the detection efficiency is guaranteed, and the highest detection accuracy is achieved to achieve the optimal result.

A. STEP SIZE OF CIRCLE RADIUS IS SELECTED
Select the radius step interval from 0.1 to 2.0, and take 0.1 as the step to carry out experimental analysis, respectively, count the calculation time and detection accuracy under different circle radius steps.

B. ANGLE STEP SIZE SELECTION
Select the angle step length interval from 0.1 to 1.0, and take 0.1 as the step length to count the calculation speed and detection accuracy under different angle steps. 205482 VOLUME 8, 2020 FIGURE 4. It can be seen in Figure 5 that with the increase of the angle step, the detection accuracy decreases linearly, and the calculation time decreases from large to small. The angle step size will affect the center of the circle's position, and the change of the value will bring a massive change of the center. In detecting the whole data set, the angle step size of 0.1 is the best.

C. SELECT THE RADIUS OF THE MINIMUM CIRCLE AND THE MAXIMUM CIRCLE
Set the minimum circle's value range to be 0-20, step size to be 1, the full circle's value range to be 10-40, step size to be 2, and calculate the detection accuracy. This is mainly because the minimum circle's value affects the size of different circle detection, too small a minimum circle increases the rate of false detection, too large a minimum circle increases the rate of missing detection. This is mainly because too small the maximum circle will increase the omission rate, while too large a large circle will not affect the omission rate because there are few Outlines of the large circle on the truck. However, with the increase of detection radius difference, the calculation time will increase. Therefore, we choose the minimum radius of the circle to be 10 and the maximum radius of the circle to be 30.
In the Hough detection algorithm, (1,0.1, 10,30) is used as the input parameter to detect the data set, and the detection accuracy can reach about 90%, thus completing the parameter adjustment analysis of the algorithm.

V. METHODS OF CONTRAST
To verify our proposed scheme's reliability, we will use all the acquired pictures as the test data set. This data set was taken during the actual truck operation, which satisfies scientific and practical test research. Then compare with the traditional Hough algorithm, the latest improved Hough algorithm, and the mainstream contour tracking [20] algorithm in detection time and detection accuracy. We took 100 pictures of the test object data to test the average detection time and detection accuracy of these four methods (whether the axle is fully and accurately identified). The method in this article is compared with the other three methods.
From the above table, it can be seen that when the traditional Hough algorithm is used for recognition, the average time used is 162.11s; the average time used by the latest improved Hough algorithm is 11.62s; the average time used by the contour tracking algorithm is 7.51s. Traditional Hough algorithm has a significant disadvantage due to its long iteration time and time-consuming detection. Although the newly improved Hough algorithm has obvious advantages over the traditional Hough algorithm in time-consuming, it is better than the algorithm in this paper. The detection time of the contour tracking algorithm is similar to the algorithm in this paper. In terms of accuracy, the traditional Hough algorithm only has a good recognition effect for simple circles with small noise and clear outlines. When detecting a complex circle like an axle, the detection effect is not ideal. The latest improved Hough The algorithm's recognition rate for truck axles is 57%, and the performance is average. Although the contour tracking algorithm has a more significant improvement in accuracy to 80%, it has higher accuracy requirements. Moreover, this paper's accuracy is 91%, 11% higher than the contour tracking algorithm, the best performance. VOLUME 8, 2020 FIGURE 6. Due to the poor performance of traditional Hough changes, the accuracy of the latest improved Hough algorithm and the algorithm presented in this paper is compared in the following paragraphs. Some data sets are extracted from the comparison sample.
The original random Hough transforms circle detection algorithm is improved, which is divided into three parts: (1) obtaining the ROI of the circle by the Connected Area Marking Algorithm; (2) sampling the edge points of the circle to calculate the parameters of the circle; (3) take the 8 neighborhood pixels of the center of the circle as the center of the circle and make the circle respectively, and get the optimal circle [37].
When recognizing a circle target in an image, it is often necessary to track the target's edge, which is also called contour tracking. If the image is a binary image or different regions in the image have different pixel values, but the pixel values in each area are the same, the following algorithm can complete contour tracking based on 4-connected or 8-connected regions.
Step 1: First, scan the image from top to bottom, from left to right, and look for the first boundary starting point A 0 without marking the tracking end mark. A 0 is the boundary point with the smallest row and column value. Define a scan direction variable dir, which is used to record the movement direction from the previous boundary point to the current boundary point in the previous step, and its initial value is: (1) dir = 3 for 4 connected regions; (2) Take dir = 7 for 8 connected areas; Step 2: Search the 3 * 3 neighborhood of the current pixel counterclockwise, and set the initial search direction as follows:(1) Take (dir +3) mod 4 for 4 related areas; (2) For 8 related areas, if dir is odd, take (dir+7) mod 8; if dir is even, go (dir+6) mod 8; The first pixel with the same value as the current pixel found in the 3 * 3 neighborhood is the new boundary point An, and the variable dir is updated to the new direction value.
Step 3: If An is equal to the second boundary point A 1 and the previous boundary point A n−1 is equal to the first boundary point A 0 , stop searching and end tracking. Otherwise, repeat step 2 to continue searching.
Step 4: The boundary formed by boundary points A 0 , A 1 , A 2 , . . . , A n−2 is the boundary to be tracked.
According to the comparison of Figure 7-9, the improved Hough algorithm overcomes the shortcomings of traditional   Hough detection for axle circle detection and can effectively identify the axle position and outline. However, in the detection process, it is difficult to identify the weak edge points. When multi-circle is recognized simultaneously, it can not effectively cluster the axle contour, leading to a high false detection rate and can not effectively identify the axle's exact position. Therefore, this method does not achieve the ideal effect. Most of the clustering algorithm is good at dealing with similar object clustering, only in the presence of isolated points when dealing with low efficiency and accuracy. CURE algorithm chooses not to use a single mass center or object to represent a cluster. It chooses to have a fixed number. It has a particular representative in the space point to represent a cluster. The more representative points in the clusters are used to indicate a cluster. Simultaneously. The CURE algorithm is a novel hierarchical clustering algorithm that is more robust to the isolated point and can effectively identify classes that are non-circular and vary in size. However, our algorithm also made some detection errors, mainly since the truck contour contained an edge similar to a circle. Simultaneously, each image's color, background, and size were different, so the optimal parameters of axle circle detection were different in the parameter adjustment process. The change of parameters will lead to detection time and detection accuracy, especially in Angle step size. To make the detection accuracy reach more than 95%, we need to improve the algorithm and optimize the parameters in more detail. While improving the accuracy, the detection time should be kept short, which is also the research to be carried out in the future.

VI. CONCLUSION
The detection method of truck weight limit for the highway we proposed has high accuracy and detection speed and is suitable for over-limit management of highway entrance trucks. This method can replace the manual detection of the workers' truck weight limit at the highway entrance and improve the highway entrance's traffic capacity to ensure the detection efficiency. At the same time, the method we developed is easy to implement. Set up a camera at the expressway entrance, connect it to a central computer, and transfer the picture to the computer for processing. The overall system hardware investment cost is low, the detection speed is fast, and the application prospect is broad.
We analyzed the relationship between the truck weight limit and the number and arrangement of its axles. We designed a method for determining the truck weight limit based on the truck axles' number and arrangement. The key to this method is to obtain the number and arrangement of truck axles through image processing. The traditional Hough circle detection algorithm has a better detection effect for circles with clear outlines, but in practice, this method's applicability is low due to problems such as light and shadows during shooting. Based on the existing circle detection technology, we combine the hough algorithm with the canny operator and the cure algorithm. This method can comprehensively detect the circles in the picture through the Hough algorithm with the canny operator. The cure algorithm can be very Good to eliminate false detection circles. Through experimental analysis, compared with existing ideas, our proposed method has higher accuracy and calculation speed.
Although the proposed method has a high detection speed of accuracy, it has a high error rate in detecting some trucks with circular appearance features. In the next step, we will further optimize the method through the array features of circles to reduce truck body circular features' impact on the detection results. Simultaneously, the proposed method is applied in good weather, and the weather, such as rain and fog, will have a particular influence on the proposed method. The algorithm optimization in the case of rain and fog is also a focus of our future research.