Method for collecting characteristics in a kind of telecommunication flow information Video Detection
(1) technical field
The present invention relates to a kind of telecommunication flow information video detecting method, the method for collecting characteristics in especially a kind of Video Detection.
(2) background technology
The population in city and vehicle are also in sharp increase, the magnitude of traffic flow strengthens day by day, congested in traffic clogging is on the rise, traffic system is faced with immense pressure, traffic problems have become the subject matter in the city management work, hinder and restricting the development of urban economy construction, become global common issue with gradually.In the face of serious day by day traffic problems, we can not rely on merely, as build and reconstruct road and adopt measures such as signal lamp control to alleviate this situation.
The telecommunication flow information collection is an important step in the intelligent transportation system, and the information of collection comprises vehicle flowrate, the speed of a motor vehicle, vehicle classification, road occupying rate, traffic density, and vehicle queue length, turn inside diameter, vehicle stops or the information of the situation of causing trouble.Since 1970, expert, scholar have developed a lot of traffic information collection equipment both at home and abroad, as velocity radar, annular magnetic test coil, supersonic detector, traffic microwave detector etc.Practical application shows that these several traffic information collection modes have following shortcoming: (1) accuracy of detection and reliability are not high; (2) be not suitable for detecting on a large scale; (3) amount of traffic information of obtaining is less; (4) can't show that vehicle, car plate and traffic scene etc. punish vital information for traffic study and analysis, traffic.Therefore owing to be subjected to the restriction of aspects such as detection range, detectability and reliability, traditional wagon detector can not satisfy the requirement of present traffic system.
Early stage most of video detection technology is to adopt the virtual coil method, as AUTOSCOPE, CCATS, TAS, IMPACTS, TrafficCam etc., its operation principle is similar to buried coil checker, and automobile video frequency tracking at present is the pixel that meets vehicle characteristics in the traffic scene image by identifying, and carries out image segmentation, and the vehicle in the frame before and after mating according to the feature that extracts, thereby calculate traffic parameter.The problem of signature tracking is that vehicle can not guarantee identical in the feature of highway section diverse location because image is subjected to the influence of surrounding environment (as building shade, street lamp).From image sequence, detect movable information, the recognition and tracking moving target is most important and the technology of most critical, what adopt at present is outstanding target or the thought of eliminating background, and inter-frame difference, background difference and three kinds of methods of optical flow method are roughly arranged.
Inter-frame difference, this method has very strong adaptivity, but the choosing the right moment of successive frame of doing difference had relatively high expectations, and depends on the movement velocity of moving object, if movement velocity is very fast and cross all not all right slowly.The calculating of optical flow method is very complicated, if there is not hardware to help, is difficult to satisfy the requirement of system real time.People such as P.Bouthem and D.Murray has also adopted this analysis means to cut apart motion.
Though it is fairly simple that the background difference on the ordinary meaning implements, adaptive ability is relatively poor, and some dynamic variations with some interference can not avoid.The effect that background is eliminated is most important to the realization of whole system.Forefathers have proposed the lot of background elimination algorithm: wherein have based on forecast method, as kalman filter method, wiener filter approaches etc., but this type of algorithm is not considered the application of depth information.Harville[10] etc. the adaptive background elimination algorithm that proposes of people based on mixture gaussian modelling, consider the adaptivity of the degree of depth, colouring information and time, improved the segmentation effect of system, but the operand of algorithm is big, real-time is poor.
(3) summary of the invention
For the deficiency that image is affected by environment easily in the signature tracking that overcomes prior art traffic flow video detection method, real-time is poor, processing speed is slower, the invention provides the method for collecting characteristics in a kind of variation that conforms, real-time, the telecommunication flow information Video Detection that processing speed is fast.
The technical solution adopted for the present invention to solve the technical problems is:
Method for collecting characteristics in the one sharp telecommunication flow information Video Detection, this detection system comprises video camera, signal processor, video camera inputted video image sequence be 1,2 ..., t ..., promptly in the t frame video image, handle i pixel X
I, t[R
I, t, G
I, t, B
I, t] value, the probability density function of k Gaussian Profile is following formula (1):
The probability calculation formula of current pixel point i is formula (2):
This method may further comprise the steps:
(1), the video image of acquisition camera, obtain R, G, B color space image sequence, with medium filtering image filtering is removed and makes an uproar;
(2), the processed images sequence is carried out the conversion of color space, R, G, B color space are changed into brightness space, S (brightness space)=(R+G+B)/3;
(3), set the parameter of mixed Gaussian algorithm, described parameter comprises global context threshold value T, learning rate α, Gaussian distribution model number K, initializes weights ω;
(4), the brightness space of reading images, with the brightness value of first each pixel of the two field picture average as mixed Gaussian, variance is set up single Gaussian mixture model-universal background model for predetermined empirical value;
(5), read the t two field picture, with the existing k of each pixel and this pixel (k<=K) individual Gauss model is compared, and relatively whether following formula (3) is set up:
|X
i,t-μ
k|<2.5σ
k (3);
(5.1) if coupling is upgraded the parameter and the weight of k mixed Gauss model, parameter comprises expectation, variance, referring to following formula (4), (5), (6):
μ
t=(1-ρ)μ
t-1+ρX
t (4)
σ
t 2=(1-ρ)σ
t-1 2+ρ(X
t-μ
t)
T(X
t-μ
t) (5)
ρ=αη(X
1|μ
k,σ
k) (6);
(5.2) if do not match, and k<K, increase the Gauss model of t two field picture, new Gauss model distributes and gets X
I, tValue be average, variance, weights omega are empirical value;
(5.3) if do not match, and k=K, replacing the minimum Gaussian Profile of weight in K the Gauss model distribution with new Gaussian Profile, new Gauss model distributes and gets X
I, tValue be average, variance, weights omega are empirical value;
(5.4), the more new formula of weights omega is (7):
ω
k,t=(1-α)ω
k,t-1+α(M
k,t) (7)
In the following formula, ω
K, tBe current weight, α is a learning rate, ω
K, t-1Respective weights for previous frame; M
K, tBe the coupling quantized value, if coupling: M
K, t=1, if do not match: M
K, t=0;
(6), background model and the present image of setting up carried out the absolute value difference, extract the feature of moving target, obtaining vehicle ' s contour, tracking parameter through processing.
Further, in described (6), the feature of extracting moving target comprises:
(6.1), calculate the area of moving region: the length of side of establishing square pixels is h, the area S computing formula following (8) of regional A:
In the following formula, point (x, y) belong in the regional A have a few;
(6.2), center, zoning: according to the center of gravity that calculates a little following (9), (10) in the All Ranges A:
(6.3), calculate the length and the width of moving target: the minimum boundary rectangle MER that uses object, the border of object is with the increment rotation of predetermined angle, behind increment of each rotation, rectangle MER with a horizontal positioned comes its border of match, note minimum and maximum X, the Y value of rotation back boundary point, area as MER reaches minimum value, and described MER size can be the length and the width of target.
Further again, in described (6), the feature of extracting moving target also comprises:
(6.4), bending moment not: (x y), calculates with all points that belong in the zone, if limited point on the XY plane is non-vanishing continuously and only in its segmentation, judges that its each rank square exists for the digital image function f.
Further, in described (6), extract before the feature of moving target, earlier to moving image binary conversion treatment and image expansion, corrosion, dilation operation is an aperture of filling up the target area, and all background dots that will contact with object merge to the process in this object; Corrosion is to remove isolated noise foreground point, eliminates all boundary points of object; Obtain the profile of moving vehicle, it is kept in the profile attributes of self-defined structure body.
In described (3), all background threshold T gets T=0.7, the general span of learning rate α [0.01,0.001], and the general span [3,5] of K, initializes weights ω gets ω=0.05.
Operation principle of the present invention is: the luminance component in using covariance matrix, because interference of noise is bigger to the colourity informational influence, and it is smaller to the monochrome information influence, sacrifice chrominance information, the real-time of whole Traffic Flux Information Detection system improves greatly, but little to the influence of target extraction, by current image frame and background model are carried out difference, thereby obtain the accurate movement vehicle target, handle and image expansion by image binaryzation, corrosion, obtain the profile of moving vehicle, extract region area, regional barycenter, the minimum boundary rectangle (MER) of vehicle ' s contour and bending moment not, by control to region area, differentiating moving object is human body or vehicle, or other disturbance factor, the regional barycenter of extraction, the minimum boundary rectangle (MER) of vehicle ' s contour and not bending moment realize the detection and tracking of moving vehicle real-time and effective.
Beneficial effect of the present invention mainly shows: 1, the variation that can conform can overcome Changes in weather rainy, that mist is arranged and light variation slowly; 2, the computational speed of algorithm is fast, real-time is high, and the per second kind can be handled 16~17 frames; 3, simple to operate; 4, by video detection technology, detect the road traffic stream information in real time, detect road traffic condition, recording traffic flow data and road traffic condition information.
(4) description of drawings
Fig. 1 is the system flow frame diagram of method for collecting characteristics in the telecommunication flow information Video Detection.
Fig. 2 is based on the flow chart that improves mixed Gaussian background model collection apparatus.
(5) embodiment
Below in conjunction with accompanying drawing the present invention is further described.
With reference to Fig. 1, Fig. 2, method for collecting characteristics in a kind of telecommunication flow information Video Detection, this detection system comprises video camera, signal processor, following each processes pixel of narrating all is a series of under fixed cameras, and the inputted video image sequence is { 1,2, t ... promptly in the t frame video image, handle i pixel X
I, t[R
I, t, G
I, t, B
I, t] value, wherein the probability density function of k Gaussian Profile is formula (1):
The probability calculation formula of current pixel point i is formula (2):
This method for collecting characteristics may further comprise the steps:
(1), get R, G, B color space image sequence, comprise noise signal certainly, with medium filtering image filtering is removed and make an uproar from the high resolution CCD video camera.Medium filtering is a kind of way commonly used of removing the image random noise, makes an uproar because in the traffic flow image, use low-pass filtering to remove, because edge contour contains a large amount of high-frequency informations, so, in the time of filtered noise, the border is fogged; Use high-pass filtering, in filtering, noise also has been reinforced, so suppress noise signal with the median filtering method in the spatial alternation, suppresses the noise in the image and has kept the clear of profile.
(2), the processed images sequence is carried out the conversion of color space, R, G, B color space are changed into brightness space, S (brightness space)=(R+G+B)/3.
(3), set the parameter of mixed Gaussian algorithm, described parameter comprises that global context threshold value T (having determined background distributions model number) generally gets T=0.7, the general span [0.01 of learning rate α, 0.001], here get α=0.005, the general span [3,5] of K, the value of K is big more, system can characterize complicated more scene, but the corresponding calculated amount increases, and this algorithm is got K=3, initializes weights ω generally gets a less value, assignment ω=0.05.
(4), the brightness space of reading images, with the brightness value of first each pixel of the two field picture average as mixed Gaussian, variance is given a bigger value, what generally give also is empirical value, here our assignment σ=20; Set up single Gaussian mixture model-universal background model (initialization of mixed Gauss model).
(5), read the t two field picture, with the existing k of each pixel and this pixel (k<=K) individual Gauss model is compared, and relatively whether following formula (3) is set up:
|X
i,t-μ
k|<2.5σ
k (3);
(5.1) if mate, then upgrade the parameter and the weight of k mixed Gauss model.Parameter comprises expectation, variance, referring to formula (4), (5), (6):
μ
t=(1-ρ)μ
t-1+ρX
t (4)
σ
t 2=(1-ρ)σ
t-1 2+ρ(X
t-μ
t)
T(X
t-μ
t) (5)
ρ=αη(X
t|μ
k,σ
k) (6)
(5.2) if do not match, and k<K, increase-individual Gauss model, new Gauss model distribute and get X
I, tValue be average, give bigger variance (empirical value) that we get σ=20, less weights ω=0.05 here.
(5.3) if do not match, and k=K, the minimum Gaussian Profile of weight replaced with new Gaussian Profile.The value of average and variance is the same.
(5.4), the more new formula of weights omega is (7):
ω
k,t=(1-α)ω
k,t-1+α(M
k,t) (7)
In the following formula, ω
K, tBe current weight, α is a learning rate, ω
K, t-1Respective weights for previous frame; M
K, tBe the coupling quantized value, if coupling: M
K, t=1, if do not match: M
K, t=0; Learning rate α wherein, if the α value is bigger, the ability that changes of conforming is more intense, what the background of change was very fast is dissolved in the background model, but affected by noise easily.If the α value is smaller, the ability that conforms is lower, temporary transient static object can be thought that the background that changes is dissolved into background model.
Read a new frame, repeat (5.1)~(5.4) step, set up the Gaussian Profile of background model.
(6), background model and the present image of setting up carried out the absolute value difference, extract the feature of moving target, obtaining vehicle ' s contour, tracking parameter through processing.
Earlier foreground target is carried out binary conversion treatment and image expansion, corrosion.Dilation operation is an aperture of filling up the target area, and all background dots that will contact with object merge to the process in this object.Corrosion is to remove isolated noise foreground point, eliminates a kind of process of all boundary points of object, by these two kinds of morphologic processing, obtains the more accurate profile of moving vehicle, and it is kept in the profile attributes of self-defined structure body.
By the extraction to target, we have just obtained interested target, also need clarification of objective is extracted and described.Present target signature can be divided into gray feature, textural characteristics and geometric properties.Introduce several features that adopt when native system is followed the tracks of below:
1) region area
Region area is an essential characteristic in zone, and he describes the size in zone, and the length of side of establishing square pixels is h, then the computing formula of its area S following (8):
Point (x, y) be belong in the regional A have a few.Can be by calculating the area of moving region, judge that whether moving target is disturbing factors such as non-vehicle, with crossing the width of judging moving vehicle, detects overlapping vehicle.When moving vehicle area the time, judge that then vehicle rolls the effective coverage away from less than certain threshold value.
2) regional barycenter
Regional barycenter is a kind of global description symbol, and the coordinate of regional barycenter is to calculate according to all points that belong to the zone, although always the coordinate integer of regional each point, but the coordinate Chang Buwei integer of regional barycenter.Relative with each interregional distance when very little in size of zone itself, the particle that the zone can be used for barycentric coodinates is similar to representative.
According to the center of gravity that calculates a little following (9), (10) in the All Ranges A:
3) length and width
Calculating it after an object extracts from a sub-picture is easier in the span of level and vertical direction, as long as know that the minimum and maximum ranks of object are number just passable, but for the object that moves at random, level is interested direction with vertical and the top of differing. can use the minimum boundary rectangle (MER) of object in this case.
Use the MER technology, the border of object rotates to 900 with about 30 increment, behind increment of each rotation, MER with a horizontal positioned comes its border of match, in order to calculate needs, only need note minimum and maximum X, the Y value of rotation back boundary point, in certain anglec of rotation, the area of MER reaches minimum value.At this moment the size of MER can be used for representing the length width of this object.The MER anglec of rotation hour has been drawn the major axes orientation of this object.This technology is particularly useful for the object of rectangular shape, can provide satisfactory result for vehicle detection.Overlapping when vehicle, when movement velocity is too fast, when the moving vehicle profile is followed the tracks of, the mathematical feature of target is mated, can effectively improve the precision of tracking.
4) bending moment not
The square in zone also can be used as feature and considers on the plane of delineation, and (x, y), if limited point on the XY plane is non-vanishing continuously and only in its segmentation, then provable its each rank square exists for the digital image function f.The square in zone is to calculate with all points that belong in the zone, thereby not too is subjected to the influence of noise etc.
(7), extract the profile, center of gravity, area, minimum boundary rectangle (MER) of object and displacement not, these several key characters leave them in the self-structure body in,
(8), repeat (5)~(7) if new moving vehicle is arranged.
Use improved mixture gaussian modelling to come the feature of each pixel in the phenogram picture frame, the feature that characterizes only adopts brightness, if there is not moving target (vehicle) to exist, then video image is static relatively, each pixel changes in time all obeys certain statistical model, and each pixel is characterized by the mixed model of K Gaussian Profile in this algorithm.When obtaining new picture frame, upgrade mixture gaussian modelling, if the pixel of present image and mixture gaussian modelling are complementary, judge that then this point is a background dot, otherwise judge that this point is the foreground point.Background model and the present image set up are carried out the absolute value difference, the absolute value difference can prevent overflowing of pixel, the white point that image occurs, the better controlled noise, obtain more accurate vehicle ' s contour through handling, parameter with needs are followed the tracks of can reach good effect in the detection of the vehicle numeration and the speed of a motor vehicle.