CN112990207A - License plate image extraction method, device and system, storage medium and computer equipment - Google Patents
License plate image extraction method, device and system, storage medium and computer equipment Download PDFInfo
- Publication number
- CN112990207A CN112990207A CN201911216230.0A CN201911216230A CN112990207A CN 112990207 A CN112990207 A CN 112990207A CN 201911216230 A CN201911216230 A CN 201911216230A CN 112990207 A CN112990207 A CN 112990207A
- Authority
- CN
- China
- Prior art keywords
- image
- license plate
- front face
- algorithm
- gray
- 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
- 238000000605 extraction Methods 0.000 title claims abstract description 45
- 238000003860 storage Methods 0.000 title claims abstract description 19
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 71
- 241000270295 Serpentes Species 0.000 claims abstract description 23
- 230000000877 morphologic effect Effects 0.000 claims abstract description 20
- 238000000034 method Methods 0.000 claims description 20
- 238000009499 grossing Methods 0.000 claims description 9
- 230000006870 function Effects 0.000 claims description 7
- 238000012216 screening Methods 0.000 claims description 5
- 230000001629 suppression Effects 0.000 claims description 5
- 230000010339 dilation Effects 0.000 claims description 4
- 230000003628 erosive effect Effects 0.000 claims description 4
- 238000004364 calculation method Methods 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 claims description 3
- 238000012544 monitoring process Methods 0.000 abstract description 12
- 238000005516 engineering process Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 238000004590 computer program Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000001914 filtration Methods 0.000 description 3
- 238000012806 monitoring device Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- ZAKOWWREFLAJOT-CEFNRUSXSA-N D-alpha-tocopherylacetate Chemical compound CC(=O)OC1=C(C)C(C)=C2O[C@@](CCC[C@H](C)CCC[C@H](C)CCCC(C)C)(C)CCC2=C1C ZAKOWWREFLAJOT-CEFNRUSXSA-N 0.000 description 2
- 238000005452 bending Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000003708 edge detection Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000011218 segmentation Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 238000005260 corrosion Methods 0.000 description 1
- 230000007797 corrosion Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000005489 elastic deformation Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 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
- 238000005457 optimization Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 239000004065 semiconductor Substances 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
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
- G06V10/267—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
- G06T5/30—Erosion or dilatation, e.g. thinning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/12—Edge-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/148—Segmentation of character regions
- G06V30/153—Segmentation of character regions using recognition of characters or words
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20112—Image segmentation details
- G06T2207/20116—Active contour; Active surface; Snakes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30248—Vehicle exterior or interior
- G06T2207/30252—Vehicle exterior; Vicinity of vehicle
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/62—Text, e.g. of license plates, overlay texts or captions on TV images
- G06V20/625—License plates
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
The embodiment of the invention provides a license plate image extraction method, a license plate image extraction device, a license plate image extraction system, a storage medium and computer equipment. According to the technical scheme provided by the embodiment of the invention, a front face image of a vehicle is obtained and converted into a gray scale image; calculating the gray level image through a Canny algorithm and a Snake active contour model to obtain an edge contour curve of the gray level image; determining a target area according to the license plate area characteristics extracted from the gray-scale image and the edge contour curve; according to the target area and the vehicle front face image, a license plate image is extracted from the vehicle front face image through a morphological algorithm and a Mask template algorithm, the definition of the license plate image can be improved, the low resolution of monitoring equipment and external factors are reduced, the quality of the vehicle front face image collected by the monitoring equipment is poor, and the quality of the extracted license plate image is poor.
Description
[ technical field ] A method for producing a semiconductor device
The invention relates to the technical field of Internet of things, in particular to a license plate image extraction method, a license plate image extraction device, a license plate image extraction system, a storage medium and computer equipment.
[ background of the invention ]
The intelligent traffic system is an advanced automatic road traffic management system and mainly depends on the advanced computer video image technology, mode recognition, computer network technology, sensor technology and radio frequency technology. The vehicle identification system based on the computer video image technology is not only a current research hotspot but also becomes a trend of intelligent traffic development due to the characteristics of low cost, high efficiency and high automation level.
At present, the object processed by the vehicle identification system is mainly a vehicle front face image acquired by key position monitoring equipment at an intersection of a main road of urban traffic and an expressway. Due to the low resolution of the monitoring equipment and the influence of external factors, the quality of the front face image of the vehicle acquired by the monitoring equipment is poor, and the quality of the extracted license plate image is also poor.
[ summary of the invention ]
In view of this, embodiments of the present invention provide a license plate image extraction method, an apparatus, a storage medium, and a computer device, which can solve the problem in the related art that the quality of a vehicle front face image acquired by a monitoring device is poor due to low resolution of the monitoring device and external factors, and the quality of the extracted license plate image is also poor.
In a first aspect, an embodiment of the present invention provides a license plate image extraction method, where the method includes:
acquiring a vehicle front face image, and converting the vehicle front face image into a gray scale image;
calculating the gray level image through a Canny algorithm and a Snake active contour model to obtain an edge contour curve of the gray level image;
determining a target area according to the license plate area characteristics extracted from the gray-scale image and the edge contour curve;
and extracting a license plate image from the vehicle front face image through a morphological algorithm and a Mask template algorithm according to the target area and the vehicle front face image.
Optionally, obtaining an edge contour curve of the gray scale image through a Canny algorithm and a Snake active contour model, specifically including:
calculating the gray scale image through a Canny algorithm to obtain a first edge profile curve of the gray scale image;
and calculating the first edge profile curve through a Snake active profile model to obtain a second edge profile curve of the gray scale image.
Optionally, determining a target region according to the license plate region feature extracted from the grayscale image and the edge contour specifically includes:
screening all closed regions from the second edge profile curve;
calculating the area of each closed region, and deleting the closed regions with the areas smaller than a preset threshold value to obtain the rest closed regions;
and determining a target area from the rest closed areas according to the license plate area characteristics.
Optionally, extracting a license plate image from the vehicle front face image through a morphology algorithm and a Mask template algorithm according to the target region and the vehicle front face image, and specifically including:
calculating the target area through a morphological algorithm to generate a license plate area;
and extracting the license plate image from the vehicle front face image through a Mask template algorithm according to the license plate region and the vehicle front face image.
Optionally, the morphological algorithm comprises erosion and/or dilation.
Optionally, the calculating the gray scale map by a Canny algorithm to obtain a first edge profile curve of the gray scale map specifically includes:
smoothing the gray level image through a Gaussian smoothing filter;
calculating gradient strength and gradient direction of the gray scale map by finite difference of first order partial derivatives of the gray scale map to generate a global gradient map of the gray scale map;
carrying out non-maximum suppression on each local gradient area in the global gradient map so as to determine edge points in the gray map;
connecting the edge points by a double threshold method to form the first edge profile curve.
Optionally, the Snake active contour model includes: where v(s) is the edge profile curve, s ∈ [0,1 ]],EtotalIs an energy function of v(s), α, β are constants, Eext(v (s)) is the external energy of v(s).
In another aspect, an embodiment of the present invention provides a license plate image extraction device, where the device includes:
the conversion module is used for acquiring a front face image of the vehicle and converting the front face image of the vehicle into a gray scale image;
the first calculation module is used for calculating the gray level image through a Canny algorithm and a Snake active contour model to obtain an edge contour curve of the gray level image;
the determining module is used for determining a target area according to the license plate area characteristics extracted from the gray-scale image and the edge contour curve;
and the extraction module is used for extracting the license plate image from the vehicle front face image through a morphological algorithm and a Mask template algorithm according to the target area and the vehicle front face image.
On the other hand, the embodiment of the invention provides a storage medium, which comprises a stored program, wherein when the program runs, the device where the storage medium is located is controlled to execute the license plate image extraction method.
In another aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, where the memory is configured to store information including program instructions, and the processor is configured to control execution of the program instructions, where the program instructions are loaded into and executed by the processor to implement the steps of the license plate image extraction method.
According to the technical scheme of the license plate image extraction method, the license plate image extraction device, the license plate image extraction system, the storage medium and the computer equipment, the front face image of the vehicle is obtained, and the front face image of the vehicle is converted into the gray image; calculating the gray level image through a Canny algorithm and a Snake active contour model to obtain an edge contour curve of the gray level image; determining a target area according to the license plate area characteristics extracted from the gray-scale image and the edge contour curve; according to the target area and the vehicle front face image, a license plate image is extracted from the vehicle front face image through a morphological algorithm and a Mask template algorithm, the definition of the license plate image can be improved, and the influence of poor quality of the vehicle front face image caused by low resolution of monitoring equipment and external factors on the extraction of the license plate image is reduced.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a flowchart of a license plate image extraction method according to an embodiment of the present invention;
fig. 2 is a flowchart of a license plate image extraction method according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of a license plate image extraction device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a computer device according to an embodiment of the present invention.
[ detailed description ] embodiments
For better understanding of the technical solutions of the present invention, the following detailed descriptions of the embodiments of the present invention are provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and 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.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of associative relationship that describes an associated object, meaning that three types of relationships may exist, e.g., A and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Fig. 1 is a flowchart of a license plate image extraction method according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
and 102, acquiring a front face image of the vehicle, and converting the front face image of the vehicle into a gray-scale image.
And 104, calculating the gray-scale image through a Canny algorithm and a Snake active contour model to obtain an edge contour curve of the gray-scale image.
And 106, determining a target area according to the license plate area characteristics extracted from the gray-scale image and the edge contour curve.
And 108, extracting a license plate image from the vehicle front face image through a morphological algorithm and a Mask template algorithm according to the target area and the vehicle front face image.
In the technical scheme of the license plate image extraction method provided by the embodiment, a front face image of a vehicle is obtained and converted into a gray scale image; calculating the gray level image through a Canny algorithm and a Snake active contour model to obtain an edge contour curve of the gray level image; determining a target area according to the license plate area characteristics extracted from the gray-scale image and the edge contour curve; according to the target area and the vehicle front face image, a license plate image is extracted from the vehicle front face image through a morphological algorithm and a Mask template algorithm, the definition of the license plate image can be improved, the low resolution of monitoring equipment and external factors are reduced, the quality of the vehicle front face image collected by the monitoring equipment is poor, and the quality of the extracted license plate image is poor.
Fig. 2 is a flowchart of a license plate image extraction method according to another embodiment of the present invention, as shown in fig. 2, the method includes:
In this embodiment, the front image of the vehicle is mainly an image of a key position monitoring device at an intersection of a main road of urban traffic and an expressway, which is shot from the front of the vehicle downwards.
And 204, calculating the gray level image through a Canny algorithm to obtain a first edge contour curve of the gray level image.
Currently, in the related art, the Sobel algorithm is adopted for image edge segmentation. The Sobel algorithm is a discrete difference operator used to calculate an approximation of the gradient of the image luminance function. However, the Sobel algorithm does not strictly distinguish the subject of the image from the background, i.e., the Sobel algorithm does not process the image based on the gray scale. Since the Sobel algorithm does not strictly simulate the visual physiological characteristics of a human, the extracted image contour is sometimes unsatisfactory, and a good effect is not achieved in vehicle identification.
Since the Canny algorithm has better function than most image processing algorithms, the Canny algorithm is adopted in the embodiment to carry out edge detection on the gray level image.
In this embodiment, step 204 specifically includes:
and 2042, smoothing the gray level image through a Gaussian smoothing filter.
In this embodiment, the Canny algorithm is an optimization algorithm with multiple stages of filtering, enhancing, and detecting, and before processing, the Canny algorithm utilizes a gaussian smoothing filter to smooth the gray level map to remove noise.
Step 2044, calculating the gradient strength and gradient direction of the gray scale image through the finite difference of the first order partial derivatives of the gray scale image to generate a global gradient image of the gray scale image.
And 2046, performing non-maximum suppression on each local gradient area in the global gradient map to determine edge points in the gray scale map.
Specifically, each local gradient area in the global gradient map is subjected to non-maximum suppression, the pixel value of the maximum point in the local gradient is reserved, and meanwhile, the gray value of the point corresponding to the non-maximum point is set to be 0, so that the edge point in the gray map is determined, and the discrete response brought by edge detection is eliminated.
Step 2048, connecting the edge points by a double threshold method to form the first edge profile curve.
Specifically, real edge points in the gray-scale image are further extracted through a double-threshold method, and the real edge points processed through the double-threshold method are connected to form a first edge contour curve. The double-threshold method is characterized in that two thresholds are set, namely a high threshold and a low threshold, edge points with pixel point intensity values larger than the high threshold are used as real edge points, and edge points with pixel point intensity values smaller than the low threshold are used as non-real edge points; and if the intensity value of the adjacent pixel point is greater than the high threshold value, the edge point is taken as a real edge point, otherwise, the edge point is taken as a non-real edge point.
And step 206, calculating the first edge contour curve through a Snake active contour model to obtain a second edge contour curve of the gray scale image.
In this embodiment, the Snake active contour model includes: where v(s) is the edge profile curve, s ∈ [0,1 ]],EtotalIs an energy function of v(s), α, β are constants, Eext(v (s)) is the external energy of v(s).
In this embodiment, v(s) is a first edge profile curve.
Among them, Snake active contour modelIs the elastic energy of v(s),is a bending energy of v(s). The elastic energy and the bending energy are collectively called internal energy (internal force). The internal energy is used for controlling the elastic deformation of the contour line, and plays a role in keeping the continuity and smoothness of the contour. Eext(v (s)) is the external energy of v(s), and represents the condition that the deformation curve is matched with the local characteristics of the image.
In particular, external energy Eext(v (s)) comprises:
Eext(v(s))=Eimage(v(s))+Econ(v(s))
wherein E isimage(v (s)) is the degree of agreement between v(s) and the image feature. Econ(v (s)) is a control energy of v(s), and the user determines E, usually from image featurescon(v (s)).
In this embodiment, E is expressed by Euler's formulatotalAnd (5) solving the coordinates of the points on the second contour curve at minimum, and drawing according to the points to obtain the second contour curve. Wherein E is expressed by Euler's formulatotalThe minimum necessary condition is:
in this embodiment, a Canny algorithm is used to obtain a first edge contour curve of the gray scale map, then the first edge contour curve is used as an initial contour curve of the Snake active contour model, and a finally obtained second edge contour curve can approach the region boundary more accurately.
And 208, screening all closed areas from the second edge contour curve.
In this embodiment, since the target region includes the license plate, the preset threshold value may be set according to an area of the license plate.
And step 212, determining a target area from the rest closed areas according to the license plate area features extracted from the gray-scale image.
In this embodiment, the license plate region features include color features and geometric features of the license plate region.
For example, a convolutional neural network algorithm is adopted to extract geometric features of a license plate area in the gray-scale image, wherein the geometric features comprise the aspect ratio of the license plate; and extracting the color characteristics of the license plate area in the gray-scale image by adopting an RGB color space.
The embodiment of the invention is based on the edge segmentation technology based on the Canny algorithm, uses the thinking method of the Snake active contour model for reference, and combines the characteristics of the license plate region, so that the contour of the target region can be rapidly segmented from the gray-scale image, and a good foundation is laid for further extracting the feature markers in the region and identifying the vehicles.
And 214, calculating the target area through a morphological algorithm to generate a license plate area.
The morphology algorithm is an image processing method developed according to a set theory method of mathematical morphology for binary images. Morphological image processing is usually represented in the form of a neighborhood operation, a specially defined field called "structuring element", which performs a specific logical operation on the region corresponding to the binary image at each pixel position, the result of the logical operation being the response pixel of the output image.
In this embodiment, the morphological algorithm includes erosion and/or dilation. And when the corrosion, namely the result of the phase addition of the elements at the corresponding positions in the template and the input image is not 0 at all, the result is 0. Erosion is used to delete certain pixels of the boundary of an object in an image. The expansion, i.e. the result of one and of the elements at the corresponding positions of the template and the input image is not 0. Dilation is used to add elements to the boundary of an object in an image.
In this embodiment, the image in the license plate region is clearer than the image in the target region.
And step 216, extracting the license plate image from the vehicle front face image through a Mask template algorithm according to the license plate region and the vehicle front face image.
In this embodiment, an image corresponding to a license plate region is used as a region map, and a Mask template algorithm is to perform an and operation on pixels in the region map and corresponding pixels in a vehicle front face image, and the result of the and operation is to extract the license plate image from the vehicle front face image.
In the technical scheme of the license plate image extraction method provided by the embodiment, a front face image of a vehicle is obtained and converted into a gray scale image; calculating the gray level image through a Canny algorithm and a Snake active contour model to obtain an edge contour curve of the gray level image; determining a target area according to the license plate area characteristics extracted from the gray-scale image and the edge contour curve; according to the target area and the vehicle front face image, a license plate image is extracted from the vehicle front face image through a morphological algorithm and a Mask template algorithm, the definition of the license plate image can be improved, the low resolution of monitoring equipment and external factors are reduced, the quality of the vehicle front face image collected by the monitoring equipment is poor, and the quality of the extracted license plate image is poor.
Fig. 3 is a schematic structural diagram of a license plate image extraction device according to an embodiment of the present invention, and as shown in fig. 3, the device includes: .
And the conversion module 31 is configured to acquire a vehicle front face image and convert the vehicle front face image into a grayscale image.
And the first calculating module 32 is used for calculating the gray scale map through a Canny algorithm to obtain a first edge profile curve of the gray scale map.
In this embodiment, the calculation module 32 specifically includes: a filtering submodule 321, a generating submodule 322, a determining submodule 323 and a connecting submodule 324.
And a filtering submodule 321, configured to perform smoothing processing on the grayscale map through a gaussian smoothing filter.
A generation submodule 322 for calculating the gradient strength and gradient direction of the gray map by finite differences of the first order partial derivatives of the gray map to generate a global gradient map of the gray map.
The first determining submodule 323 is configured to perform non-maximum suppression on each local gradient region in the global gradient map to determine an edge point in the grayscale map.
A connecting submodule 324 for connecting the edge points by a double threshold method to form a first edge profile curve.
And a second calculating module 33, configured to calculate the first edge contour curve through the Snake active contour model to obtain a second edge contour curve of the grayscale map.
In this embodiment, the Snake active contour model includes: where v(s) is the edge profile curve, s ∈ [0,1 ]],EtotalIs an energy function of v(s), α, β are constants, Eext(v (s)) is the external energy of v(s).
And the determining module 34 is used for determining the target area according to the license plate area features and the edge contour curve extracted from the gray-scale image.
In this embodiment, the determining module 34 specifically includes: a filter submodule 341, a delete submodule 34, and a determination submodule 343.
A screening submodule 341 for screening all closed regions from the second edge profile.
And the deleting submodule 342 is configured to calculate an area of each closed region, and delete the closed regions with the area smaller than a preset threshold value to obtain remaining closed regions.
And the second determining submodule 343 is configured to determine the target area from the remaining closed areas according to the license plate area characteristics.
And the extraction module 35 is configured to extract a license plate image from the vehicle front face image through a morphological algorithm and a Mask template algorithm according to the target region and the vehicle front face image.
In this embodiment, the extracting module 35 specifically includes: a computation submodule 36 and an extraction submodule 37.
And the calculating submodule 36 is used for calculating the target area through a morphological algorithm to generate a license plate area.
And the extraction submodule 37 is used for extracting the license plate image from the vehicle front face image through a Mask template algorithm according to the license plate region and the vehicle front face image.
The license plate image extraction device provided in this embodiment may be used to implement the license plate image extraction method in fig. 1 to fig. 2, and specific description may refer to the embodiment of the license plate image extraction method, and will not be described repeatedly here.
According to the technical scheme of the license plate image extraction device, a front face image of a vehicle is obtained and converted into a gray scale image; calculating the gray level image through a Canny algorithm and a Snake active contour model to obtain an edge contour curve of the gray level image; determining a target area according to the license plate area characteristics extracted from the gray-scale image and the edge contour curve; according to the target area and the vehicle front face image, a license plate image is extracted from the vehicle front face image through a morphological algorithm and a Mask template algorithm, the definition of the license plate image can be improved, the low resolution of monitoring equipment and external factors are reduced, the quality of the vehicle front face image collected by the monitoring equipment is poor, and the quality of the extracted license plate image is poor.
Fig. 4 is a schematic diagram of a computer device according to an embodiment of the present invention. As shown in fig. 4, the computer device 20 of this embodiment includes: the processor 21, the memory 22, and the computer program 23 stored in the memory 22 and capable of running on the processor 21, where the computer program 23 is executed by the processor 21 to implement the method for extracting a license plate image in an embodiment, and in order to avoid repetition, the details are not repeated herein. Alternatively, the computer program is executed by the processor 21 to implement the functions of the models/units applied to the license plate image extraction apparatus in the embodiments, which are not repeated herein to avoid repetition.
The computer device 20 includes, but is not limited to, a processor 21, a memory 22. Those skilled in the art will appreciate that fig. 4 is merely an example of a computer device 20 and is not intended to limit the computer device 20 and that it may include more or fewer components than shown, or some of the components may be combined, or different components, e.g., the computer device may also include input output devices, network access devices, buses, etc.
The Processor 21 may be a Central Processing Unit (CPU), other general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 22 may be an internal storage unit of the computer device 20, such as a hard disk or a memory of the computer device 20. The memory 22 may also be an external storage device of the computer device 20, such as a plug-in hard disk provided on the computer device 20, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 22 may also include both internal storage units of the computer device 20 and external storage devices. The memory 22 is used for storing computer programs and other programs and data required by the computer device. The memory 22 may also be used to temporarily store data that has been output or is to be output.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a Processor (Processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (10)
1. A license plate image extraction method is characterized by comprising the following steps:
acquiring a vehicle front face image, and converting the vehicle front face image into a gray scale image;
calculating the gray level image through a Canny algorithm and a Snake active contour model to obtain an edge contour curve of the gray level image;
determining a target area according to the license plate area characteristics extracted from the gray-scale image and the edge contour curve;
and extracting a license plate image from the vehicle front face image through a morphological algorithm and a Mask template algorithm according to the target area and the vehicle front face image.
2. The license plate image extraction method of claim 1, wherein an edge contour curve of the gray scale image is obtained through a Canny algorithm and a Snake active contour model, and the method specifically comprises the following steps:
calculating the gray scale image through a Canny algorithm to obtain a first edge profile curve of the gray scale image;
and calculating the first edge profile curve through a Snake active profile model to obtain a second edge profile curve of the gray scale image.
3. The license plate image extraction method of claim 2, wherein determining a target region according to the license plate region feature extracted from the gray-scale image and the edge contour specifically comprises:
screening all closed regions from the second edge profile curve;
calculating the area of each closed region, and deleting the closed regions with the areas smaller than a preset threshold value to obtain the rest closed regions;
and determining a target area from the rest closed areas according to the license plate area characteristics.
4. The license plate image extraction method according to claim 1, wherein a license plate image is extracted from the vehicle front face image by a morphological algorithm and a Mask template algorithm according to the target region and the vehicle front face image, and specifically comprises:
calculating the target area through a morphological algorithm to generate a license plate area;
and extracting the license plate image from the vehicle front face image through a Mask template algorithm according to the license plate region and the vehicle front face image.
5. The license plate image extraction method of claim 1, wherein the morphological algorithm comprises erosion and/or dilation.
6. The license plate image extraction method of claim 2, wherein the calculating the gray scale map by a Canny algorithm to obtain a first edge contour curve of the gray scale map specifically comprises:
smoothing the gray level image through a Gaussian smoothing filter;
calculating gradient strength and gradient direction of the gray scale map by finite difference of first order partial derivatives of the gray scale map to generate a global gradient map of the gray scale map;
carrying out non-maximum suppression on each local gradient area in the global gradient map so as to determine edge points in the gray map;
connecting the edge points by a double threshold method to form the first edge profile curve.
8. A license plate image extraction device, characterized in that the device comprises:
the conversion module is used for acquiring a front face image of the vehicle and converting the front face image of the vehicle into a gray scale image;
the first calculation module is used for calculating the gray level image through a Canny algorithm and a Snake active contour model to obtain an edge contour curve of the gray level image;
the determining module is used for determining a target area according to the license plate area characteristics extracted from the gray-scale image and the edge contour curve;
and the extraction module is used for extracting the license plate image from the vehicle front face image through a morphological algorithm and a Mask template algorithm according to the target area and the vehicle front face image.
9. A storage medium, characterized in that the storage medium includes a stored program, wherein, when the program runs, a device on which the storage medium is located is controlled to execute the license plate image extraction method according to any one of claims 1 to 7.
10. A computer device comprising a memory for storing information including program instructions and a processor for controlling the execution of the program instructions, wherein the program instructions are loaded and executed by the processor to implement the steps of the license plate image extraction method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911216230.0A CN112990207A (en) | 2019-12-02 | 2019-12-02 | License plate image extraction method, device and system, storage medium and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911216230.0A CN112990207A (en) | 2019-12-02 | 2019-12-02 | License plate image extraction method, device and system, storage medium and computer equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112990207A true CN112990207A (en) | 2021-06-18 |
Family
ID=76331429
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911216230.0A Pending CN112990207A (en) | 2019-12-02 | 2019-12-02 | License plate image extraction method, device and system, storage medium and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112990207A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114119599A (en) * | 2021-12-08 | 2022-03-01 | 重庆大学 | Surface roughness detection method based on image interesting region extraction |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108830868A (en) * | 2018-04-19 | 2018-11-16 | 江南大学 | It is a kind of that the circular fitting method combined is returned based on Snake model and iteration dipole inversion |
-
2019
- 2019-12-02 CN CN201911216230.0A patent/CN112990207A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108830868A (en) * | 2018-04-19 | 2018-11-16 | 江南大学 | It is a kind of that the circular fitting method combined is returned based on Snake model and iteration dipole inversion |
Non-Patent Citations (1)
Title |
---|
廖晓姣等: "基于边缘检测和形态学的车牌定位算法", 《现代电子技术》, pages 17 - 19 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114119599A (en) * | 2021-12-08 | 2022-03-01 | 重庆大学 | Surface roughness detection method based on image interesting region extraction |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110414507B (en) | License plate recognition method and device, computer equipment and storage medium | |
CN108229475B (en) | Vehicle tracking method, system, computer device and readable storage medium | |
CN111145209A (en) | Medical image segmentation method, device, equipment and storage medium | |
CN110826418B (en) | Facial feature extraction method and device | |
CN107221005B (en) | Object detection method and device | |
CN113077419A (en) | Information processing method and device for hip joint CT image recognition | |
CN111369570B (en) | Multi-target detection tracking method for video image | |
CN110991310B (en) | Portrait detection method, device, electronic equipment and computer readable medium | |
US20140050411A1 (en) | Apparatus and method for generating image feature data | |
CN114444565B (en) | Image tampering detection method, terminal equipment and storage medium | |
CN112651953A (en) | Image similarity calculation method and device, computer equipment and storage medium | |
Chen et al. | Image segmentation based on mathematical morphological operator | |
CN117315406B (en) | Sample image processing method, device and equipment | |
CN111105427A (en) | Lung image segmentation method and system based on connected region analysis | |
CN117115117B (en) | Pathological image recognition method based on small sample, electronic equipment and storage medium | |
CN113542868A (en) | Video key frame selection method and device, electronic equipment and storage medium | |
CN112990207A (en) | License plate image extraction method, device and system, storage medium and computer equipment | |
CN115937825B (en) | Method and device for generating robust lane line under BEV of on-line pitch angle estimation | |
CN109766738B (en) | Fingerprint identification method and device and computer readable storage medium | |
CN114529570A (en) | Image segmentation method, image identification method, user certificate subsidizing method and system | |
CN115376106A (en) | Vehicle type identification method, device, equipment and medium based on radar map | |
CN110580706A (en) | Method and device for extracting video background model | |
CN114299007A (en) | Flame detection method and system and computer readable storage medium | |
Tekeli et al. | Shape and data driven texture segmentation using local binary patterns | |
KR20100009451A (en) | Method for determining ground line |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210618 |