Abstract recognition problem parking line current parking assistance system, the establishment of automatic parking line detection and identification model 360 ° panoramic bird's-eye image, taking into account the influence of light on the image processing result, to the image preprocessing, Then, a median-based adaptive Canny edge detection technique is adopted, and Hough transform is used to limit and optimize the Hough transform result according to the prior knowledge of the parking line characteristics, so as to realize the recognition of the parking line. At the same time, the actual acquired image is verified, and the recognition rate reaches 94.2%, which proves the effectiveness and robustness of the proposed method.
This article refers to the address: http://
Key words parking assistance; parking line recognition; adaptive Canny; Hough transform
In recent years, with the rapid growth of the demand for parking assist systems, a variety of parking space positioning methods have been proposed. These methods can be roughly divided into four categories: user interface based, facility based, idle based and parking line based. method. Compared with other methods, the parking line based method has the following advantages: (1) It can be combined with a user interface based method to reduce inconvenience caused by repeated operation of the driver, which is a major defect based on the user interface method. (2) Unlike the idle bit-based method, it can locate the parking space more accurately because its positioning process does not depend on the parking posture of the adjacent car and only depends on the parking line. (3) It can also be effectively applied to the case of tilting a parking space. Due to the limitations of the sensor, the use of an ultrasonic sensor based on the idle position will fail in the case of a tilted parking space. (4) It usually takes a small amount of time compared to the idle bit based method of applying binocular or motion sound waves. (5) It does not require additional sensors, such as a stereo camera, a scanning laser radar or a short-wave radar, but a rear-view camera.
The method based on the parking line can be divided into semi-automatic and fully automatic methods. Compared to a fully automated approach, a semi-automated approach may yield more reliable results and consume less computing resources because it has additional information from people. Jung et al. proposed a method that requires the driver to mark a point in the pre-parking space and then use the direction gradient to identify it. Experiments have shown that this method is only applicable to one type of parking space. To overcome this drawback, another method has been proposed to identify various types of parking spaces, but requires more cooperation from the user. This method requires the user to enter the initial position of the points at both ends of the parking space to form the entrance of the parking space. Based on these initial positions, artificial neural networks and genetic algorithms are used to identify the parking spaces.
In addition, fully automated methods have also been developed. XU et al. proposed a method based on color segmentation technology to identify parking spaces. This method can only identify red parking lines, and the method based on color information has been proven to be sensitive to illumination changes. Tanaka et al. proposed a method of using RANSAC to detect a set of straight lines for edge segments to identify parking spaces. Since this method is highly dependent on straight line detection, its performance is degraded due to partial fouling. The method proposed by Jung et al. models various types of parking spaces into a hierarchical tree structure, based on which the automatic identification is completed.
However, the methods proposed above all involve thresholds, so there is a common problem in the field of image processing, that is, if the threshold is set too high, important information may be missed; if the threshold is set too low, the interference information will be seen, so A universal threshold suitable for all images is difficult to give, so for the above problems, this paper adopts adaptive ideas, including adaptive histogram equalization, adaptive binarization, and adaptive Canny edge detection to meet the application. Need, experiments prove that these algorithms are effective.
The method proposed in this paper can be divided into the following processes: reconstructing the images acquired by the four cameras of the front, rear, left and right of the car to form a panoramic image; image preprocessing, including histogram equalization, binarization and morphology Processing; Canny edge detection and Hough transform, and then using the prior information of the parking line feature in the parameter space to optimize the result, and finally obtain the recognition result. The specific algorithm flow is shown in Figure 1.
1 image preprocessing
Through the four fisheye cameras installed on the front, back, left and right of the car body, the images around the vehicle are collected, corrected by fisheye images, bird's eye view and spliced ​​to form a 360° panoramic view of the vehicle for 4 weeks. ,as shown in picture 2.
The original image thus obtained is inevitably affected by illumination, noise, etc., because the quality of the pre-processing directly affects the effect of post-recognition, so to eliminate irrelevant information in the image, restore useful real information, and enhance relevant information. Detectability and minimize data to improve the reliability of feature extraction, image segmentation, matching and recognition. The image needs to be preprocessed, which is mainly divided into the following steps.
1.1 Adaptive Histogram Equalization
First, the original color is converted into a grayscale image. Considering the influence of illumination, the grayscale distribution is uneven, and the histogram equalization of the grayscale image is required. The basic idea of ​​histogram equalization is to make some kind of mapping transformation on the pixels in the original image, so that the grayscale probability density of the transformed image is evenly distributed, that is, the transformed image is an image with evenly distributed gray scales. This means that the dynamic range of the image gradation is increased, which improves the contrast of the image. However, in the traditional histogram equalization, the gray-scale transform function operation is independent of the position of the pixel. This global processing algorithm has the advantages of simple algorithm and fast calculation speed, but it does the same for all pixels. Processing, ignoring the local features of the image, which results in the loss of useful information in the image after histogram equalization, resulting in loss of image denoising processing and edge detection. Therefore, the contrast-limited adaptive histogram equalization method (CLAHE) is adopted to limit the enhancement of local contrast by limiting the height of the local histogram, thereby limiting the amplification of noise and the over-enhancement of local contrast. As shown in Fig. 3, the effects of histogram equalization and CLAHE on the original grayscale image respectively show that the effect of CLAHE is significantly better than the traditional histogram equalization effect.
1.2 Adaptive Binarization
After the histogram equalization processing on the image, in order to facilitate post-processing, the image needs to be segmented to achieve the purpose of separation of the target and the background. The key to image segmentation is to select the appropriate threshold. The appropriateness of threshold selection directly affects the extraction of information of interest. Here, a local adaptive threshold is used which determines the binarization threshold at the pixel location based on the pixel value distribution of the pixel neighborhood block. The advantage of this is that the binarization threshold at each pixel location is not fixed, but is determined by the distribution of neighboring pixels around it. The binarization threshold of the image area with higher brightness is generally higher, and the binarization threshold of the image area with lower brightness is correspondingly smaller. Local image regions of different brightness, contrast, and texture will have corresponding local binarization thresholds. Figure 4 shows the results after using this method.
1.3 Morphological processing
It can be seen that after the image segmentation is completed, some binary noise is inevitable. For this reason, it is considered to use the morphology to process the image. The basic idea of ​​morphological processing of binary images is to use a pre-defined simple structural element to detect the image, see if the structural element can be filled inside the image, and verify the validity of the method of filling the structural element. The most basic morphological operations are corrosion and expansion, which are mutually dual operations. Corrosion is to change the inner boundary point of the region into the background, and to make the boundary shrink to the inside. In this process, small and meaningless objects will be eliminated; and expansion will change the outer boundary points of the region into object points, making the boundary Expand to the outside.
In order to utilize the structural element B to expand the set A, B can be rotated 180° with respect to the origin to obtain -B, and then the AC is etched by using -B, and the complement of the corrosion result is the desired result.
The input image is first etched and then expanded to have a smoothing function. It is usually used to eliminate small objects, separate objects at slender points, smooth the boundaries of large objects without significantly changing their volume, and the image details are preserved. Figure 5 shows the results obtained by first eroding and then expanding. It can be seen that the binarized image after morphological processing has filtered out some noise to facilitate the next recognition process.
2 Hough transform detection parking line
2.1 Median-based adaptive Canny edge detection
Edge is an important attribute of image features, contains a lot of information, can outline the target object, so edge detection technology is an important analysis method in image processing. The Can ny operator is the most commonly used edge detection method. The steps of the Canny algorithm can be summarized as:
(1) Denoising. Because the Canny edge detection operator is sensitive to noise in the unprocessed original image, it uses a Gaussian template to convolve with the original image, resulting in a slight blur compared to the original image. Thus, a single noise pixel becomes substantially unaffected by Gaussian smoothed images.
(2) Find the brightness gradient of the image. One edge of the image may point in a different direction, so the Canny algorithm uses four templates to detect the vertical, horizontal, and diagonal edges in the denoised image. Using edge detection operators (such as Roberts, Prewitt, Sobel) to calculate the first-order derivatives Gx and Gy in the horizontal and vertical directions, respectively, can obtain the gradient and direction of the edge.
(3) Track the edge of the image and select the hysteresis threshold. Larger brightness gradients are more likely to be considered edges, but in many cases it is not possible to specify a threshold to determine if a gradient is an edge, so Canny uses a hysteresis threshold.
The hysteresis threshold requires two thresholds, high and low. Suppose that the important edges in the image are continuous curves, so that you can track the blurred part of a given curve and discard some noise pixels that have a large gradient but do not form a curve. So starting with a larger threshold, this will identify those convincing edges. Start with the real edge and use the direction information exported earlier to track the entire edge in the image. A low threshold is used for edge tracking so that the blurred portion of the curve can be tracked until it returns to the starting point.
Once this process is completed, a binary image is obtained, with each point indicating whether it is an edge point.
Compared with the use of a threshold, the Canny edge detection algorithm uses two thresholds to make the operation more flexible, but there is still a general problem. If the threshold is set too high, important information may be missed; if the threshold is set too low, the interference information will be It is important to see. It is difficult to give a general threshold problem that applies to all images.
The solution adopted is first to calculate the median median of the image, and then assign a value to the high threshold high_thresh and the low threshold low_thresh according to the following formula, and call the Canny edge detection algorithm to perform edge detection on the image.
High_thresh=0.66×median;
Low_thresh=0.33×median; (4)
Figure 6 and Figure 7 show the classic Canny edge detection and median-based Canny edge detection results, respectively, where Figure 6 is the image that was manually adjusted to the best result, and Figure 7 is the result of using the automatically set threshold. It can be seen that the median-based Canny edge detection algorithm can achieve the purpose of automatic edge detection.
2.2 Hough transform
Hough Transform is an effective method for detecting straight lines and analytic curves. It transforms the binary image into the Hough parameter space, and uses the detection of the extreme points of the parameter space to achieve the detection of the target. The Hough transform can be used not only to detect straight lines in an image, but also to extend the recognition of arbitrary curves, mostly circles and ellipses.
Using the transformation between two coordinate spaces, the Hough transform maps a curve with the same shape in one space to a point at another coordinate space. Therefore, the Hough transform converts the detection problem of the curve to the parameter space. In the detection of the midpoint, the detection task is completed by simple accumulation statistics in the parameter space.
Considering a point (x0, y0) in a Cartesian coordinate system, the general equation of the line passing through the point can be written as
Ï=x0cosθ+y0sinθ (5)
The parameters Ï and θ can uniquely determine a straight line, which is a sinusoid in the Ï-θ space. If the point series of the same straight line in the x-y plane is transformed into the Ï-θ space, the sinusoids pass through a point (Ï', θ'), so the sinusoids do not intersect in other parts of the Ï-θ space. Therefore, when the innumerable points on a straight line in the X-Y plane are transformed into the Ï-θ space, the number of times of (Ï', θ') is infinite, and the number of times after other times is 1. That is, the Hough transform maps a line in the X-Y plane to a point in the Ï-θ space. Therefore, the Hough transform converts the line detection problem into the detection problem of the point in the parameter space, and completes the detection task by performing simple accumulation statistics in the parameter space.
Figure 8 is the initial result obtained by applying the Hough transform to the edge detection map.
It can be seen that the result obtained by the above process has a pseudo parking line, and further optimization of the result is needed. Note that each of the parking lines is double-edge after edge detection. In addition, the two edges are parallel to each other and have a fixed width and approximately equal length, and they all reflect the same parking line. In order to reduce the amount of calculation, one edge can be calculated instead of two edges, where the average of the two edge lines is taken as the actual parking line. The initial recognition result is conditionally limited and optimized based on the above a priori features, and the final recognition result as shown in FIG. 9 is obtained.
3 Experimental results and analysis
The hardware part of the system consists mainly of a fisheye camera, an image processing unit and a display. Due to the limited internal space of the vehicle body, the image processing unit cannot be completed by the PC. Therefore, in this system, the DSP is used to complete the processing of the video image. In the software part, Visual Studio 2008 is used as the development environment, and the OpenCV library is called to complete the implementation of the algorithm. Experiments were carried out to verify the algorithm of 200 parking images in different situations. In the same situation, the method of this paper was compared with the traditional Hough method. The recall rate and recognition rate were used to evaluate the efficiency of the algorithm. It is estimated that the definitions are as follows.
It can be seen from the experiment that the proposed method based on adaptive thinking has a high accuracy and robustness.
4 Conclusion
With the increasingly difficult problem of parking, the application of parking aid system is more and more extensive. This paper proposes a method to automatically identify the parking line by using algorithms such as adaptive edge detection and Hough transform. The algorithm is verified by the actual acquired image, and compared with the traditional method, the high precision and high robustness of the proposed method are verified.
UVC Lamp 253.7nm, different type. quartz material .
Uvc Lamp,Uv Germicidal Bulb,Uv Germicidal Lamp,Uvc Tube
Changxing leboom lighting product CO.Ltd. , https://www.leboomuv.com