• No results found

Research of Traffic Flow Based on SVM Method

N/A
N/A
Protected

Academic year: 2020

Share "Research of Traffic Flow Based on SVM Method"

Copied!
6
0
0

Loading.... (view fulltext now)

Full text

(1)

2017 2nd International Conference on Artificial Intelligence: Techniques and Applications (AITA 2017) ISBN: 978-1-60595-491-2

Research of Traffic Flow Based on SVM Method

Deng-hong YIN, Jian WANG

and Bo LI

*

School of Aeronautics and Astronautics, University of Electronic Science and Technology of China, Chengdu, 611731, China

*Corresponding author

Keywords: Component, Formatting, Style.

Abstract. The traditional detection method for traffic flow would be not accurate because the shapes of the new style lights of the new vehicles. A new method combined Enhanced binarization method with SVM (Support Vector Machine) Machine learning mode is proposed to improve the accuracy of the recognition scheme of the headlights. Through the introduction of machine learning program can achieve higher accuracy for detecting lights, which has great accuracy and significance in traffic guidance, lighting systems.

Introduction

In recent years, many scholars have done a lot of researches on the detection of night traffic flow from hardware software, and put forward many good ideas. However, hardware improvement costs are too high, so many scholars focused on the software, through improved detection algorithm to achieve better results, night traffic flow detection algorithm research focused on two directions [1,2]:

(1) Eliminating the nighttime light disturbance. (2) To extract the characteristics of the vehicle.

The former is richer, but the brightness of the street lights is required, and algorithm is complex [3]. The second program is simple, fast, real-time, and it can meet the traffic flow fuzzy controller accuracy requirements. In this paper, the second option is used to detect the night traffic flow[4].

First, the traffic flow tests the image returned by the camera to determine the traffic flow. Second, we need grayscale images. Third, binarization process the pictures, which can retain useful information, remove the noise information. Afterwards, the traditional scheme do the morphological processing after processing the image. According to the circular degree of index information, if spot the circular degree is within a certain range, the spot is lights. It eliminates false lights and makes the lights matching and detecting traffic flow. But morphological processing of the image in the process, the information of picture has changed, the change in the lights and noise make the roundness of the matching produce error. This paper uses enhanced binarization to deal with grayscale images. To improve the accuracy, using a type corrosion morphology processing operation, then adopting SVM (Support Vector Machine) make machine learning, and then lights matching and traffic detection.

Traffic Detection

Car Headlamp Extraction

The pre-processing operation of images includes grayscale, binary and image morphology.

Grayscale images can reduce storage space and improve computing speed. A lot of studies show that when the weights of the RGB components are 0.299, 0.587 and 0.114, the result is closest to human vision[5]. Therefore, the gray scale conversion formula is:

) , ( 114 . 0 ) , ( 587 . 0 ) , ( 299 . 0 ) ,

(i j R i j G i j B i j

(2)

The binarized image is an index image with only black and white colors. In binarization process, firstly need to set the threshold.In next image processing, when the brightness of the image is higher than the threshold, the point is white, with 1, opposite is black, with 0. The binarization formula is:

 >

= 

' 1 ( , ) 1

( , )

0 ( , ) 1

f i j g f i j

f i j g (2)

f '(i, j) is the pixel value of the binary image of f (i, j), g1 (generally set 225) is threshold value,

which depend on area of the extracted lamp.

However, Different thresholds can lead to different results [6]. Therefore, we propose enhancement algorithm about binarization processing for integrity of the light data.

1. Using threshold g1(225 usually is used), general binary image processing methods to deal with the image, tomark suspected lamp light source, to record center, suspected lights is that the area once more than 6 * 6 Pixel is a suspect.

2. Set the second threshold g2 (g2 < g1, 200 is used by g2). Following the first step, look for according to the threshold of g2 suspected points after processing.

3. Merged the image. Combining the results of step 1 and step 2 to get the doubtful points. After binarized image, the obtained image can be morphologically manipulated, dealing with morphology and operation [7]. When dealing with the binary image regarded as a collection, and using of geometric knowledge for expression, analysis and other operations. Operation is the structural elements and binary images between the collections operate, to simplifying the image information, but retain the original shape features.Therefore, this paper proposes a kind of corrosion scheme. For the matrix obtained above, suspected part of the lamp is not processed, just other parts of corrosive operated.It removes noise and don’t required for subsequent expansion operations.

[image:2.612.155.461.494.589.2]

SVM method is based on statistical learning theory, which mainly is VC dimension theory and structure risk minimum principle,according to the limited sample information in the complexity of the model and find the best compromise between the ability to learn, in order to get the best generalization ability [8]. SVM classification prediction flow chart shown in Figure 1 when machine learning, first all data was preprocessed, second is divided into two classes, the data is divided into two categories: test data and training data sets, training data set is used for training. Test data sets are used to test the results of the training. In the training, the timely adjustment of the relevant parameters, getting the optimal model, then use the test data for effect detection.

Figure 1. SVM Classification Prediction Flow Chart.

SVM can not only solve the nonlinear problem, but also avoid the local minima problem of neural network [9]. This paper uses SVM support vector machine to classify the processed image matrix.

Machine Learning to Process Images

Firstly, obtaining 70 photos does grayscale and binarization, the car light detection. When the pictures are collected, it is possible to cover more modeling lights and interference.

(3)

more accurate. And even if the car lights shape change, as long as the training to join, you can also ensure the accuracy of classification.

Vehicle Traffic Identification Scheme

After the picture of the SVM machine learning machine recognition, the lights are one of the isolated lights, so the need to match the lights, and carry out the traffic calculation work.

1. The adjacent two lights if the same car, then the horizontal distance of the lights should be less than W / n,W is the lane width, n is the number of lanes, vertical distance should be less than H/m, H is the image of height, and m is the current image can accommodate the number of vehicles.

2. Difference of the same car two lights should be less than a certain thresholdτA,the slope be less

than a certain thresholdτY , when multiple headlights meet the requirements, choose the two lamps that meet the requirements[10].

If the two car headlights Ci and q belong to the same car headlight set Csk, should meet the following relationship:

The same car two car headlights target should be in the same horizontal line, the size of similar size, and adjacent and similar shape, τA, τY should be small enough.

Y C C C

Ci bi tj bj

t τ < − − − 2

2 ; A(Ci)− A(Cj) < τA (3)

If the adjacent two target of light Ci and Cj belong to the same car headlamp, its horizontal distance is Dh and the vertical distance is Dv to meet the following conditions:

)]

(

),

(

min[

)

(

j i j i

h

C

C

W

C

W

C

D

<

;

)])

(

),

(

(min[

0

.

2

)

,

(

j i j i

v

C

C

L

C

L

C

D

<

×

(4)

Traffic Flow Calculation

Firstly, the data structure involved in the algorithm is constructed. The data structure contains CarLamp (x, y, Area, ReN, LaN, isLamp, isFalse) T. x, y represent the center of the lights;

(

)

(

)

1 2 1 2 1 2 1 2

x x x

y y y

= +

 

= +

 (5)

If only one light, center of the light is the center of the lights. Area is the area of the lamp, ReN represents the times of identification, the initial value is 1; LaN represents the number of lights, the default is 2, but there is a motorcycle or vehicle side of the car is damaged, the value may be 1.

The traffic flow detection follow the algorithm:

The values required in the data structure are calculated.

Using current frame to match the previous frame, the matching has two perspectives, one is the Areaj-Areai <threshold & LaNj = LaNi, the matching is considered successful. It need to match the spot for center x, y value. If the value of x, y are changed, updating the ReN value in this frame data structure, add 1; If the value is more than 5, it is considered that the light is a car's lamp, and isLamp set 1, total number of vehicles add 1. If you cannot find a match in the previous frame, please think the car is new. If spot is unchanged at 5 consecutive frames, then spot is marked error and isFalse set 1.

(4)

Verification

Follow the above process of model, the traffic flow can be accurately detected.

1. In formula(1), R (I, j), G (I, j), B (I, j) are the R, G, B channel components of the input image f (I, j), Ig (I, j) is transformed image. The original image and the converted image are shown in Figure 2, (a) is original; (b) is processed:

[image:4.612.79.515.79.382.2]

(a) (b)

Figure 2. Original Image and Gray Image.

[image:4.612.106.505.399.500.2]

2. The original image after gray processing, converted into binary images as shown in Figure 3.

Figure 3. Original Image and Gray & Binarization Image.

3. After enhancement algorithm about binarization processing, you can get Figure 4, (a) is the normal binarized image, (b) is the image subjected to enhanced binarization:

(a) (b)

Figure 4. Normal Binarization and enhanced binarization.

4. After gray processing and enhancing the binarization processing, the results of corrosion shown in Figure 5. (a) is before the corrosion operation, (b) is performed corrosion operations:

(a) (b)

Figure 5. No Corrosion and Corrosion.

[image:4.612.106.509.512.646.2]
(5)
[image:5.612.95.518.67.183.2]

Figure 6. SVM Classification of lights & distractions and the lower left corner of partial enlargement of the former.

6. As shown in Figure 7, the left image is the original image, and the right image is the image obtained by matching the lights:

Figure 7. The Headlights Match the Image.

Summary

In this paper, grayscale and threshold binarization are used to capture the image. The binarization enhancement algorithm and the class corrosion method are used to preprocess the image. Finally, SVM support vector machine is used to divide the lights, eliminate interference, and finally match and statistics of night traffic flow. The result is satisfactory.

Acknowledgement

This work is supported by Science & Technology Department of Sichuan Province under Grant 2016GZ0312.

References

[1] Xiao-dong Chen, Research on Key Technologies of Expressway Safety Early-warning System Based on Traffic Flow Theory, Jilin University, 2011.

[2] Zhi-wei Wu, The Research of Vehicle Flow Detection Technology Based on Video, South China University of Technology, 2012.

[3] Editorial Department of China Journal of Highway and Transport. Editorial department, Review on China's Traffic Engineering Research Progress. 2016[J], Editorial Department of China Journal of Highway and Transport. 2016.(06):1-161.

[4] Qi Tian, Vehicle Positioning Method at Night Based on Headlamp [J], Journal of Transport Information and Safety, 2010, 2(28):58-60.

[5] Bo Liu, He-qin Zhou, Ming-xu Wei, Vehicle Detection at Night Using Color and Motion Information[J], Journal of Image and Graphics, 2005, 10(2): 187-191.

[image:5.612.140.476.238.326.2]
(6)

[7] Hai-long Zhang, Research on the New Energy Development in China, Jilin University, 2014.

[8] Yi-chao Feng, Vehicle Detection and Tracking Based on Night Traffic Video[D], Beijing Jiaotong University, 2016.

[9] Peng-fei Li, Research on Night Vehicle Flow Detection Based on Video [D], Northwest Normal University, 2015.

Figure

Figure 1. SVM Classification Prediction Flow Chart.
Figure 2. Original Image and Gray Image.
Figure 6. SVM Classification of lights & distractions and the lower left corner of partial enlargement of the former

References

Related documents

Reporting. 1990 The Ecosystem Approach in Anthropology: From Concept to Practice. Ann Arbor: University of Michigan Press. 1984a The Ecosystem Concept in

The Asia Tour: Tokyo Dental College (Japan), Korean Dental Society (Korea), National Kaohsiung Medical College, National Tainan Medical College (Republic of China), Hong

Insurance Absolute Health Europe Southern Cross and Travel Insurance • Student Essentials. • Well Being

A number of samples were collected for analysis from Thorn Rock sites in 2007, 2011 and 2015 and identified as unknown Phorbas species, and it initially appeared that there were

The Lithuanian authorities are invited to consider acceding to the Optional Protocol to the United Nations Convention against Torture (paragraph 8). XII-630 of 3

Because the most important feature in inducing habit behavior is the reward, in the case of abuse of analgesics by chronic headache sufferers the main question is: does the reward

The findings of the paper show that by involving local stakeholders in addressing structural and socio-cultural barriers to women ’ s free access to FP, programs can posi-

There are eight government agencies directly involved in the area of health and care and public health: the National Board of Health and Welfare, the Medical Responsibility Board