CN103295017A - Vehicle type identification method based on road videos - Google Patents
Vehicle type identification method based on road videos Download PDFInfo
- Publication number
- CN103295017A CN103295017A CN2013101479659A CN201310147965A CN103295017A CN 103295017 A CN103295017 A CN 103295017A CN 2013101479659 A CN2013101479659 A CN 2013101479659A CN 201310147965 A CN201310147965 A CN 201310147965A CN 103295017 A CN103295017 A CN 103295017A
- Authority
- CN
- China
- Prior art keywords
- vehicle
- image
- neural network
- highway
- frame
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Image Analysis (AREA)
Abstract
The invention relates to a vehicle type identification method based on road videos. Road video image sequence frames are preprocessed, an obtained background image of an operation environment of a vehicle is analyzed, a difference operation is conducted on a video sequence image to be processed and the background image so that a moving vehicle outline in the image to be processed can be extracted, three geometric characteristics of the area, the circumference and the length-width ratio of an outline circumscribed minimum rectangle are calculated, and after the geometric characteristics are input into a trained neural network, a vehicle type identification result corresponding to the geometric characteristics can be output by the neural network. The vehicle type identification method based on the road videos can identify the vehicle type corresponding to the vehicle image obtained at different shooting angles.
Description
Technical field
The invention belongs to technical field of traffic control, be specifically related to a kind of motor vehicle model recognition methods based on computer vision storehouse image processing techniques.
Background technology
Chinese patent CN200910308609 discloses a kind of method that adopts image processing techniques to carry out vehicle identification, its formation comprises that vehicle length in the computed image occupies the ratio of equidirectional the above image length, obtain the physical length of described vehicle according to physical length after the demarcation of this ratio and described equidirectional the above image length, and the step of determining vehicle according to the physical length of this described vehicle, finally by this parameter of length vehicle is measured, when length or ratio during at setting range, determine that vehicle is a certain vehicle, this method weak point is in order to obtain the length of vehicle, the shooting angle of video camera is strict when obtaining vehicle image, such as needing vehicular sideview to face video camera in this method, limited to the scope of application of these class methods.
Summary of the invention
Order of the present invention overcomes deficiency of the prior art exactly, and a kind of model recognizing method applicable to multiple highway video capture angle is provided.
The present invention is achieved in that at first frame by frame the picture frame in the highway video sequence being carried out gray processing handles and the medium filtering denoising, adopt the background image that obtains the vehicle operating environment the image sequence of adaptive background update algorithm after handling, extract moving vehicle profile in the pending image by the pending picture frame in the video sequence and background image being carried out calculus of differences, when vehicle ' s contour arrives assigned address in the picture along with carrying out frame by frame of video sequence, calculate the area of the external minimum rectangle of this vehicle ' s contour, three kinds of geometric properties of girth and length breadth ratio, make up three layers of BP neural network of 3-8-3 type structure, with the geometric properties of multiple vehicle ' s contour as the input sample, with the vehicle of every kind of vehicle ' s contour correspondence as output sample, the BP neural network is trained, can make neural network have higher vehicle accuracy of identification through repeatedly training, after the up-to-date vehicle ' s contour geometric properties that collects imported trained neural network, neural network was namely exported corresponding vehicle recognition result.The vehicle that this method can be identified has little visitor, little goods, middle goods, bulk production, especially big goods, container, pulls and 8 kinds of bus, wherein neural network has learning functionality, for the highway video sequence under the different shooting angles, wherein geometric properties sample and the vehicle sample of vehicle ' s contour are trained neural network by obtaining, can make neural network possess the function of identification vehicle equally, therefore model recognizing method proposed by the invention can adapt to multiple highway video capture angle.
Description of drawings
Fig. 1 is the realization flow figure that the present invention is based on the motor vehicle model recognition methods of highway video image processing;
Fig. 2 is three layers of BP neural network model structural drawing that the present invention makes up;
Fig. 3 is the BP neural metwork training process flow diagram flow chart that the present invention adopts.
Embodiment
The specific embodiment of the present invention is as follows:
From 24 the true color monitoring images of traffic monitoring video camera with a certain highway section of speed acquisition highway of per second 25 frames, be stored as the video file of AVI form through overcompression as the material that extracts vehicle information by video frequency collection card; Be traffic image with each two field picture in the video, the application image treatment technology to traffic image analyze extract vehicle information overall procedure as shown in Figure 1, be divided into image pre-service, background image extract renewal, vehicle ' s contour feature extraction, based on four steps of vehicle classification of neural network.
The image preprocessing process comprises image gray processing and image denoising.Image gray processing is to constituting the R(redness of pixel color in 24 true color images), the G(green), the B(blueness) three kinds of primary color components are weighted average calculating operation,
Gray=0.298R+0.587G+0.115B
Obtain this pixel color corresponding gray scale value Gray through computing, gray-scale value is represented by 8 bits, has reflected the monochrome information of pixel.
Adopt medium filtering to carry out image denoising, implementation method is that 8 gray values of pixel points except object pixel in 3 * 3 scopes around the object pixel are arranged in sequence according to from big to small order, gets the gray-scale value that mediates in this sequence as the gray-scale value of target pixel points.
Adopt the adaptive background update algorithm to extract background image in the traffic monitoring picture, implementation method is that the time shaft according to video file progressively upgrades image background, and first frame of selecting video sequence is as original background frame, i.e. Acc
X, y(0)=f
X, y(0), suppose that traffic image when pre-treatment is the N frame in the video sequence, then has:
F in the formula
X, y(N-1) be the former frame of present image, x, y are respectively horizontal stroke, the ordinate of pixel position in the image, image with 320 * 240 resolution is example, the span of x is the integer between [0,319], and the span of y is [0,239] integer between, α is the weighted value of every frame, the former frame image f of current traffic image in the formula
X, y(N-1) shared ratio is 1-α in upgrading the background equation, adopts adaptive algorithm to obtain new background image Acc
X, y(N) weighted mean of the background image of selecting before being, parameter alpha is model context update speed in the formula, span is between (0,1).
Adopt the background subtraction point-score to carry out the vehicle ' s contour feature extraction, implementation method is to carry out calculus of differences through after the pre-service with background image with the current frame image in the video, obtains moving vehicle zone in the image; Suppose to establish the m two field picture and be positioned at that (x, the grey scale pixel value of y) locating is f
m(x, y), background image (x, the grey scale pixel value of y) locating be b (x, y), then the background subtraction point-score can be expressed as:
d(x,y)=|f
m(x,y)-b(x,y)|
Equally to pixel grey scale difference d (x y) carries out the binaryzation that threshold value is T, and the span of T is the integer between [0,255], then has:
In the image that finally obtains, the target vehicle zone is marked as white, and other zones are marked as black; Extract the minimum boundary rectangle upper left side apex coordinate (x in target area
1, y
1) and lower right apex coordinate (x
2, y
2), then the area of target area is (x
2-x
1) (y
2-y
1), girth is (x
2-x
1)+(y
2-y
1), length breadth ratio is
Neural network is three layers of BP neural network, and its model structure as shown in Figure 2.Three layers of BP neural network comprise input matrix 1, input layer 2, hidden layer 3, output layer 4 and output matrix 5 according to functional unit, each node layer number of neural network adopts the 3-10-3 structure, wherein P1, P2, P3 are input layer, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13 are hidden node, P14, P15, P16 are the output layer node, the input and output of all nodes are floating number, each node of output layer is output as 0 or 1 in theory, the combination of three output nodes can be represented eight kinds of results, represents a kind of in eight kinds of vehicles respectively; Input layer to hidden layer and hidden layer to the transfer function between the output layer selected according to identification vehicle kind, selectable function has radially basic transition function etc. of state of conflict transport function, threshold-type transport function, symmetric thresholds type transition function, S type transition function, linear positive transition function, linear transmission function, radially basic transition function, saturated linear transmission function, saturated symmetrical linear transmission function, flexible maximal value transition function, tanh S type transition function, triangle, adopts nonlinear interaction function S igmoid function here.
Neural network needs many group different automobile types and corresponding geometric properties thereof to train as feature samples, totally 80 groups of feature samples, comprise all vehicle classifications, every kind of vehicle classification comprises the geometric properties of 10 groups of different vehicle, before neural network is trained, at first the geometric properties in the feature samples is carried out normalization, suppose that i data are x in a certain feature samples
i, the maximal value of data is x in this feature samples
Max, minimum value is x
Min, x then
iThe normalization result
For:
The normalization result all is between [1,2], can guarantee the arithmetic speed of three layers of BP neural network.
Three layers of BP neural metwork training flow process as shown in Figure 3, V, W are respectively the weight matrix of BP neural network hidden layer and output layer among the figure, p is the sample size counter, q is the frequency of training counter, E
AlwaysBe the global error of exporting behind all sample input neural networks of sample training process,
E
MinBe the target error precision of setting.
Hidden layer output vector O1[i wherein] be the vector of hidden layer output behind the sample input neural network, i is identical with the neural network the number of hidden nodes, i.e. i=10; Output layer output vector O2[j] be the vector of output layer output behind the sample input neural network, j is identical with neural network output layer node number, i.e. j=3.
Initial weights are random number before each node layer training of neural network, each layer of change weights in training process, final purpose is to make the weights of each layer can guarantee neural network output resultant error minimum, so the training process of neural network just remodifies the process of weights; Output layer weights index word ChgO[j] computing formula be:
ChgO[j]=O2[j]·(1-O2[j])·(y[count][j]-O2[j])
Y[count wherein] desired result that [j] should export for neural network, count is sample size herein.
Hidden layer weights index word ChgH[i] computing formula be:
temp=temp+W·ChgO[j]
ChgH[i]=temp·O1[i]·(1-O1[i])
Wherein temp is intermediate variable, and W is current output layer weight matrix.
According to output layer weights index word and hidden layer weights index word output layer and hidden layer weights are made amendment, computing formula is as follows:
W
Newly=W+aO1[i] ChgO[j]
V
Newly=V+ax[count] [j] ChgH[i]
W
Newly, V
NewlyBe respectively amended output layer weight matrix and hidden layer weight matrix, x[count] [j] for importing sample, a is the learning rate of neural metwork training, gets a=0.1 herein.
When the shooting angle of vehicle image changes, still can realize the purpose of vehicle classification after with the vehicle feature samples of vehicle under the new shooting angle BP neural network being trained.
Be a specific embodiment of the present invention below
The image gray processing processing procedure, pixel 24 bit representations in the coloured image, namely R, G, B are each 8, can be expressed as a colour element: (B)=(118,20,45), then this pixel is carried out gray processing according to following formula for R, G:
Gray=0.298R+0.587G+0.115B
The computing formula that obtains this grey scale pixel value is 0.298 * 118+0.587 * 20+0.115 * 45=62, and then the gray scale result that represents with 8 bit data of this pixel is 62, represents the gray-scale value of this pixel; All pixels in the image are handled equally, namely obtained the gray processing result of image.
The medium filtering denoising process of image selects for use the interior grey scale pixel value of 3 * 3 scopes as filter window, and is as shown in the table:
Each lattice in the form represent a pixel, totally 9 pixels in 3 * 3 scopes, No. 5 pixels that are positioned at the centre position are carried out medium filtering to be handled, the gray-scale value of 1 to No. 9 pixel is sorted from small to large, that is: 12,20,26,29,32,32,34,62,195, get the gray-scale value 32 that is positioned at the centre position in this sequence as the gray-scale value of No. 5 pixels, as shown in the table:
All pixels in the image are carried out same treatment one by one, can realize the medium filtering denoising purpose to image.
The background extracting process adopts the adaptive background update algorithm to extract complete highway background image from video sequence.
Carry out calculus of differences by picture frame and background image, just the grey scale pixel value with same position in picture frame and the background image carries out subtraction, absolute value with the difference of each position of resulting image is depicted as new image as gray-scale value, only comprise the moving vehicle part on this picture theory, other background parts are black, and namely gray-scale value is 0.
Yet because may there be nuance in some gray values of pixel points with the gray values of pixel points of same position in the background image in the picture frame, cause image to comprise noise, therefore, we realize the binaryzation of image by setting threshold, and formula is as follows:
Get T=60, then when the absolute value of the plain gray scale difference value of difference after image greater than 60 the time, the gray-scale value of this pixel is 255; When the absolute value of difference less than 60 the time, the gray-scale value of this pixel is 0.
Pick up the car left upper end point coordinate and the bottom righthand side point coordinate of a profile, can be built into the external minimum rectangle of vehicle ' s contour, the left upper apex of known entire image is true origin, the bottom right apex coordinate is (255,255), the top left corner apex coordinate of supposing the minimum boundary rectangle of vehicle ' s contour is (128,128), lower right corner apex coordinate is (180,200), then the area of this boundary rectangle is: (180-128) * (200-128), girth is (180-128)+(200-128), and length breadth ratio is (180-128)/(200-128).
These three values are sent into the neural network that trains, can realize the Classification and Identification function of vehicle.
Claims (3)
1. model recognizing method based on the highway video is characterized by and adopts following steps to realize:
A) frame by frame the picture frame in the highway video order under a certain shooting angle is carried out gray processing and medium filtering denoising;
B) adopt the adaptive background update algorithm to handle described highway video sequence and obtain the highway background image;
C) frame by frame the picture frame in the described highway video sequence and described highway background image are carried out calculus of differences and obtain the moving vehicle profile;
D) area, girth and 3 kinds of geometric properties of length breadth ratio of the external minimum rectangle of the described moving vehicle profile of calculating;
E) make up 3 layers of BP neural network,, as output sample, neural network is trained with the vehicle of vehicle correspondence as the input sample with described 3 kinds of geometric properties of multiple vehicle;
F) trained described neural network can identify the vehicle of this vehicle according to the described 3 kinds of geometric properties of vehicle.
2. the model recognizing method based on the highway video according to claim 1 is characterized in that described 3 layers of BP neural network have input layer, hidden layer and output layer.
3. the model recognizing method based on the highway video according to claim 1 and 2, it is characterized in that described input layer has 3 nodes, the normalized value of respectively corresponding 3 kinds of geometric properties, described hidden layer has 8 nodes, described output layer has 3 nodes, the output result of 0 or 1,3 node of each node output has 8 kinds of array modes, and each combination represents a kind of vehicle respectively.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013101479659A CN103295017A (en) | 2013-04-25 | 2013-04-25 | Vehicle type identification method based on road videos |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013101479659A CN103295017A (en) | 2013-04-25 | 2013-04-25 | Vehicle type identification method based on road videos |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103295017A true CN103295017A (en) | 2013-09-11 |
Family
ID=49095846
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2013101479659A Pending CN103295017A (en) | 2013-04-25 | 2013-04-25 | Vehicle type identification method based on road videos |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103295017A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104036288A (en) * | 2014-05-30 | 2014-09-10 | 宁波海视智能系统有限公司 | Vehicle type classification method based on videos |
CN104680795A (en) * | 2015-02-28 | 2015-06-03 | 武汉烽火众智数字技术有限责任公司 | Vehicle type recognition method and device based on partial area characteristic |
CN104680793A (en) * | 2015-02-04 | 2015-06-03 | 上海依图网络科技有限公司 | Alarm method for truck to drive on viaduct illegally |
CN104766047A (en) * | 2015-03-04 | 2015-07-08 | 西安工业大学 | Toll station vehicle recognition method and device based on vehicle length detection |
CN109409381A (en) * | 2018-09-18 | 2019-03-01 | 北京居然之家云地汇新零售连锁有限公司 | The classification method and system of furniture top view based on artificial intelligence |
CN112396635A (en) * | 2020-11-30 | 2021-02-23 | 深圳职业技术学院 | Multi-target detection method based on multiple devices in complex environment |
CN112597828A (en) * | 2020-12-11 | 2021-04-02 | 京东数字科技控股股份有限公司 | Training method and device of webpage recognition model and webpage recognition method |
RU2786450C1 (en) * | 2022-03-04 | 2022-12-21 | Общество с ограниченной ответственностью "МЕГАПОЛИС ИНФОРМАЦИОННЫЕ ТЕХНОЛОГИИ" | Complex for traffic control and method for traffic control |
CN117799483A (en) * | 2024-03-01 | 2024-04-02 | 南京澜儒电气技术有限公司 | Intelligent charging pile electric quantity allocation system utilizing type analysis |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101694695A (en) * | 2009-10-22 | 2010-04-14 | 青岛海信网络科技股份有限公司 | Vehicle type recognizing method |
-
2013
- 2013-04-25 CN CN2013101479659A patent/CN103295017A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101694695A (en) * | 2009-10-22 | 2010-04-14 | 青岛海信网络科技股份有限公司 | Vehicle type recognizing method |
Non-Patent Citations (1)
Title |
---|
盛卓: "基于视频图像的车型识别技术的研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑(月刊 )》, no. 02, 15 February 2013 (2013-02-15) * |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104036288A (en) * | 2014-05-30 | 2014-09-10 | 宁波海视智能系统有限公司 | Vehicle type classification method based on videos |
CN104680793A (en) * | 2015-02-04 | 2015-06-03 | 上海依图网络科技有限公司 | Alarm method for truck to drive on viaduct illegally |
CN104680793B (en) * | 2015-02-04 | 2016-09-07 | 上海依图网络科技有限公司 | A kind of truck overhead alarm method violating the regulations |
CN104680795A (en) * | 2015-02-28 | 2015-06-03 | 武汉烽火众智数字技术有限责任公司 | Vehicle type recognition method and device based on partial area characteristic |
CN104766047A (en) * | 2015-03-04 | 2015-07-08 | 西安工业大学 | Toll station vehicle recognition method and device based on vehicle length detection |
CN104766047B (en) * | 2015-03-04 | 2017-12-19 | 西安工业大学 | High speed charge station vehicle identification method and device based on Vehicle length detection |
CN109409381A (en) * | 2018-09-18 | 2019-03-01 | 北京居然之家云地汇新零售连锁有限公司 | The classification method and system of furniture top view based on artificial intelligence |
CN112396635A (en) * | 2020-11-30 | 2021-02-23 | 深圳职业技术学院 | Multi-target detection method based on multiple devices in complex environment |
CN112597828A (en) * | 2020-12-11 | 2021-04-02 | 京东数字科技控股股份有限公司 | Training method and device of webpage recognition model and webpage recognition method |
RU2786450C1 (en) * | 2022-03-04 | 2022-12-21 | Общество с ограниченной ответственностью "МЕГАПОЛИС ИНФОРМАЦИОННЫЕ ТЕХНОЛОГИИ" | Complex for traffic control and method for traffic control |
CN117799483A (en) * | 2024-03-01 | 2024-04-02 | 南京澜儒电气技术有限公司 | Intelligent charging pile electric quantity allocation system utilizing type analysis |
CN117799483B (en) * | 2024-03-01 | 2024-06-21 | 杭州仓信电力科技有限公司 | Intelligent charging pile electric quantity allocation system utilizing type analysis |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103295017A (en) | Vehicle type identification method based on road videos | |
CN109635744B (en) | Lane line detection method based on deep segmentation network | |
CN108694386B (en) | Lane line detection method based on parallel convolution neural network | |
CN106875395B (en) | Super-pixel-level SAR image change detection method based on deep neural network | |
CN103279759A (en) | Vehicle front trafficability analyzing method based on convolution nerve network | |
CN106128121B (en) | Vehicle queue length fast algorithm of detecting based on Local Features Analysis | |
CN104616032A (en) | Multi-camera system target matching method based on deep-convolution neural network | |
CN102651132B (en) | Medical image registration method based on intersecting cortical model | |
CN103218831A (en) | Video moving target classification and identification method based on outline constraint | |
CN111582210B (en) | Human body behavior recognition method based on quantum neural network | |
CN107563388A (en) | A kind of convolutional neural networks object identification method based on depth information pre-segmentation | |
CN102819841B (en) | Global threshold partitioning method for partitioning target image | |
CN107545263A (en) | A kind of object detecting method and device | |
CN103473755B (en) | Based on the sparse denoising method of SAR image that change detects | |
CN105139015A (en) | Method for extracting water body from remote sensing image | |
CN106096655A (en) | A kind of remote sensing image airplane detection method based on convolutional neural networks | |
CN107945122A (en) | Infrared image enhancing method and system based on self-adapting histogram segmentation | |
CN105405138A (en) | Water surface target tracking method based on saliency detection | |
CN107944354A (en) | A kind of vehicle checking method based on deep learning | |
Xu et al. | BANet: A balanced atrous net improved from SSD for autonomous driving in smart transportation | |
CN101739667B (en) | Non-downsampling contourlet transformation-based method for enhancing remote sensing image road | |
CN107220991A (en) | A kind of Robust Real-time Moving Object Tracking based on compressed sensing | |
Laupheimer et al. | The importance of radiometric feature quality for semantic mesh segmentation | |
CN104835142A (en) | Vehicle queuing length detection method based on texture features | |
CN108932471B (en) | Vehicle detection method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20130911 |