CN112183231A - Vehicle identification method and device based on high-definition video - Google Patents
Vehicle identification method and device based on high-definition video Download PDFInfo
- Publication number
- CN112183231A CN112183231A CN202010939867.9A CN202010939867A CN112183231A CN 112183231 A CN112183231 A CN 112183231A CN 202010939867 A CN202010939867 A CN 202010939867A CN 112183231 A CN112183231 A CN 112183231A
- Authority
- CN
- China
- Prior art keywords
- vehicle
- features
- feature
- image
- feature extraction
- 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
- 238000000034 method Methods 0.000 title claims abstract description 48
- 238000000605 extraction Methods 0.000 claims abstract description 75
- 230000004927 fusion Effects 0.000 claims abstract description 43
- 238000012545 processing Methods 0.000 claims abstract description 43
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 42
- 230000009467 reduction Effects 0.000 claims abstract description 34
- 238000010606 normalization Methods 0.000 claims description 12
- 238000012847 principal component analysis method Methods 0.000 claims description 10
- 238000007781 pre-processing Methods 0.000 claims description 6
- 230000008569 process Effects 0.000 abstract description 19
- 238000004364 calculation method Methods 0.000 abstract description 17
- 239000011159 matrix material Substances 0.000 description 32
- 239000013598 vector Substances 0.000 description 20
- 230000009286 beneficial effect Effects 0.000 description 4
- 230000006835 compression Effects 0.000 description 4
- 238000007906 compression Methods 0.000 description 4
- 238000012937 correction Methods 0.000 description 4
- 230000002349 favourable effect Effects 0.000 description 4
- 238000000513 principal component analysis Methods 0.000 description 4
- 239000000284 extract Substances 0.000 description 3
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000005286 illumination Methods 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011946 reduction process Methods 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
- G06V20/46—Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
- G06F18/253—Fusion techniques of extracted features
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/50—Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V2201/00—Indexing scheme relating to image or video recognition or understanding
- G06V2201/08—Detecting or categorising vehicles
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Multimedia (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a vehicle identification method and device based on a high-definition video. The vehicle identification method based on the high-definition video comprises the following steps: according to an improved local textural feature extraction algorithm, local textural feature extraction is carried out on the obtained vehicle image to obtain local textural features of the vehicle; carrying out directional gradient feature extraction on the vehicle image according to a directional gradient feature extraction algorithm to obtain vehicle detail features; and performing weighted fusion on the vehicle local texture features and the vehicle detail features, and performing dimension reduction processing on the obtained fusion feature space to obtain target features. The method can effectively reduce the calculation amount in the vehicle identification process and improve the vehicle identification rate under the condition that the characteristic space dimension of the vehicle image is larger.
Description
Technical Field
The invention relates to the technical field of vehicle identification, in particular to a vehicle identification method and device based on a high-definition video.
Background
With the rapid increase of the automobile holding capacity, the road traffic pressure is continuously increased, and the safety management problems related to automobiles are increasingly highlighted. In order to realize the optimal management and scheduling of the running automobiles, the information such as the number of the automobiles and the like can be obtained by detecting and identifying the characteristics of the automobiles, so that visual reference information is provided for drivers and automobile management and scheduling centers.
Most of vehicle identification methods proposed in recent years focus on researching how to extract features of vehicle images, for example, a feature extraction system of CN201910091807.3 road traffic vehicles, performs edge and information enhancement processing on acquired vehicle images through an edge contour detection module and an enhancement processing module, and processes vehicle corner distribution information in an invariant region through a feature extraction module in a simulation mode, so as to extract vehicle pixel feature points, and has the characteristic of high accuracy of feature extraction. However, in practical application, a large number of vehicle images are often required to be processed, and when a target area is far away from a camera or the field information amount is large, the difficulty of extracting the road traffic vehicle features is increased, and it is difficult to stably and accurately identify vehicles.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a vehicle identification method and device based on a high-definition video, which can effectively reduce the calculation amount in the vehicle identification process and improve the vehicle identification rate under the condition that the feature space dimension of a vehicle image is larger.
In order to solve the above technical problem, in a first aspect, an embodiment of the present invention provides a vehicle identification method based on a high definition video, including:
according to an improved local textural feature extraction algorithm, local textural feature extraction is carried out on the obtained vehicle image to obtain local textural features of the vehicle;
carrying out directional gradient feature extraction on the vehicle image according to a directional gradient feature extraction algorithm to obtain vehicle detail features;
and performing weighted fusion on the vehicle local texture features and the vehicle detail features, and performing dimension reduction processing on the obtained fusion feature space to obtain target features.
Further, the local textural feature extraction is performed on the acquired vehicle image according to the improved local textural feature extraction algorithm to obtain the local textural features of the vehicle, and the method specifically comprises the following steps:
dividing the vehicle image into a plurality of 3 x 3 image blocks, and respectively calculating the sum of the gray value of 8 adjacent pixels and the gray value of a central pixel according to each image block to obtain the sum of the gray values corresponding to each adjacent pixel;
and comparing the sum of the gray values of each adjacent pixel with the sum of the gray values of the other adjacent pixel according to a preset comparison sequence, and performing binarization processing on a comparison result to obtain the local texture features of the vehicle.
Further, the extracting of the directional gradient feature of the vehicle image according to the directional gradient feature extraction algorithm to obtain the detailed feature of the vehicle specifically comprises:
preprocessing the vehicle image to obtain a corrected image, and calculating the gradient of each pixel in the corrected image;
dividing the corrected image into a plurality of subsets with the same size, and counting gradient values of all pixels in each subset;
combining a plurality of adjacent subsets into a block, and acquiring a directional gradient histogram of the block according to the corresponding gradient values;
and carrying out normalization processing on the directional gradient histogram to obtain the vehicle detail features.
Further, the weighting and fusing the vehicle local texture features and the vehicle detail features specifically includes:
and cascading the vehicle local texture features and the vehicle detail features to obtain the fusion feature space.
Further, performing dimension reduction processing on the obtained fusion feature space to obtain a target feature, specifically:
compressing the dimension of the fusion feature space based on the column direction of the vehicle image to obtain a low-dimensional feature space;
and performing dimensionality reduction processing on the low-dimensional feature space according to a principal component analysis method to obtain the target feature.
In a second aspect, an embodiment of the present invention provides a vehicle identification apparatus based on a high definition video, including:
the vehicle local textural feature extraction module is used for extracting local textural features of the acquired vehicle image according to an improved local textural feature extraction algorithm to obtain local textural features of the vehicle;
the vehicle detail feature extraction module is used for extracting the direction gradient features of the vehicle image according to a direction gradient feature extraction algorithm to obtain vehicle detail features;
and the target feature acquisition module is used for performing weighted fusion on the vehicle local texture features and the vehicle detail features and performing dimension reduction processing on the obtained fusion feature space to obtain target features.
Further, the local textural feature extraction is performed on the acquired vehicle image according to the improved local textural feature extraction algorithm to obtain the local textural features of the vehicle, and the method specifically comprises the following steps:
dividing the vehicle image into a plurality of 3 x 3 image blocks, and respectively calculating the sum of the gray value of 8 adjacent pixels and the gray value of a central pixel according to each image block to obtain the sum of the gray values corresponding to each adjacent pixel;
and comparing the sum of the gray values of each adjacent pixel with the sum of the gray values of the other adjacent pixel according to a preset comparison sequence, and performing binarization processing on a comparison result to obtain the local texture features of the vehicle.
Further, the extracting of the directional gradient feature of the vehicle image according to the directional gradient feature extraction algorithm to obtain the detailed feature of the vehicle specifically comprises:
preprocessing the vehicle image to obtain a corrected image, and calculating the gradient of each pixel in the corrected image;
dividing the corrected image into a plurality of subsets with the same size, and counting gradient values of all pixels in each subset;
combining a plurality of adjacent subsets into a block, and acquiring a directional gradient histogram of the block according to the corresponding gradient values;
and carrying out normalization processing on the directional gradient histogram to obtain the vehicle detail features.
Further, the weighting and fusing the vehicle local texture features and the vehicle detail features specifically includes:
and cascading the vehicle local texture features and the vehicle detail features to obtain the fusion feature space.
Further, performing dimension reduction processing on the obtained fusion feature space to obtain a target feature, specifically:
compressing the dimension of the fusion feature space based on the column direction of the vehicle image to obtain a low-dimensional feature space;
and performing dimensionality reduction processing on the low-dimensional feature space according to a principal component analysis method to obtain the target feature.
The embodiment of the invention has the following beneficial effects:
the method comprises the steps of extracting local textural features of an acquired vehicle image according to an improved local textural feature extraction algorithm to obtain local textural features of the vehicle, extracting directional gradient features of the vehicle image according to a directional gradient feature extraction algorithm to obtain vehicle detail features, conducting weighted fusion on the local textural features of the vehicle and the vehicle detail features, conducting dimension reduction processing on an obtained fusion feature space to obtain target features, and accordingly achieving vehicle identification according to the target features. Compared with the prior art, the embodiment of the invention extracts the vehicle local textural features of the vehicle image according to the improved local textural feature extraction algorithm, not only considers the gray-scale correlation between the central pixel and the adjacent pixels, but also considers the gray-scale correlation between each adjacent pixel, and is beneficial to accurately extracting the vehicle local textural features; vehicle identification is carried out on the basis of a plurality of characteristics by fusing local texture characteristics and detailed characteristics of the vehicle, so that the vehicle identification rate is improved; the fused feature space is subjected to dimensionality reduction, so that the high-dimensional feature space is converted into the low-dimensional feature space, and the calculation amount in the vehicle identification process is reduced. According to the embodiment of the invention, under the condition that the feature space dimension of the vehicle image is larger, the calculation amount in the vehicle identification process can be effectively reduced, and the vehicle identification rate is improved.
Drawings
Fig. 1 is a schematic flowchart of a vehicle identification method based on high definition video according to a first embodiment of the present invention;
fig. 2 is another schematic flow chart of a vehicle identification method based on high definition video according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a local texture feature extraction according to a first embodiment of the present invention;
fig. 4 is a schematic structural diagram of a vehicle identification device based on high definition video according to a second embodiment of the present invention.
Detailed Description
The technical solutions in the present invention will be described clearly and completely with reference to the accompanying drawings, and it is obvious that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, the step numbers in the text are only for convenience of explanation of the specific embodiments, and do not serve to limit the execution sequence of the steps.
The first embodiment:
as shown in fig. 1-2, a first embodiment provides a vehicle identification method based on high definition video, including steps S1-S3:
s1, extracting local textural features of the obtained vehicle image according to an improved local textural feature extraction algorithm to obtain local textural features of the vehicle;
s2, extracting the direction gradient features of the vehicle image according to a direction gradient feature extraction algorithm to obtain vehicle detail features;
and S3, carrying out weighted fusion on the vehicle local texture features and the vehicle detail features, and carrying out dimension reduction processing on the obtained fusion feature space to obtain the target features.
Illustratively, in step S1, a vehicle image is acquired, and the vehicle local texture features of the vehicle image are extracted according to the improved local texture feature extraction algorithm.
The traditional local texture feature operator is defined as a square window with the size of 3 × 3, the gray value of the central pixel is taken as a threshold, if the gray values of 8 adjacent pixels are greater than the gray value of the central pixel, the threshold is 1, otherwise, the threshold is 0. Calculating a local texture feature value of the central pixel according to a local texture feature calculation formula, wherein the local texture feature value calculation formula is shown as formula (1):
in the formula (1), LBP represents a local texture feature operator, gcRepresents the center pixel (x)c,yc) Gray value of giRepresenting adjacent pixels (x)i,yi) Is determined by the gray-scale value of (a),is a symbolic function.
The improved local texture feature extraction algorithm is that the gray value of the central pixel of the vehicle image is added with the gray value of each adjacent pixel around the central pixel, the sum of the gray values obtained by each adjacent pixel is compared with the sum of the gray values of one adjacent pixel around the central pixel according to a preset comparison sequence, and binarization processing is carried out on the comparison result. Therefore, the gray level correlation between the central pixel and the adjacent pixels and the gray level correlation between the adjacent pixels are considered, and the method is favorable for accurately extracting the local texture features of the vehicle.
In order to fully extract the vehicle local textural features of the vehicle image, the vehicle image can be partitioned, local textural features of each image block are extracted according to an improved local textural feature extraction algorithm, and finally the vehicle local textural features of the image blocks are obtained.
In a preferred embodiment, the local texture feature extraction is performed on the acquired vehicle image according to an improved local texture feature extraction algorithm to obtain the vehicle local texture feature, specifically: dividing the vehicle image into a plurality of 3 x 3 image blocks, and respectively calculating the sum of the gray value of 8 adjacent pixels and the gray value of the central pixel according to each image block to obtain the sum of the gray values corresponding to each adjacent pixel; and comparing the sum of the gray values of each adjacent pixel with the sum of the gray values of the other adjacent pixel according to a preset comparison sequence, and performing binarization processing on a comparison result to obtain the local texture features of the vehicle.
Take fig. 3 as an example. The gray-level value of the center pixel is 90, the gray-level value of the first adjacent pixel is 30, the gray-level value of the second adjacent pixel is 52, the gray-level value of the third adjacent pixel is 70, the gray-level value of the fourth adjacent pixel is 64, the gray-level value of the fifth adjacent pixel is 60, the gray-level value of the sixth adjacent pixel is 81, the gray-level value of the seventh adjacent pixel is 117, and the gray-level value of the eighth adjacent pixel is 130.
The sum of the gray values of the 8 adjacent pixels and the gray value of the central pixel is calculated respectively, and the sum of the gray values corresponding to each adjacent pixel, i.e., {120, 142, 160, 154, 150, 171, 207, 220}, is obtained. Comparing the sum of the gray values of the first adjacent pixel with the sum of the gray values of the second adjacent pixel, comparing the sum of the gray values of the second adjacent pixel with the sum of the gray values of the third adjacent pixel, and so on, and comparing the sum of the gray values of the eighth adjacent pixel with the sum of the gray values of the first adjacent pixel to obtain comparison results, namely {120 < 142, 142 < 160, 160 > 154, 154 > 150, 150 < 171, 171 < 207, 207 < 220, 220 > 120 }. If the sum of the gray values of the adjacent pixels is less than the sum of the gray values of the other adjacent pixels, the sum is 0, otherwise, the sum is 1. And (4) carrying out binarization processing on the comparison result based on the principle to obtain the vehicle local textural features of the image block, namely {0, 0, 1, 1, 0, 0, 0, 1 }.
Illustratively, in step S2, vehicle detail features of the vehicle image are extracted according to a directional gradient feature extraction algorithm.
In a preferred embodiment, the directional gradient feature extraction is performed on the vehicle image according to a directional gradient feature extraction algorithm to obtain the vehicle detail feature, specifically: preprocessing the vehicle image to obtain a corrected image, and calculating the gradient of each pixel in the corrected image; dividing the corrected image into a plurality of subsets with the same size, and counting gradient values of all pixels in each subset; combining a plurality of adjacent subsets into a block, and acquiring a directional gradient histogram of the block according to the corresponding gradient value; and carrying out normalization processing on the directional gradient histogram to obtain the detailed characteristics of the vehicle.
The histogram of directional gradients is a descriptor for describing local information, and the feature extraction process is as follows:
1. graying and standardizing the image;
in order to reduce the influence of illumination factors, the vehicle image is normalized, and the characteristic correction formula is shown as formula (2):
Ib(x,y)=c×I(x,y)γ (2)
in the formula (2), Ib(x, y) is a corrected image, I (x, y) is a vehicle image, γ is a correction parameter, and c is a constant.
2. Calculating the gradient of each pixel in the vehicle image;
the gradient of pixel (x, y) in the vehicle image is represented as:
Gx(x,y)=H(x+1,y)-H(x-1,y)
Gy(x,y)=H(x,y+1)-H(x-1,y-1)
in the expression, Gx(x,y)、Gy(x, y) and H (x, y) respectively represent the levels of the pixels (x, y)Directional gradient, vertical directional gradient, and gray scale value.
The gradient magnitude and direction of the pixel (x, y) are shown in equations (3), (4), respectively:
3. dividing the vehicle image into a plurality of subsets with the same size, respectively counting gradient values of all pixels in each subset, and drawing a directional gradient histogram to obtain feature description of a local region;
4. combining a plurality of adjacent subsets into a block, then solving a directional gradient histogram of the block, and carrying out normalization by using an equation (5);
in formula (5), v is a vector before normalization, | v | | luminance2 2Representing the second order norm of v, which is a constant, and f is the normalized vector. The normalization process can further compress lighting, shadows, and edges.
Illustratively, in step S3, the vehicle local texture features and the vehicle detail features are weighted and fused to obtain a fused feature space, and the fused feature space is subjected to a dimension reduction process to obtain target features, so that vehicle identification can be achieved according to the target features.
In a preferred embodiment, the vehicle local texture features and the vehicle detail features are weighted and fused, specifically: and cascading the local texture features and the detailed features of the vehicle to obtain a fusion feature space.
For example, let two different feature spaces A, B exist in the pattern sample space N, and for an arbitrary pattern sample e N, let two feature vectors corresponding to it be a e a and B e B, respectively, and let the feature matrix I after serial fusion be (a, B). If the feature vectors a and b are n and m dimensions, respectively, the combined serial feature space is (n + m) dimensions, as can be seen from the combination principle. And c, parallel fusing the characteristic matrix I, a + ib, wherein I is an imaginary unit. If the dimensions of the two groups of features are not equal, the feature vector of the lower dimension is complemented by zero, and the dimension of the feature matrix is max { dim (A), dim (B) }.
The specific process of fusing the vehicle local texture features and the vehicle detail features is to respectively calculate a local texture feature histogram and a directional gradient feature histogram, and form a combined histogram through serial connection.
The embodiment carries out vehicle identification based on a plurality of characteristics by fusing the local texture characteristics and the detailed characteristics of the vehicle, and is favorable for improving the vehicle identification rate.
In a preferred embodiment, the obtained fusion feature space is subjected to dimension reduction processing to obtain a target feature, which specifically comprises: compressing the dimension of the fusion feature space based on the column direction of the vehicle image to obtain a low-dimensional feature space; and performing dimensionality reduction processing on the low-dimensional feature space according to a principal component analysis method to obtain the target feature.
The traditional principal component analysis method has large and complex calculation amount in the aspect of dimension reduction because of high feature dimension. The embodiment fully utilizes the correlation between the columns of the two-dimensional vehicle images, and compresses and fuses the dimensionality of the feature space based on the column direction of the vehicle images to obtain the principal component analysis which is the main part, thereby effectively reducing the computation in the vehicle identification process and simultaneously improving the vehicle identification rate.
Similarly, the dimension of the fusion feature space may be compressed based on the row direction of the vehicle image by using the correlation between rows of the two-dimensional vehicle image.
The basic principle of the dimension reduction method based on column direction compression is as follows:
assume that there are M vehicle image matrices X of size M × n in the training setiB is a projection matrix of m × k (m > k), and the vehicle image X isiProjected into B, i.e. Yi=BTXiAn overall distribution matrix P is obtained, and is defined as represented by equation (6):
then extracting eigenvectors omega corresponding to the first k largest eigenvalues of the matrix P1,ω2,...,ωkThen the projection matrix B is ω1,ω2,...,ωk。
After the dimension reduction method of column direction compression, the characteristic space of the vehicle image is greatly reduced, and in order to further reduce the redundancy of data and improve the vehicle identification rate, the principal component analysis method is adopted for dimension reduction processing.
The main component analysis method comprises the following processing steps:
1. taking each vehicle feature image as a sample, wherein each sample is a column vector xiAll samples form a matrix, as shown in equation (7):
in the formula (7), xkA column vector representing the kth sample, l represents the number of samples,for the average sample of all samples, X is the matrix of all sample column vectors.
2. Obtaining a covariance matrix S of the matrixrAs shown in formula (8):
3. solving the covariance matrix SrCharacteristic value λ of1≥λ2≥...≥λmAnd a feature vector u1,u2,...,umWhere m represents the number of eigenvectors, the matrix formed by the eigenvectors is U ═ U1,u2,...,um)。
4. Taking the first d eigenvectors as a projection matrix, wherein the projection matrix is U*=(u1,u2,...,ud)。
5. Each characteristic vehicle image is subjected to principal component analysis projection to obtain d-dimensional characteristic vectors, namely xk *=(U*)Txk,k=1,2,...,l。
According to the method, the vehicle local textural features of the vehicle image are extracted according to the improved local textural feature extraction algorithm, the gray level correlation between the central pixel and the adjacent pixels is considered, the gray level correlation between the adjacent pixels is also considered, and the method is favorable for accurately extracting the vehicle local textural features; vehicle identification is carried out on the basis of a plurality of characteristics by fusing local texture characteristics and detailed characteristics of the vehicle, so that the vehicle identification rate is improved; the fused feature space is subjected to dimensionality reduction, so that the high-dimensional feature space is converted into the low-dimensional feature space, and the calculation amount in the vehicle identification process is reduced. According to the embodiment, under the condition that the feature space dimension of the vehicle image is large, the calculation amount in the vehicle identification process can be effectively reduced, and meanwhile, the vehicle identification rate is improved.
Second embodiment:
as shown in fig. 4, a second embodiment provides a vehicle recognition device based on a high definition video, including: the vehicle local textural feature extraction module 21 is configured to perform local textural feature extraction on the acquired vehicle image according to an improved local textural feature extraction algorithm to obtain a vehicle local textural feature; the vehicle detail feature extraction module 22 is configured to perform directional gradient feature extraction on the vehicle image according to a directional gradient feature extraction algorithm to obtain vehicle detail features; and the target feature obtaining module 23 is configured to perform weighted fusion on the vehicle local texture features and the vehicle detail features, and perform dimension reduction processing on the obtained fusion feature space to obtain target features.
Illustratively, by the vehicle local texture feature extraction module 21, a vehicle image is obtained, and the vehicle local texture features of the vehicle image are extracted according to an improved local texture feature extraction algorithm.
The traditional local texture feature operator is defined as a square window with the size of 3 × 3, the gray value of the central pixel is taken as a threshold, if the gray values of 8 adjacent pixels are greater than the gray value of the central pixel, the threshold is 1, otherwise, the threshold is 0. Calculating a local texture feature value of the central pixel according to a local texture feature calculation formula, wherein the local texture feature value calculation formula is shown as formula (9):
in equation (9), LBP represents the local texture feature operator, gcRepresents the center pixel (x)c,yc) Gray value of giRepresenting adjacent pixels (x)i,yi) Is determined by the gray-scale value of (a),is a symbolic function.
The improved local texture feature extraction algorithm is that the gray value of the central pixel of the vehicle image is added with the gray value of each adjacent pixel around the central pixel, the sum of the gray values obtained by each adjacent pixel is compared with the sum of the gray values of one adjacent pixel around the central pixel according to a preset comparison sequence, and binarization processing is carried out on the comparison result. Therefore, the gray level correlation between the central pixel and the adjacent pixels and the gray level correlation between the adjacent pixels are considered, and the method is favorable for accurately extracting the local texture features of the vehicle.
In order to fully extract the vehicle local textural features of the vehicle image, the vehicle image can be partitioned, local textural features of each image block are extracted according to an improved local textural feature extraction algorithm, and finally the vehicle local textural features of the image blocks are obtained.
In a preferred embodiment, the local texture feature extraction is performed on the acquired vehicle image according to an improved local texture feature extraction algorithm to obtain the vehicle local texture feature, specifically: dividing the vehicle image into a plurality of 3 x 3 image blocks, and respectively calculating the sum of the gray value of 8 adjacent pixels and the gray value of the central pixel according to each image block to obtain the sum of the gray values corresponding to each adjacent pixel; and comparing the sum of the gray values of each adjacent pixel with the sum of the gray values of the other adjacent pixel according to a preset comparison sequence, and performing binarization processing on a comparison result to obtain the local texture features of the vehicle.
Illustratively, the vehicle detail features of the vehicle image are extracted according to a directional gradient feature extraction algorithm by the vehicle detail feature extraction module 22.
In a preferred embodiment, the directional gradient feature extraction is performed on the vehicle image according to a directional gradient feature extraction algorithm to obtain the vehicle detail feature, specifically: preprocessing the vehicle image to obtain a corrected image, and calculating the gradient of each pixel in the corrected image; dividing the corrected image into a plurality of subsets with the same size, and counting gradient values of all pixels in each subset; combining a plurality of adjacent subsets into a block, and acquiring a directional gradient histogram of the block according to the corresponding gradient value; and carrying out normalization processing on the directional gradient histogram to obtain the detailed characteristics of the vehicle.
The histogram of directional gradients is a descriptor for describing local information, and the feature extraction process is as follows:
1. graying and standardizing the image;
in order to reduce the influence of illumination factors, the vehicle image is normalized, and the characteristic correction formula is shown as the formula (10):
Ib(x,y)=c×I(x,y)γ (10)
in the formula (10), Ib(x, y) is a corrected image, I (x, y) is a vehicle image, γ is a correction parameter, and c is a constant.
2. Calculating the gradient of each pixel in the vehicle image;
the gradient of pixel (x, y) in the vehicle image is represented as:
Gx(x,y)=H(x+1,y)-H(x-1,y)
Gy(x,y)=H(x,y+1)-H(x-1,y-1)
in the expression, Gx(x,y)、Gy(x, y), and H (x, y) respectively represent the horizontal direction gradient, the vertical direction gradient, and the gradation value of the pixel (x, y).
The gradient magnitude and direction of the pixel (x, y) are shown in equations (11), (12), respectively:
3. dividing the vehicle image into a plurality of subsets with the same size, respectively counting gradient values of all pixels in each subset, and drawing a directional gradient histogram to obtain feature description of a local region;
4. combining a plurality of adjacent subsets into a block, then solving a histogram of directional gradients of the block, and carrying out normalization by using an equation (13);
in formula (13), v is a vector before normalization, | v | | luminance2 2Representing the second order norm of v, which is a constant, and f is the normalized vector. The normalization process can further compress lighting, shadows, and edges.
Illustratively, by the target feature obtaining module 23, the local texture features and the vehicle detail features of the vehicle are weighted and fused to obtain a fused feature space, and the fused feature space is subjected to dimension reduction processing to obtain the target features, so that vehicle identification can be realized according to the target features.
In a preferred embodiment, the vehicle local texture features and the vehicle detail features are weighted and fused, specifically: and cascading the local texture features and the detailed features of the vehicle to obtain a fusion feature space.
For example, let two different feature spaces A, B exist in the pattern sample space N, and for an arbitrary pattern sample e N, let two feature vectors corresponding to it be a e a and B e B, respectively, and let the feature matrix I after serial fusion be (a, B). If the feature vectors a and b are n and m dimensions, respectively, the combined serial feature space is (n + m) dimensions, as can be seen from the combination principle. And c, parallel fusing the characteristic matrix I, a + ib, wherein I is an imaginary unit. If the dimensions of the two groups of features are not equal, the feature vector of the lower dimension is complemented by zero, and the dimension of the feature matrix is max { dim (A), dim (B) }.
The specific process of fusing the vehicle local texture features and the vehicle detail features is to respectively calculate a local texture feature histogram and a directional gradient feature histogram, and form a combined histogram through serial connection.
In the embodiment, the target feature obtaining module 23 is used for fusing the local texture features and the detailed features of the vehicle, and vehicle identification is performed based on a plurality of features, so that the improvement of the vehicle identification rate is facilitated.
In a preferred embodiment, the obtained fusion feature space is subjected to dimension reduction processing to obtain a target feature, which specifically comprises: compressing the dimension of the fusion feature space based on the column direction of the vehicle image to obtain a low-dimensional feature space; and performing dimensionality reduction processing on the low-dimensional feature space according to a principal component analysis method to obtain the target feature.
The traditional principal component analysis method has large and complex calculation amount in the aspect of dimension reduction because of high feature dimension. In the embodiment, the target feature obtaining module 23 fully utilizes the correlation between the columns of the two-dimensional vehicle images, and the dimension of the feature space is compressed and fused in the column direction of the vehicle images to obtain the main part, namely, principal component analysis, so that the calculation amount in the vehicle identification process is effectively reduced, and the vehicle identification rate is improved.
Similarly, the dimension of the fusion feature space may be compressed based on the row direction of the vehicle image by using the correlation between rows of the two-dimensional vehicle image.
The basic principle of the dimension reduction method based on column direction compression is as follows:
assume that there are M vehicle image matrices X of size M × n in the training setiB is a projection matrix of m × k (m > k), and the vehicle image X isiProjected into B, i.e. Yi=BTXiAn overall distribution matrix P is obtained, and is defined as represented by equation (14):
then extracting eigenvectors omega corresponding to the first k largest eigenvalues of the matrix P1,ω2,...,ωkThen the projection matrix B is ω1,ω2,...,ωk。
After the dimension reduction method of column direction compression, the characteristic space of the vehicle image is greatly reduced, and in order to further reduce the redundancy of data and improve the vehicle identification rate, the principal component analysis method is adopted for dimension reduction processing.
The main component analysis method comprises the following processing steps:
1. taking each vehicle feature image as a sample, wherein each sample is a column vector xiAll samples together form a matrix, as shown in equation (15):
in the formula (15), xkA column vector representing the kth sample, l represents the number of samples,for the average sample of all samples, X is the matrix of all sample column vectors.
2. Obtaining a covariance matrix S of the matrixrAs shown in formula (16):
3. solving the covariance matrix SrCharacteristic value λ of1≥λ2≥...≥λmAnd a feature vector u1,u2,...,umWhere m represents the number of eigenvectors, the matrix formed by the eigenvectors is U ═ U1,u2,...,um)。
4. Taking the first d eigenvectors as a projection matrix, wherein the projection matrix is U*=(u1,u2,...,ud)。
5. Each characteristic vehicle image is subjected to principal component analysis projection to obtain d-dimensional characteristic vectors, namely xk *=(U*)Txk,k=1,2,...,l。
In the embodiment, the vehicle local textural features of the vehicle image are extracted by the vehicle local textural feature extraction module 21 according to an improved local textural feature extraction algorithm, not only the gray level correlation between the central pixel and the adjacent pixels is considered, but also the gray level correlation between the adjacent pixels is considered, so that the vehicle local textural features can be accurately extracted; the target feature obtaining module 23 fuses the local texture features and the detailed features of the vehicle, and performs vehicle identification based on a plurality of features, thereby being beneficial to improving the vehicle identification rate; the target feature obtaining module 23 performs dimension reduction processing on the fusion feature space, and converts the high-dimensional feature space into the low-dimensional feature space, which is beneficial to reducing the calculation amount in the vehicle identification process. According to the embodiment, under the condition that the feature space dimension of the vehicle image is large, the calculation amount in the vehicle identification process can be effectively reduced, and meanwhile, the vehicle identification rate is improved.
In summary, the embodiment of the present invention has the following advantages:
the method comprises the steps of extracting local textural features of an acquired vehicle image according to an improved local textural feature extraction algorithm to obtain local textural features of the vehicle, extracting directional gradient features of the vehicle image according to a directional gradient feature extraction algorithm to obtain vehicle detail features, conducting weighted fusion on the local textural features of the vehicle and the vehicle detail features, conducting dimension reduction processing on an obtained fusion feature space to obtain target features, and accordingly achieving vehicle identification according to the target features. According to the embodiment of the invention, the vehicle local textural features of the vehicle image are extracted according to the improved local textural feature extraction algorithm, the gray level correlation between the central pixel and the adjacent pixels is considered, and the gray level correlation between the adjacent pixels is also considered, so that the vehicle local textural features can be accurately extracted; vehicle identification is carried out on the basis of a plurality of characteristics by fusing local texture characteristics and detailed characteristics of the vehicle, so that the vehicle identification rate is improved; the fused feature space is subjected to dimensionality reduction, so that the high-dimensional feature space is converted into the low-dimensional feature space, and the calculation amount in the vehicle identification process is reduced. According to the embodiment of the invention, under the condition that the feature space dimension of the vehicle image is larger, the calculation amount in the vehicle identification process can be effectively reduced, and the vehicle identification rate is improved.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.
It will be understood by those skilled in the art that all or part of the processes of the above embodiments may be implemented by hardware related to instructions of a computer program, and the computer program may be stored in a computer readable storage medium, and when executed, may include the processes of the above embodiments. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Claims (10)
1. A vehicle identification method based on high definition video is characterized by comprising the following steps:
according to an improved local textural feature extraction algorithm, local textural feature extraction is carried out on the obtained vehicle image to obtain local textural features of the vehicle;
carrying out directional gradient feature extraction on the vehicle image according to a directional gradient feature extraction algorithm to obtain vehicle detail features;
and performing weighted fusion on the vehicle local texture features and the vehicle detail features, and performing dimension reduction processing on the obtained fusion feature space to obtain target features.
2. The vehicle identification method based on the high-definition video according to claim 1, wherein the local texture feature extraction is performed on the acquired vehicle image according to an improved local texture feature extraction algorithm to obtain the vehicle local texture feature, specifically:
dividing the vehicle image into a plurality of 3 x 3 image blocks, and respectively calculating the sum of the gray value of 8 adjacent pixels and the gray value of a central pixel according to each image block to obtain the sum of the gray values corresponding to each adjacent pixel;
and comparing the sum of the gray values of each adjacent pixel with the sum of the gray values of the other adjacent pixel according to a preset comparison sequence, and performing binarization processing on a comparison result to obtain the local texture features of the vehicle.
3. The vehicle identification method based on the high-definition video as claimed in claim 1, wherein the vehicle image is subjected to directional gradient feature extraction according to a directional gradient feature extraction algorithm to obtain vehicle detail features, specifically:
preprocessing the vehicle image to obtain a corrected image, and calculating the gradient of each pixel in the corrected image;
dividing the corrected image into a plurality of subsets with the same size, and counting gradient values of all pixels in each subset;
combining a plurality of adjacent subsets into a block, and acquiring a directional gradient histogram of the block according to the corresponding gradient values;
and carrying out normalization processing on the directional gradient histogram to obtain the vehicle detail features.
4. The vehicle identification method based on the high-definition video as claimed in claim 1, wherein the weighting fusion of the vehicle local texture feature and the vehicle detail feature is specifically:
and cascading the vehicle local texture features and the vehicle detail features to obtain the fusion feature space.
5. The vehicle identification method based on the high-definition video according to claim 1, wherein the obtained fusion feature space is subjected to dimensionality reduction to obtain a target feature, specifically:
compressing the dimension of the fusion feature space based on the column direction of the vehicle image to obtain a low-dimensional feature space;
and performing dimensionality reduction processing on the low-dimensional feature space according to a principal component analysis method to obtain the target feature.
6. A vehicle recognition device based on high definition video, comprising:
the vehicle local textural feature extraction module is used for extracting local textural features of the acquired vehicle image according to an improved local textural feature extraction algorithm to obtain local textural features of the vehicle;
the vehicle detail feature extraction module is used for extracting the direction gradient features of the vehicle image according to a direction gradient feature extraction algorithm to obtain vehicle detail features;
and the target feature acquisition module is used for performing weighted fusion on the vehicle local texture features and the vehicle detail features and performing dimension reduction processing on the obtained fusion feature space to obtain target features.
7. The vehicle identification device based on the high-definition video according to claim 6, wherein the local texture feature extraction is performed on the acquired vehicle image according to an improved local texture feature extraction algorithm to obtain the vehicle local texture feature, specifically:
dividing the vehicle image into a plurality of 3 x 3 image blocks, and respectively calculating the sum of the gray value of 8 adjacent pixels and the gray value of a central pixel according to each image block to obtain the sum of the gray values corresponding to each adjacent pixel;
and comparing the sum of the gray values of each adjacent pixel with the sum of the gray values of the other adjacent pixel according to a preset comparison sequence, and performing binarization processing on a comparison result to obtain the local texture features of the vehicle.
8. The vehicle identification device based on the high-definition video as claimed in claim 6, wherein the vehicle image is subjected to directional gradient feature extraction according to a directional gradient feature extraction algorithm to obtain vehicle detail features, specifically:
preprocessing the vehicle image to obtain a corrected image, and calculating the gradient of each pixel in the corrected image;
dividing the corrected image into a plurality of subsets with the same size, and counting gradient values of all pixels in each subset;
combining a plurality of adjacent subsets into a block, and acquiring a directional gradient histogram of the block according to the corresponding gradient values;
and carrying out normalization processing on the directional gradient histogram to obtain the vehicle detail features.
9. The vehicle identification device based on the high-definition video according to claim 6, wherein the weighted fusion of the vehicle local texture feature and the vehicle detail feature is specifically performed by:
and cascading the vehicle local texture features and the vehicle detail features to obtain the fusion feature space.
10. The vehicle identification device based on the high-definition video according to claim 6, wherein the dimension reduction processing is performed on the obtained fusion feature space to obtain the target feature, specifically:
compressing the dimension of the fusion feature space based on the column direction of the vehicle image to obtain a low-dimensional feature space;
and performing dimensionality reduction processing on the low-dimensional feature space according to a principal component analysis method to obtain the target feature.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010939867.9A CN112183231A (en) | 2020-09-09 | 2020-09-09 | Vehicle identification method and device based on high-definition video |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010939867.9A CN112183231A (en) | 2020-09-09 | 2020-09-09 | Vehicle identification method and device based on high-definition video |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112183231A true CN112183231A (en) | 2021-01-05 |
Family
ID=73920201
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010939867.9A Pending CN112183231A (en) | 2020-09-09 | 2020-09-09 | Vehicle identification method and device based on high-definition video |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112183231A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104573707A (en) * | 2014-12-17 | 2015-04-29 | 安徽清新互联信息科技有限公司 | Vehicle license plate Chinese character recognition method based on multi-feature fusion |
CN107622229A (en) * | 2017-08-29 | 2018-01-23 | 中山大学 | A kind of video frequency vehicle based on fusion feature recognition methods and system again |
CN109214420A (en) * | 2018-07-27 | 2019-01-15 | 北京工商大学 | The high texture image classification method and system of view-based access control model conspicuousness detection |
-
2020
- 2020-09-09 CN CN202010939867.9A patent/CN112183231A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104573707A (en) * | 2014-12-17 | 2015-04-29 | 安徽清新互联信息科技有限公司 | Vehicle license plate Chinese character recognition method based on multi-feature fusion |
CN107622229A (en) * | 2017-08-29 | 2018-01-23 | 中山大学 | A kind of video frequency vehicle based on fusion feature recognition methods and system again |
CN109214420A (en) * | 2018-07-27 | 2019-01-15 | 北京工商大学 | The high texture image classification method and system of view-based access control model conspicuousness detection |
Non-Patent Citations (2)
Title |
---|
姚立平;潘中良;: "基于改进的HOG和LBP算法的人脸识别方法研究", 光电子技术, no. 02, pages 114 - 118 * |
胡庆新;焦伟;顾爱华;: "多特征融合和交叉核SVM的车辆检测方法", 合肥工业大学学报(自然科学版), no. 01, pages 84 - 89 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11830230B2 (en) | Living body detection method based on facial recognition, and electronic device and storage medium | |
CN111191737B (en) | Fine granularity image classification method based on multi-scale repeated attention mechanism | |
CN112686812B (en) | Bank card inclination correction detection method and device, readable storage medium and terminal | |
US8213691B2 (en) | Method for identifying faces in images with improved accuracy using compressed feature vectors | |
JP4479478B2 (en) | Pattern recognition method and apparatus | |
CN110598788B (en) | Target detection method, target detection device, electronic equipment and storage medium | |
CN109948566B (en) | Double-flow face anti-fraud detection method based on weight fusion and feature selection | |
CN110991389B (en) | Matching method for judging appearance of target pedestrian in non-overlapping camera view angles | |
CN111144366A (en) | Strange face clustering method based on joint face quality assessment | |
CN111709313B (en) | Pedestrian re-identification method based on local and channel combination characteristics | |
CN114067444A (en) | Face spoofing detection method and system based on meta-pseudo label and illumination invariant feature | |
CN108875623B (en) | Face recognition method based on image feature fusion contrast technology | |
CN110706235A (en) | Far infrared pedestrian detection method based on two-stage cascade segmentation | |
CN112419270B (en) | No-reference image quality evaluation method and device under meta-learning and computer equipment | |
US7715632B2 (en) | Apparatus and method for recognizing an image | |
CN111275070B (en) | Signature verification method and device based on local feature matching | |
Barodi et al. | An enhanced artificial intelligence-based approach applied to vehicular traffic signs detection and road safety enhancement | |
US11748979B2 (en) | Method for training a neural network for recognition of a character sequence and associated recognition method | |
CN117152625A (en) | Remote sensing small target identification method, system, equipment and medium based on CoordConv and Yolov5 | |
CN106650629A (en) | Kernel sparse representation-based fast remote sensing target detection and recognition method | |
CN115861595A (en) | Multi-scale domain self-adaptive heterogeneous image matching method based on deep learning | |
CN112183231A (en) | Vehicle identification method and device based on high-definition video | |
CN112580442B (en) | Behavior identification method based on multi-dimensional pyramid hierarchical model | |
Jeong et al. | Homogeneity patch search method for voting-based efficient vehicle color classification using front-of-vehicle image | |
CN112487996A (en) | Driving behavior recognition method based on DenseNet121 network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |