Traffic flow based on pavement image feature identification and occupation rate information getting method
Technical field
The invention belongs to intelligent transportation system (ITS) technical field, be specifically related to the letter of a kind of traffic flow and occupation rate
Breath acquisition methods.
Background technology
Along with the expansion of China's urban construction scale, vehicle is increasing, brings the biggest pressure, warp to road traffic
Often there is traffic congestion to occur, can the most accurately obtain traffic information if had, such as vehicle flowrate, occupation rate, as traffic signal
Control, the input of traffic guidance control system, play the effect of traffic guidance, alleviate current traffic pressure.
The method of the information such as traditional acquisition Real-time Road vehicle flow, including using buried induction coil, microwave thunder
Reach and the technology such as video identification for vehicle all exists certain limitation.Ground induction coil detection magnetic flux change is used to have quite
High accuracy, but engineering construction difficulty in actual use, need to destroy road surface, relatively easily damage and safeguard non-
Often difficulty;Additionally, install inconvenience on the road surface of bridge, overpass etc.Use traditional Video Detection identification vehicle main
It is identification based on vehicle basic feature, is easily affected by weather, illumination, night lights, thus accuracy of detection when some
The lowest, false drop rate is high, it is difficult to use as relieved traffic control input parameter.During microwave radar detection slower-velocity target, precision is relatively
Low, and equipment price is higher.
Summary of the invention
It is an object of the invention to provide a kind of traffic flow based on pavement of road characteristics of image identification and occupation rate
Information getting method, in real time, accurately obtains vehicle traveling information in road, as traffic signalization, traffic guidance control
The input of system processed, can reduce traffic entirety and be delayed, improve level of service.
Technical scheme is as follows:
The present invention uses low-light (level) DSP camera (SD or high definition) as collection, arithmetic unit, gathers picture, phase frame by frame
Erecting, in upper pavement surface, Real-time Collection monitored area pavement of road changing features information, utilizes the high speed processing that camera carries
The image gathered is processed by device;For pavement of road characteristics of image, devise BP neural network recognization method and carry out in real time
Identify, by identifying that pavement of road characteristics of image is obtained special bus flow, vehicle average speed by occlusion, coverage condition
With major parameters such as vehicle time occupation rates.
The method to realize step as follows:
Step 1: use low-light (level) high definition or SD DSP camera above carriageway surfacing about 6.0--9.0 rice towards adopting in real time
Collection road surface characteristic picture;
Step 2: obtained the initial data of image by the DM648 processor of camera, after then carrying out image procossing,
To representing pavement strip feature contour binary map;
Step 3: step 2 is obtained the input representing pavement strip feature contour binary map as BP neural network recognization,
Using BP neural network recognization method to calculate, show that whether setting regions road surface characteristic is by occlusion, recursion judges current road
Whether face is with the presence of vehicle;
Step 4: by the vehicle number of setting regions in statistics a period of time, calculates time of vehicle operation occupation rate;Pass through
The counting vehicle time by setting regions, obtain the instantaneous travel speed of vehicle, or be calculated the average speed of a period of time.
4.1 remember to when having covering or have the result blocked from the results change without covering or block according to current road feature
The lower time will be T1, then road surface characteristic have cover or have the state blocked to last till recognition result is changed to without covering or blocking
Time to write down the now time be T2;
4.2 when once road surface characteristic from unobstructed or covered block or cover time, the flow Num of automobile is carried out
Add 1, and this car is at the holding time △ T=T2-T1 through this section section;
The △ T-phase of one minute each interior car is added and to obtain T (unit second) by 4.3, and divided by 60 seconds, the time of being calculated was occupied
Rate Keep:
Keep = T/60 。
4.4 when testing the speed, it is assumed that two target recognition region distances are S, is △ T, then car by the time difference of two target areas
Travel speed is
V=S/△T
Obtain vehicle flowrate Num, time occupancy Keep and Vehicle Speed per minute.
Normally, road surface characteristic (seeing Fig. 6) be usually be made up of the graticule in roadside, including separate graticule, guide arrow,
Deceleration square, Chinese, Arabic numerals etc., also include the pattern that deceleration strip, new-old pavement boundary texture, road surface aberration are formed
Deng.When specifically applying, as the graticule in table 1 is all made up of white straight line and arrow, relative to the asphalt surface of grey black,
These graticule profiles are apparent from, it is the most eye-catching to contrast.In this manner it is possible to utilize the contour feature clearly of pavement strip, carry out
The detection of vehicle.When there is no occlusion graticule when, the pavement strip of collected by camera be linearly with the combination shape of arrow,
When having automobile to block graticule when, the profile that camera extracts is usually the feature of automobile, and the arrow contour feature of graticule
Contrast is clearly.Identify by occlusion or covering, whether pavement strip is detected whether current lane has vehicle, have good
Detection results.
The TI processor of a high speed is had, when camera Real-time Collection road surface inside the low-light (level) DSP camera that the present invention uses
After picture, processor obtains the initial data of image, by gray processing, image enhaucament, seeks the contour feature of image the most again, for
Improving the speed extracting contour feature, present invention uses look-up table, look-up table is by two integers between 0 ~ 255
(pixel value range in gray-scale map is 0 ~ 255), the value being added and subtracting each other, if greater than 255 take 255, take 0 less than 0.?
This value is stored in the array of a prior application, defines the fast table that can search calculating computing.Try to achieve road surface characteristic picture
Profile after use average gray value method, the road surface characteristic picture profile diagram obtained is carried out binaryzation, obtains having representative meaning
The pavement strip contour feature binary picture of the road surface characteristic of justice.
This method have employed BP neural network recognization method, and this is a kind of multilayer feedforword net by Back Propagation Algorithm training
Network, it can store the mapping relations of linear processes between substantial amounts of input and output by study, wherein be not required to
The mathematical formulae of this mapping relations is described.Its learning rules are to use rapid decrease method, by the back propagation of error
Adjust the weights between input layer and hidden layer, hidden layer and output layer, finally calculate the square-error of network, reach to set
Minima i.e. train and terminate.Before identification, manual intervention is gathered automatically the figure that road surface characteristic is not covered by automobile or blocks
One radix of picture that sheet one radix, road surface characteristic are covered by automobile or block, includes daytime, evening, rainy day, fine day respectively
Etc. state.These pictures are carried out picture processing, gray processing, strengthens, seek the binary map of contour feature, be then trained, fixed
The minimum error of justice training weights and maximum frequency of training, draw between input layer and hidden layer, hidden layer and output layer
Weights, keep these weights, as identification computing weights below.When the road surface characteristic figure after binaryzation is through processing
After, transfer the weights above preserved and carry out computing, it is possible to draw the result of road surface characteristic, if having vehicle on current road surface
On.Whether having the result of vehicle according to road surface, add up in a period of time, the vehicle number through the region, road surface of setting is with average
Speed, in the region, road surface of setting, vehicle is through the time occupancy of out-of-date vehicle.
Advantages of the present invention is as follows:
The present invention has the advantage that the interference source to conventional video detection method effectively filters, and both can be used alone and has obtained
Good Detection results, it is possible to traditional virtual coil or video detecting method multiplexing based on model, in any meteorology
Under the conditions of high lifting Video Detection accuracy.
This method have need not destroy pavement of road, low cost, easy to maintenance, can real-time video monitoring, detection accurate
Rate advantages of higher.Additionally, this product up-gradation is easy, gathering algorithm in use can be continued to optimize.
This method can be used for the crossing such as city, high speed, road section traffic volume data acquisition, particularly can solve long-standing problem and hand over
The flimsy shortcoming of messenger control coil, builds significant for smooth city, smart city.
Accompanying drawing explanation
Fig. 1 system and device operating diagram;
The overview flow chart of Fig. 2 present invention;
Fig. 3 image procossing flow graph;
The training flow process of Fig. 4 BP network;
The identification process of Fig. 5 BP network;
Fig. 6 pavement of road feature.
Detailed description of the invention
Below in conjunction with embodiment and accompanying drawing, the present invention is described in further detail, but embodiments of the present invention do not limit
In this.
See Fig. 1, implement the work signal of the present invention for certain crossing, in figure as a example by 3 tracks of standard, by low-light (level)
DSP camera sets up above pavement of road on about 6.5 meters high cross bars, inputs 12v power supply, is connected the power supply at crossing by netting twine
Ethernet switch in switch board, Ethernet switch can connect the optical fiber of wire transmission, or 3G wireless router.
By embedded in the real-time traffic flow amount that the camera that the present invention relates to algorithm obtains, time occupancy and vehicle mean velocity information first
By network cable transmission to Ethernet switch and target machine.According to practical situation, wired fiber-optic transfer, or 3G can be selected
It is wirelessly transferred.Additionally, camera I/O mouth data, RS485 data can by the corresponding interface protocol transmission to signal controlling machine or other should
Use equipment.
At night, or ray relative ratio on daytime is time dark, and low-light (level) DSP phase chance as required, is opened light compensating lamp, given
Road surface light filling, improves the accuracy rate identifying road surface characteristic with this, and smart camera can control the opening and closing of light compensating lamp.
In conjunction with the main-process stream of the inventive method that Fig. 2 shows, when certain track, low-light (level) DSP camera Real-time Collection picture,
Then dsp processor proceeds by image gray processing, image enhaucament, and image quickly seeks profile, and profile diagram carries out binaryzation, will
Binary picture is delivered to BP neutral net and is identified, and draws it is currently whether road surface identification is blocked by automobile or cover, and recursion is sentenced
Whether determine current road with the presence of vehicle.The vehicle number passed through in statistics a period of time, calculates time of vehicle operation occupation rate;Logical
Cross and calculate the time that vehicle passes through, obtain the instantaneous travel speed of vehicle, or be calculated the average speed of a period of time.
It is embodied as step as follows:
Step 1: use low-light (level) high definition or SD DSP camera about 6.0--9.0 rice, to adopt in real time above carriageway surfacing
Collection road surface characteristic picture.
Step 2: after the picture of camera Real-time Collection road surface, DM648 processor obtains the initial data of image, then
After carrying out image procossing, as the input of BP neural network recognization.Handling process such as Fig. 3:
First of all for the operation time of minimizing image, transfer the cromogram of 3 passages to single pass gray-scale map.Image enhaucament
It is able to more highlight the profile of pavement strip in picture, facilitates the segmentation in later stage.Seek the contour feature of image, in order to carry
The high speed extracting contour feature, employs look-up table in program, look-up table is by two integers between 0 ~ 255, phase
The value added and subtract each other, if greater than 255 take 255, take 0 less than 0.This value is stored in the array of a prior application,
Define the fast table that can search calculating computing.After trying to achieve road surface characteristic profile, the pixel average of statistics gray level image, make
Threshold value for binaryzation.Use this threshold value that profile diagram is carried out binaryzation, obtain representing the binary map of road surface characteristic.
Step 3: use BP neural network recognization method to calculate, show that whether setting regions road surface characteristic is by occlusion,
Recursion judges that whether current road is with the presence of vehicle.Process is as follows:
3.1 extract training sample, are identified the weights of road surface characteristic.Sample is divided into positive sample and negative sample, positive sample
Being the road surface characteristic figure not having occlusion, negative sample is the road surface characteristic figure having automobile to block, and sample is manually to gather, sample
Image size is 80x40 (wide 80 pixels, high 40 pixels), number several, the sample size of collection is the biggest, and the effect of identification is more
Good.The positive and negative samples figure collected, peace, according to the image processing flow of step 2, obtains the binary map of road surface characteristic.
The training process of 3.2 BP networks.Such as Fig. 4.
The input of training is the binary map of road surface characteristic obtained in the previous step.It is one group of weights after having trained, is saved in
In txt document.
The identification process of 3.3 BP networks.
The binary map of the road surface characteristic that 3.1 steps are obtained, by carrying out computing with weights obtained in the previous step, passes to hidden
Hiding layer, hidden layer passes to output layer with weights computing again, finally according to output layer, calculates, judges the result of output.Process such as figure
5。
Step 4: the vehicle number passed through in statistics a period of time, calculates time of vehicle operation occupation rate;By counting vehicle
The time passed through, obtain vehicle section travel speed, or be calculated the average speed of a period of time.
Write down to when having covering or have the result blocked from the results change without covering or block according to current road feature
Time is T1, then road surface characteristic have cover or have the state blocked last till recognition result be changed to without cover or block time
It is T2 that time writes down the now time.When once identify graticule from unobstructed or covered block or cover time, the flow of automobile
Num adds 1, and this car is at the holding time △ T=T2-T1 through this section section.By one minute interior each
The △ T-phase of car adds and obtains T (unit second), divided by 60 seconds of one minute, just calculates time occupancy Keep as follows:
Keep = T/60 。
When testing the speed, it is assumed that two target recognition region distances are S, it is △ T, then vehicle row by the time difference of two target areas
Sailing speed is
V=S/△T
Thus obtain vehicle flowrate Num, time occupancy Keep and Vehicle Speed per minute.Acquired results
Can send according to wired or radio transmitting method above, control as traffic lights and the foundation of urban traffic guidance.
The method that this invention relates to can detect target road surface with other video vehicle detection method multiplexing, such as this method
In the presence of feature, can be used as the Rule of judgment passed through without vehicle, particularly use the method at high light, shadow interference time serious
Video Detection capacity of resisting disturbance can be effectively improved.
The invention is not limited in above-mentioned embodiment, if various changes or deformation to invention are without departing from the present invention's
Spirit and scope, if within the scope of these are changed and deform claim and the equivalent technologies belonging to the present invention, then the present invention
It is also intended to comprise these change and deformation.