CN111046875A - Vehicle brand identification method - Google Patents

Vehicle brand identification method Download PDF

Info

Publication number
CN111046875A
CN111046875A CN201911294352.1A CN201911294352A CN111046875A CN 111046875 A CN111046875 A CN 111046875A CN 201911294352 A CN201911294352 A CN 201911294352A CN 111046875 A CN111046875 A CN 111046875A
Authority
CN
China
Prior art keywords
vehicle
boundary
vehicle lamp
lamp
brand
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.)
Granted
Application number
CN201911294352.1A
Other languages
Chinese (zh)
Other versions
CN111046875B (en
Inventor
丁祖春
封斌
莫文英
钟碧良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Maritime University
Original Assignee
Guangzhou Maritime University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangzhou Maritime University filed Critical Guangzhou Maritime University
Priority to CN201911294352.1A priority Critical patent/CN111046875B/en
Publication of CN111046875A publication Critical patent/CN111046875A/en
Application granted granted Critical
Publication of CN111046875B publication Critical patent/CN111046875B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/08Detecting or categorising vehicles
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a vehicle brand identification method, which comprises the steps of firstly obtaining and extracting a vehicle lamp area from a vehicle picture to be identified; preprocessing a car lamp area to obtain a boundary contour of a car lamp to be detected; dividing the boundary contour of the vehicle lamp to be detected into sixteen directions at equal intervals, and calculating direction chain codes of each direction in the boundary contour of the vehicle lamp to be detected to obtain sixteen direction chain codes; calculating the similarity between the boundary outline of the vehicle lamp to be detected and each vehicle lamp boundary outline in the brand library according to all the direction chain codes, and outputting the selected vehicle lamp boundary outline from the brand library according to the similarity; and extracting the vehicle brand corresponding to the selected vehicle lamp boundary contour as the vehicle brand of the vehicle to be identified. By adopting the technical scheme of the invention, the identification of the vehicle brand can be realized without depending on the vehicle brand pattern, so that the accuracy of the vehicle brand identification result is improved.

Description

Vehicle brand identification method
Technical Field
The invention relates to the field of vehicle identification, in particular to a method for identifying a vehicle brand.
Background
The increase in the amount of motor vehicles kept has increased the demand for vehicle management and control. The vehicle brand identification is one of vehicle management and control means, so that the brand of the vehicle can be effectively detected, and the method is helpful for building a 'safe city' and 'intelligent transportation'.
The existing vehicle brand identification method mainly judges the vehicle brand by detecting a trademark pattern (logo) of the vehicle, but the existing vehicle brand identification method is very easily influenced by the environment and the trademark pattern, and when the ambient light is dark or the trademark pattern is small, the brand information of the vehicle is difficult to identify; in addition, the trademark pattern of the vehicle is easy to process and reform, and in real life, users often modify the trademark pattern of the vehicle by themselves, so that the recognition result of the vehicle brand changes, and the accuracy of the recognition result of the vehicle brand is further reduced.
Disclosure of Invention
The embodiment of the invention provides a vehicle brand identification method, which can realize the identification of the vehicle brand under the condition of not depending on a vehicle brand pattern, thereby improving the accuracy of a vehicle brand identification result.
In order to solve the technical problem, an embodiment of the present invention provides a method for identifying a brand of a vehicle, including:
acquiring and extracting a car light region from a picture of a car to be identified;
preprocessing the car lamp area to obtain a boundary contour of the car lamp to be detected;
dividing the boundary contour of the vehicle lamp to be detected into sixteen directions at equal intervals, and calculating direction chain codes of all the directions in the boundary contour of the vehicle lamp to be detected to obtain sixteen direction chain codes;
calculating the similarity between the boundary outline of the vehicle lamp to be detected and each vehicle lamp boundary outline in a brand library according to all the direction chain codes, and outputting the selected vehicle lamp boundary outline from the brand library according to the similarity;
and extracting a vehicle brand corresponding to the selected vehicle lamp boundary contour as the vehicle brand of the vehicle to be identified.
As a preferred scheme, the obtaining and extracting the car light region from the picture of the car to be identified specifically comprises:
acquiring and judging whether two vehicle lamp areas exist in a vehicle picture to be identified;
if two vehicle lamp regions exist in the to-be-identified vehicle picture, judging whether the difference of the areas of the two vehicle lamp regions is larger than a threshold value;
if the difference of the areas of the two vehicle lamp areas is larger than a threshold value, extracting the vehicle lamp area with the larger area;
if the difference of the areas of the two vehicle lamp regions is smaller than a threshold value, extracting the vehicle lamp region with high definition;
and if only one car light region exists in the picture of the vehicle to be identified, directly extracting the car light region.
As a preferred scheme, the preprocessing is performed on the car light region to obtain a boundary contour of the car light to be detected, and the preprocessing specifically comprises the following steps:
preprocessing the car light region by background removal, size normalization, gray level conversion and brightness balance to obtain a preprocessed picture;
extracting the boundary of the car lamp from the preprocessed picture based on a gradient operation algorithm;
and denoising and repairing the boundary to obtain a closed boundary contour of the vehicle lamp to be detected.
As a preferred scheme, the dividing the boundary contour of the vehicle lamp to be detected into sixteen directions at equal intervals specifically comprises:
and taking the geometric center of the boundary contour of the vehicle lamp to be detected as an original point, and equally dividing the boundary contour of the vehicle lamp to be detected into sixteen directions.
As a preferred scheme, the calculating the direction chain codes of each direction in the boundary contour of the vehicle lamp to be detected to obtain sixteen direction chain codes specifically includes:
and extracting intersection points of the directions and the boundary of the boundary outline of the vehicle lamp to be detected, and respectively calculating the distance between each intersection point and the geometric center of the boundary outline of the vehicle lamp to be detected to obtain sixteen direction chain codes.
As a preferred scheme, according to all the direction chain codes, calculating the similarity between the boundary profile of the car light to be detected and each car light boundary profile in a brand library, and outputting the selected car light boundary profile from the brand library according to the similarity specifically comprises the following steps:
calculating the coding distance of each direction chain code one by one; the coding distance is the distance between the direction chain code of the boundary outline of the vehicle lamp to be detected and the corresponding direction chain code in the boundary outline of the vehicle lamp;
calculating the similarity of each direction chain code through a first preset similarity calculation formula according to the coding distance and the weighting coefficient of each direction chain code;
taking the sum of the similarity of all the direction chain codes as the similarity of the boundary outline of the vehicle lamp to be detected and the vehicle lamp area;
and taking the car lamp boundary contour with the highest similarity as the selected car lamp boundary contour.
As a preferred scheme, the first preset calculation formula of the similarity specifically includes:
Figure BDA0002320088810000031
wherein LHiIs the similarity of the ith direction chain code, omegakIs a weighting coefficient, DS, corresponding to the ith direction chain codeiC is a constant value, and is the coding distance of the ith direction chain code.
As a preferred scheme, according to all the direction chain codes, calculating the similarity between the boundary profile of the car light to be detected and each car light boundary profile in a brand library, and outputting the selected car light boundary profile from the brand library according to the similarity specifically comprises the following steps:
calculating the coding distance of each direction chain code one by one; the coding distance is the distance between the direction chain code of the boundary outline of the vehicle lamp to be detected and the corresponding direction chain code in the boundary outline of the vehicle lamp;
calculating the similarity of each direction chain code through a second preset similarity calculation formula according to the coding distance and the weighting coefficient of each direction chain code;
taking the sum of the similarity of all the direction chain codes as the similarity of the boundary outline of the vehicle lamp to be detected and the vehicle lamp area;
and taking the car lamp boundary contour with the lowest similarity as the selected car lamp boundary contour.
As a preferred scheme, the second preset calculation formula of the similarity specifically includes:
LHi=ωkabc(DSi)
wherein LHiIs the similarity of the ith direction chain code, omegakIs a weighting coefficient, DS, corresponding to the ith direction chain codeiIs the coding distance, abc (DS), of the i-th direction chain codei) Is the absolute value of the coding distance of the ith direction chain code.
Correspondingly, the invention also provides a vehicle brand identification device, which comprises:
the car light region extraction module is used for acquiring and extracting a car light region from a picture of a car to be identified;
the boundary contour acquisition module is used for preprocessing the car lamp area to obtain a boundary contour of the car lamp to be detected;
the first calculation module is used for dividing the boundary contour of the vehicle lamp to be detected into sixteen directions at equal intervals, and calculating the direction chain codes of each direction in the boundary contour of the vehicle lamp to be detected to obtain sixteen direction chain codes;
the second calculation module is used for calculating the similarity between the boundary outline of the vehicle lamp to be detected and each boundary outline of the vehicle lamps in the brand library according to all the direction chain codes and outputting the boundary outline of the selected vehicle lamp from the brand library according to the similarity;
and the identification module is used for extracting the vehicle brand corresponding to the selected vehicle lamp boundary contour as the vehicle brand of the vehicle to be identified.
The embodiment of the invention has the following beneficial effects:
according to the method for identifying the vehicle brand, provided by the embodiment of the invention, a vehicle lamp area is obtained and extracted from a vehicle picture to be identified; preprocessing a car lamp area to obtain a boundary contour of a car lamp to be detected; dividing the boundary contour of the vehicle lamp to be detected into sixteen directions at equal intervals, and calculating direction chain codes of each direction in the boundary contour of the vehicle lamp to be detected to obtain sixteen direction chain codes; calculating the similarity between the boundary outline of the vehicle lamp to be detected and each vehicle lamp boundary outline in the brand library according to all the direction chain codes, and outputting the selected vehicle lamp boundary outline from the brand library according to the similarity; and extracting the vehicle brand corresponding to the selected vehicle lamp boundary contour as the vehicle brand of the vehicle to be identified. Compared with the vehicle brand identification method in the prior art, the vehicle brand identification method has the advantages that the influence of the environment, the size of the trademark pattern and human factors on the vehicle brand identification result is not considered all the time, the vehicle lamp boundary outline of the vehicle is automatically obtained and is judged according to the direction chain codes of the vehicle lamp boundary outline, and therefore the vehicle brand identification result is more accurate.
Furthermore, in the detection process of the car lamp boundary contour, the similarity between the car lamp boundary contour to be detected and each car lamp boundary contour in the brand library is calculated according to sixteen direction chain codes of the car lamp boundary contour, and the accuracy of the recognition result of the car brand can be further improved.
Drawings
FIG. 1 is a schematic flow chart diagram illustrating a first embodiment of a brand identification method for a vehicle provided by the present invention;
fig. 2 is a schematic structural diagram of a second embodiment of a vehicle brand identification apparatus provided in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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.
The first embodiment:
referring to fig. 1, a schematic flow chart of an embodiment of a method for identifying a brand of a vehicle according to the present invention is shown. As shown in fig. 1, the method includes steps 101 to 105, and each step is as follows:
step 101: and acquiring and extracting a first car light region from a picture of the car to be identified.
In this embodiment, step 101 specifically includes: acquiring and judging whether two vehicle lamp areas exist in a vehicle picture to be identified; if two vehicle lamp regions exist in the to-be-identified vehicle picture, judging whether the difference of the areas of the two vehicle lamp regions is larger than a threshold value; if the difference of the areas of the two vehicle lamp areas is larger than a threshold value, extracting the vehicle lamp area with the larger area; if the difference of the areas of the two vehicle lamp regions is smaller than a threshold value, extracting the vehicle lamp region with high definition; and if only one car light region exists in the picture of the car to be identified, directly extracting the car light region. It should be noted that, the car lamp region refers to a region corresponding to a lamp with the largest continuous area in the front of the vehicle, and generally refers to a region of the outline marker lamp, if several lamps of some automobiles are packaged in a car lamp housing, so that the area occupied by the car lamp housing is the largest, for example, if a low beam lamp, a high beam lamp, a fog lamp and the outline marker lamp are packaged under a car lamp housing, the region corresponding to the car lamp housing is the car lamp region herein.
In this embodiment, the inventor finds that the brand of a vehicle is related to the structure of a vehicle lamp, and the inventor also finds that the vehicle lamp is influenced by the intersection area of an engine cover, a fender and a front bumper, so that the vehicle lamp area is difficult to reform, and the vehicle lamp is not influenced by the illumination environment and still has visible characteristics at night.
Step 102: and preprocessing the car lamp area to obtain a boundary contour of the car lamp to be detected.
In this embodiment, step 102 specifically includes: preprocessing the car light region by background removal, size normalization, gray level conversion and brightness balance to obtain a preprocessed picture; extracting the boundary of the car lamp from the preprocessed picture based on a gradient operation algorithm; and denoising and repairing the boundary to obtain a closed boundary contour of the vehicle lamp to be detected.
In this embodiment, preprocessing of background removal, size normalization, gray level conversion and brightness equalization is performed on a car light region to obtain a preprocessed picture; the method specifically comprises the following steps: first, the lamp background in the lamp area is removed. The car light background mainly refers to an engine cover, a fender area, a front bumper area and an air inlet area, however, the color and the texture of the background are obviously different from the color and the texture characteristics of the car light area, the color of the background of the car light area is usually white or brown orange, and therefore, the car light background in the car light area can be removed through the background color and the texture. Secondly, the size is normalized, so that the result of the calculation of the direction chain code has standard performance, the foreground area of the car lamp is scaled to the same size in proportion, and the same car lamp is ensured to be equally large in resolution. And thirdly, carrying out gray level transformation, namely carrying out gray level transformation on the normalized first vehicle lamp area to obtain a gray level image. Fourthly, the gray level image is subjected to brightness equalization.
In this embodiment, the vehicle lamp area is subjected to background removal, size normalization, gray level conversion and brightness equalization, so that the accuracy of obtaining the boundary contour of the vehicle lamp to be detected is higher, and the accuracy of the vehicle identification result is further improved.
Step 103: dividing the boundary contour of the vehicle lamp to be detected into sixteen directions at equal intervals, and calculating direction chain codes of all directions in the boundary contour of the vehicle lamp to be detected to obtain sixteen direction chain codes.
In this embodiment, step 103 specifically includes: the method comprises the steps of establishing a plane rectangular coordinate system by taking the geometric center of a boundary outline of the vehicle lamp to be detected as an original point, dividing the boundary outline of the vehicle lamp to be detected into sixteen directions by taking a positive half shaft of a transverse shaft of the plane rectangular coordinate system as an initial line and taking a pi/8 interval and a counterclockwise direction, extracting intersection points of the directions and the boundary outline of the boundary of the vehicle lamp to be detected, calculating the distance between each intersection point and the geometric center of the boundary outline of the vehicle lamp to be detected respectively, and obtaining sixteen direction chain codes. For example, the intersection point of the second direction and the boundary of the car light to be detected is extracted, and the distance from the intersection point to the geometric center of the boundary of the car light to be detected is calculated to obtain the second direction chain code. It should be noted that the direction chain code refers to a distance from the intersection point to a geometric center of the boundary contour of the car light to be detected.
Step 104: and according to all the direction chain codes, calculating the similarity between the boundary outline of the vehicle lamp to be detected and each vehicle lamp boundary outline in the brand library, and outputting the selected vehicle lamp boundary outline from the brand library according to the similarity.
In this embodiment, step 104 specifically includes: calculating the coding distance of each direction chain code one by one; the coded distance is the distance between the direction chain code of the boundary outline of the vehicle lamp to be detected and the corresponding direction chain code in the boundary outline of the vehicle lamp; calculating the similarity of each direction chain code through a first preset similarity calculation formula according to the coding distance and the weighting coefficient of each direction chain code; taking the sum of the similarity of all direction chain codes as the similarity of the boundary outline of the vehicle lamp to be detected and the vehicle lamp area; and taking the car lamp boundary contour with the highest similarity as the selected car lamp boundary contour.
In this embodiment, the calculation formula of the first preset similarity is as follows:
Figure BDA0002320088810000071
wherein LHiIs the similarity of the ith direction chain code, omegakIs a weighting coefficient, DS, corresponding to the ith direction chain codeiC is a constant, and is usually 1, which is the coding distance of the ith direction chain code.
In this embodiment, step 104 specifically includes: calculating the coding distance of each direction chain code one by one; the coded distance is the distance between the direction chain code of the boundary outline of the vehicle lamp to be detected and the corresponding direction chain code in the boundary outline of the vehicle lamp; calculating the similarity of each direction chain code through a second preset similarity calculation formula according to the coding distance and the weighting coefficient of each direction chain code; taking the sum of the similarity of all direction chain codes as the similarity of the boundary outline of the vehicle lamp to be detected and the vehicle lamp area; and taking the car lamp boundary contour with the lowest similarity as the selected car lamp boundary contour.
In this embodiment, the calculation formula of the second preset similarity is as follows:
LHi=ωkabc(DSi)
wherein LHiIs the similarity of the ith direction chain code, omegakIs a weighting coefficient, DS, corresponding to the ith direction chain codeiIs the coding distance, abc (DS), of the i-th direction chain codei) Is the absolute value of the coding distance of the ith direction chain code.
In this embodiment, the coding distance of the first direction chain code is specifically described as follows: and acquiring a first direction chain code of the boundary outline of the vehicle lamp to be detected, selecting the first direction chain code of one vehicle lamp boundary outline from a brand library, and calculating the difference value of the two first direction chain codes, wherein the difference value is used as the coding distance of the first direction chain codes.
In this embodiment, the weighting coefficients are obtained as follows: if the direction chain code is located in a first quadrant in the plane rectangular coordinate system, the weighting coefficient of the direction chain code is 0.24; if the direction chain code is located in a second quadrant in the plane rectangular coordinate system, the weighting coefficient of the direction chain code is 0.35; if the direction chain code is located in a third quadrant in the plane rectangular coordinate system, the weighting coefficient of the direction chain code is 0.23; if the direction chain code is located in the fourth quadrant of the rectangular plane coordinate system, the weighting coefficient of the direction chain code is 0.18. Note that the weighting coefficients are obtained from the shooting inclination angle in the actually shot vehicle picture and the air intake of the front face of the vehicle, but are not limited to 0.24, 0.35, 0.23, and 0.18.
In this embodiment, the similarity between the boundary profile of the car light to be detected and the boundary profile of the car light in the brand library is determined according to the sixteen direction chain codes, so that the accuracy of the recognition result of the brand of the car can be further improved.
Step 105: and extracting the vehicle brand corresponding to the selected vehicle lamp boundary contour as the vehicle brand of the vehicle to be identified.
In view of the above, the method for identifying a vehicle brand provided by the embodiment of the invention includes the steps of firstly obtaining and extracting a vehicle lamp area from a vehicle picture to be identified; preprocessing a car lamp area to obtain a boundary contour of a car lamp to be detected; dividing the boundary contour of the vehicle lamp to be detected into sixteen directions at equal intervals, and calculating direction chain codes of each direction in the boundary contour of the vehicle lamp to be detected to obtain sixteen direction chain codes; calculating the similarity between the boundary outline of the vehicle lamp to be detected and each vehicle lamp boundary outline in the brand library according to all the direction chain codes, and outputting the selected vehicle lamp boundary outline from the brand library according to the similarity; and extracting the vehicle brand corresponding to the selected vehicle lamp boundary contour as the vehicle brand of the vehicle to be identified. Compared with the vehicle brand identification method in the prior art, the vehicle brand identification method has the advantages that the influence of the environment, the size of the trademark pattern and human factors on the vehicle brand identification result is not considered all the time, the vehicle lamp boundary outline of the vehicle is automatically obtained and is judged according to the direction chain codes of the vehicle lamp boundary outline, and therefore the vehicle brand identification result is more accurate. Furthermore, in the detection process of the car lamp boundary contour, the similarity between the car lamp boundary contour to be detected and each car lamp boundary contour in the brand library is calculated according to sixteen direction chain codes of the car lamp boundary contour, and the accuracy of the recognition result of the car brand can be further improved.
Second embodiment
Fig. 2 is a schematic structural diagram of a second embodiment of an identification apparatus for a brand of vehicle according to the present invention, which includes a vehicle lamp region extracting module 201, a boundary contour obtaining module 202, a first calculating module 203, a second calculating module 204, and an identification module 205.
The car light region extraction module 201 is used for acquiring and extracting a car light region from a picture of a vehicle to be identified;
the boundary contour acquisition module 202 is configured to preprocess a vehicle lamp region to obtain a boundary contour of a vehicle lamp to be detected;
the first calculation module 203 is configured to divide the boundary contour of the vehicle lamp to be detected into sixteen directions at equal intervals, and calculate direction chain codes of each direction in the boundary contour of the vehicle lamp to be detected to obtain sixteen direction chain codes;
the second calculation module 204 is configured to calculate, according to all the directional chain codes, a similarity between the boundary profile of the to-be-detected vehicle lamp and each vehicle lamp boundary profile in the brand library, and output a selected vehicle lamp boundary profile from the brand library according to the similarity;
and the identification module 205 is configured to extract a vehicle brand corresponding to the selected vehicle lamp boundary contour as a vehicle brand of the vehicle to be identified.
It should be noted that, the identification apparatus for a vehicle brand according to the embodiment of the present invention is used for executing all the method flows of the identification method for a vehicle brand, and the working principles and beneficial effects of the two are in one-to-one correspondence, so that details are not repeated.
Therefore, according to the technical scheme, the influence of the environment, the size of the trademark pattern and human factors on the vehicle brand identification result is not required to be considered all the time, the vehicle lamp boundary outline of the vehicle can be automatically acquired and judged according to the direction chain codes of the vehicle lamp boundary outline, and the vehicle brand identification result is more accurate. Moreover, in the detection process of the car lamp boundary contour, the similarity between the car lamp boundary contour to be detected and each car lamp boundary contour in the brand library is calculated according to sixteen direction chain codes of the car lamp boundary contour, and the accuracy of the recognition result of the car brand is further improved.
One of ordinary skill in the art will appreciate that all or part of the processes of the methods of the above embodiments may be implemented by hardware related to instructions of a computer program. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The foregoing is a preferred embodiment of the present invention, and it should be noted that it would be apparent to those skilled in the art that various modifications and enhancements can be made without departing from the principles of the invention, and such modifications and enhancements are also considered to be within the scope of the invention.

Claims (10)

1. A method of identifying a brand of a vehicle, comprising:
acquiring and extracting a car light region from a picture of a car to be identified;
preprocessing the car lamp area to obtain a boundary contour of the car lamp to be detected;
dividing the boundary contour of the vehicle lamp to be detected into sixteen directions at equal intervals, and calculating direction chain codes of all the directions in the boundary contour of the vehicle lamp to be detected to obtain sixteen direction chain codes;
calculating the similarity between the boundary outline of the vehicle lamp to be detected and each vehicle lamp boundary outline in a brand library according to all the direction chain codes, and outputting the selected vehicle lamp boundary outline from the brand library according to the similarity;
and extracting a vehicle brand corresponding to the selected vehicle lamp boundary contour as the vehicle brand of the vehicle to be identified.
2. The vehicle brand identification method according to claim 1, wherein the step of obtaining and extracting the headlight region from the picture of the vehicle to be identified comprises:
acquiring and judging whether two vehicle lamp areas exist in a vehicle picture to be identified;
if two vehicle lamp regions exist in the to-be-identified vehicle picture, judging whether the difference of the areas of the two vehicle lamp regions is larger than a threshold value;
if the difference of the areas of the two vehicle lamp areas is larger than a threshold value, extracting the vehicle lamp area with the larger area;
if the difference of the areas of the two vehicle lamp regions is smaller than a threshold value, extracting the vehicle lamp region with high definition;
and if only one car light region exists in the picture of the vehicle to be identified, directly extracting the car light region.
3. The vehicle brand identification method according to claim 1, wherein the preprocessing is performed on the vehicle lamp region to obtain a boundary profile of a vehicle lamp to be detected, and specifically comprises:
preprocessing the car light region by background removal, size normalization, gray level conversion and brightness balance to obtain a preprocessed picture;
extracting the boundary of the car lamp from the preprocessed picture based on a gradient operation algorithm;
and denoising and repairing the boundary to obtain a closed boundary contour of the vehicle lamp to be detected.
4. The method for identifying the brand of vehicle according to claim 1, wherein said contour of the boundary of the headlight to be detected is equally divided into sixteen directions, specifically:
and taking the geometric center of the boundary contour of the vehicle lamp to be detected as an original point, and equally dividing the boundary contour of the vehicle lamp to be detected into sixteen directions.
5. The vehicle brand identification method according to claim 4, wherein the direction chain codes of each direction in the boundary contour of the vehicle lamp to be detected are calculated to obtain sixteen direction chain codes, specifically:
and extracting intersection points of the directions and the boundary of the boundary outline of the vehicle lamp to be detected, and respectively calculating the distance between each intersection point and the geometric center of the boundary outline of the vehicle lamp to be detected to obtain sixteen direction chain codes.
6. The method for identifying a brand of a vehicle according to claim 1, wherein the similarity between the boundary contour of the vehicle lamp to be detected and each boundary contour of the vehicle lamps in a brand library is calculated according to all the direction chain codes, and the selected boundary contour of the vehicle lamp is output from the brand library according to the similarity, specifically:
calculating the coding distance of each direction chain code one by one; the coding distance is the distance between the direction chain code of the boundary outline of the vehicle lamp to be detected and the corresponding direction chain code in the boundary outline of the vehicle lamp;
calculating the similarity of each direction chain code through a first preset similarity calculation formula according to the coding distance and the weighting coefficient of each direction chain code;
taking the sum of the similarity of all the direction chain codes as the similarity of the boundary outline of the vehicle lamp to be detected and the vehicle lamp area;
and taking the car lamp boundary contour with the highest similarity as the selected car lamp boundary contour.
7. The method for identifying a brand of a vehicle according to claim 6, wherein the first predetermined similarity calculation formula is specifically:
Figure FDA0002320088800000021
wherein LHiIs the similarity of the ith direction chain code, omegakIs a weighting coefficient, DS, corresponding to the ith direction chain codeiC is a constant value, and is the coding distance of the ith direction chain code.
8. The method for identifying a brand of a vehicle according to claim 1, wherein the similarity between the boundary contour of the vehicle lamp to be detected and each boundary contour of the vehicle lamps in a brand library is calculated according to all the direction chain codes, and the selected boundary contour of the vehicle lamp is output from the brand library according to the similarity, specifically:
calculating the coding distance of each direction chain code one by one; the coding distance is the distance between the direction chain code of the boundary outline of the vehicle lamp to be detected and the corresponding direction chain code in the boundary outline of the vehicle lamp;
calculating the similarity of each direction chain code through a second preset similarity calculation formula according to the coding distance and the weighting coefficient of each direction chain code;
taking the sum of the similarity of all the direction chain codes as the similarity of the boundary outline of the vehicle lamp to be detected and the vehicle lamp area;
and taking the car lamp boundary contour with the lowest similarity as the selected car lamp boundary contour.
9. The method for identifying a brand of a vehicle according to claim 8, wherein the second predetermined formula for calculating the similarity is specifically:
LHi=ωkabc(DSi)
wherein LHiIs the similarity of the ith direction chain code, omegakIs a weighting coefficient, DS, corresponding to the ith direction chain codeiIs the coding distance, abc (DS), of the i-th direction chain codei) Is the absolute value of the coding distance of the ith direction chain code.
10. An apparatus for identifying a brand of a vehicle, comprising:
the car light region extraction module is used for acquiring and extracting a car light region from a picture of a car to be identified;
the boundary contour acquisition module is used for preprocessing the car lamp area to obtain a boundary contour of the car lamp to be detected;
the first calculation module is used for dividing the boundary contour of the vehicle lamp to be detected into sixteen directions at equal intervals, and calculating the direction chain codes of each direction in the boundary contour of the vehicle lamp to be detected to obtain sixteen direction chain codes;
the second calculation module is used for calculating the similarity between the boundary outline of the vehicle lamp to be detected and each boundary outline of the vehicle lamps in the brand library according to all the direction chain codes and outputting the boundary outline of the selected vehicle lamp from the brand library according to the similarity;
and the identification module is used for extracting the vehicle brand corresponding to the selected vehicle lamp boundary contour as the vehicle brand of the vehicle to be identified.
CN201911294352.1A 2019-12-16 2019-12-16 Vehicle brand identification method Active CN111046875B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911294352.1A CN111046875B (en) 2019-12-16 2019-12-16 Vehicle brand identification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911294352.1A CN111046875B (en) 2019-12-16 2019-12-16 Vehicle brand identification method

Publications (2)

Publication Number Publication Date
CN111046875A true CN111046875A (en) 2020-04-21
CN111046875B CN111046875B (en) 2023-04-07

Family

ID=70236967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911294352.1A Active CN111046875B (en) 2019-12-16 2019-12-16 Vehicle brand identification method

Country Status (1)

Country Link
CN (1) CN111046875B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116363690A (en) * 2023-05-31 2023-06-30 泗水县鑫泓商贸有限公司 Digital drawing angle measurement method for factory digitization

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105426899A (en) * 2014-09-19 2016-03-23 腾讯科技(北京)有限公司 Vehicle identification method and device and client side
CN107563265A (en) * 2016-06-30 2018-01-09 杭州海康威视数字技术股份有限公司 A kind of high beam detection method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105426899A (en) * 2014-09-19 2016-03-23 腾讯科技(北京)有限公司 Vehicle identification method and device and client side
CN107563265A (en) * 2016-06-30 2018-01-09 杭州海康威视数字技术股份有限公司 A kind of high beam detection method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116363690A (en) * 2023-05-31 2023-06-30 泗水县鑫泓商贸有限公司 Digital drawing angle measurement method for factory digitization
CN116363690B (en) * 2023-05-31 2023-08-15 泗水县鑫泓商贸有限公司 Digital drawing angle measurement method for factory digitization

Also Published As

Publication number Publication date
CN111046875B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
He et al. Recognition of car makes and models from a single traffic-camera image
JP4479478B2 (en) Pattern recognition method and apparatus
CN109389618B (en) Foreground and background detection method
US20080069400A1 (en) Context adaptive approach in vehicle detection under various visibility conditions
JP2977032B2 (en) Pattern matching apparatus and method in view of distance and direction
CN108764096B (en) Pedestrian re-identification system and method
CN110427979B (en) Road water pit identification method based on K-Means clustering algorithm
CN111553214B (en) Method and system for detecting smoking behavior of driver
CN106407951B (en) A kind of night front vehicles detection method based on monocular vision
CN107563301A (en) Red signal detection method based on image processing techniques
CN112819858B (en) Target tracking method, device, equipment and storage medium based on video enhancement
CN113011255A (en) Road surface detection method and system based on RGB image and intelligent terminal
CN111046875B (en) Vehicle brand identification method
CN110310263B (en) SAR image residential area detection method based on significance analysis and background prior
CN113763412B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN110909582B (en) Face recognition method and equipment
CN111723805A (en) Signal lamp foreground area identification method and related device
CN113191281A (en) ORB feature extraction method based on region of interest and adaptive radius
CN113496215A (en) Method and device for detecting human face of living body and electronic equipment
Kim Detection of traffic signs based on eigen-color model and saliency model in driver assistance systems
JP7264428B2 (en) Road sign recognition device and its program
Candamo et al. Detecting wires in cluttered urban scenes using a Gaussian model
CN116597432A (en) License plate recognition system based on improved yolov5 algorithm
CN113420633B (en) Traffic sign identification method based on UM enhancement and SIFT feature extraction
CN111382718B (en) Night pedestrian detection system and pedestrian detection method based on same

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
GR01 Patent grant
GR01 Patent grant