CN110689016A - License plate image coarse positioning method - Google Patents
License plate image coarse positioning method Download PDFInfo
- Publication number
- CN110689016A CN110689016A CN201810728982.4A CN201810728982A CN110689016A CN 110689016 A CN110689016 A CN 110689016A CN 201810728982 A CN201810728982 A CN 201810728982A CN 110689016 A CN110689016 A CN 110689016A
- Authority
- CN
- China
- Prior art keywords
- license plate
- image
- edge
- temporary
- pixel point
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 32
- 238000001514 detection method Methods 0.000 description 5
- 238000009825 accumulation Methods 0.000 description 4
- 238000003708 edge detection Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000011218 segmentation 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
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The invention provides a license plate image coarse positioning method, which comprises the following steps: the method comprises the following steps of firstly, graying an input image to generate a gray image; step two, obtaining an image edge image; step three, obtaining an integral image of the gray level image generated in the step one and the image edge image generated in the step two; scanning each pixel of the gray level image to generate a corresponding license plate probability map; step five, horizontally scanning the license plate probability map to obtain a horizontal area of license plate distribution; and sixthly, vertically scanning the horizontal area of the license plate distribution obtained in the fifth step to obtain a license plate candidate area. The method for positioning the license plate by adopting the edge characteristics solves the problem of low license plate positioning accuracy, greatly improves the license plate positioning efficiency and saves time.
Description
Technical Field
The invention relates to the technical field of license plate image positioning, in particular to a license plate image rough positioning method.
Background
The level of digitization in cities in China is higher and higher, and license plate identification is an important technology in digitized cities. The license plate recognition is generally divided into three modules, namely license plate detection, license plate segmentation and license plate recognition. The license plate detection module consumes the most time, and if the speed and the accuracy of license plate detection are improved, the license plate detection module is a difficulty in the prior art.
In The prior art, models such as SSD (Single Shot multi-frame detection) are adopted for license plate positioning, but The SSD model is complex, and The final time consumption is large even though The model is compressed. The license plate is positioned by adopting edge detection (the image edge detection greatly reduces the data quantity, removes irrelevant information and retains important structural attributes of the image), but the license plate selection area obtained by only depending on the edge characteristics has a large number of non-license plate areas, and the accuracy is low.
Disclosure of Invention
In order to solve the problems, the invention provides a license plate image coarse positioning method, which improves the accuracy of license plate positioning.
In order to realize the purpose, the invention adopts the technical scheme that:
a license plate image rough positioning method comprises the following steps:
the method comprises the following steps of firstly, graying an input image to generate a gray image;
step two, obtaining an image edge image;
step three, obtaining an integral image of the gray level image generated in the step one and the image edge image generated in the step two;
scanning each pixel of the gray level image to generate a corresponding license plate probability map;
step five, horizontally scanning the license plate probability map to obtain a horizontal area of license plate distribution;
and sixthly, vertically scanning the horizontal area of the license plate distribution obtained in the fifth step to obtain a license plate candidate area.
Preferably, the image edge map obtained in the second step is obtained by a sobel method.
Preferably, the method for generating the license plate probability map in the fourth step comprises the following steps:
a. setting the pixel value of the pixel point (i, j) of the input image p (i, j)
i ∈ (0, pic _ init _ height), j ∈ (0, pic _ init _ width); pic _ init _ width is the input image width, pic _ init _ height is the input image height;
b. two temporary regions are arbitrarily generated:
the first temporary region left pixel point is area1_ left ═ j-24;
the first temporary region right pixel point is area1_ right ═ j + 24;
pixel point on the first temporary region, area1_ top ═ i-3;
the first pixel point under the temporary region is area1_ bottom ═ i + 3;
the second temporary region left pixel point is area2_ left ═ j-34;
the second temporary region right pixel is area2_ right ═ j + 34;
pixel points on the second temporary region are area2_ top ═ i-53;
the second pixel point in the temporary region is area2_ bottom ═ i + 53;
c. obtaining an edge image mean value 1_ edge _ mean and a grayscale image mean value 1_ grey _ mean corresponding to the first temporary region; obtaining the edge map mean corresponding to the second temporary region
area2_edge_mean;
d. Defining temporary values temp1, temp2, temp 3;
if the temporary value temp1 is 1, it indicates that the small neighborhood edge mean value of the current pixel point is larger than the large neighborhood edge mean value thereof, indicating that the current point is located in a region with dense edges;
if the temporary value temp2 is 1, it indicates that the gray value of the current pixel point is larger than the neighborhood gray average value, and is a local maximum value;
if the temporary value temp3 is 1, it indicates that the current pixel point requires the edge mean value of the small neighborhood to be much larger than the edge mean value of the large neighborhood on the basis of the local maximum;
setting (i.j) pixel values of a license plate probability map of a position:
if temp1 ═ 1, temp2 ═ 1, and temp3 ═ 1 are simultaneously satisfied, it indicates that the current pixel point can be a point on one character region.
Preferably, the method for obtaining the horizontal area in the fifth step is to scan the license plate probability map row by row from top to bottom, accumulate the number of the bright spots encountered in a row, if the number of the bright spots accumulated in a row exceeds 70, the row is considered to be a valid row, and if the number of the continuously valid rows exceeds 30, the strip area is considered to possibly contain the license plate, and record the area.
Preferably, the method for obtaining the license plate candidate region in the sixth step is to scan a horizontal region of the scanned license plate distribution, scan the license plate probability map row by row from left to right, accumulate the number of the bright spots encountered in one row, if the number of the bright spots in one row exceeds 15, the row is considered to be an effective row, and if the number of the continuous effective rows exceeds 50, the scanned region is the license plate region; and after all the scanning is finished, all the obtained regions are all the license plate candidate regions.
The method for positioning the license plate by adopting the edge characteristics solves the problem of low license plate positioning accuracy, greatly improves the license plate positioning efficiency and saves time.
Drawings
The accompanying drawings are included to provide a further understanding of the invention.
In the drawings:
FIG. 1 is a block diagram of a work flow of a license plate image coarse positioning method of 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.
As shown in fig. 1, a license plate image rough positioning method includes the following steps:
the method comprises the following steps of firstly, graying an input image to generate a gray image;
step two, obtaining an image edge image by using a sobel method;
step three, obtaining an integral image of the gray level image generated in the step one and the image edge image generated in the step two;
scanning each pixel of the gray level image, judging the relation between the current point and the surrounding points, and generating a corresponding license plate probability map; the current point refers to the pixel value of the current point, and the surrounding points refer to the neighborhood mean value of the current point; the method for generating the license plate probability map comprises the following steps:
a. setting the pixel value of the pixel point (i, j) of the input image p (i, j)
i ∈ (0, pic _ init _ height), j ∈ (0, pic _ init _ width); pic _ init _ width is the input image width, pic _ init _ height is the input image height;
b. two temporary regions are arbitrarily generated:
the first temporary region left pixel point is area1_ left ═ j-24;
the first temporary region right pixel point is area1_ right ═ j + 24;
pixel point on the first temporary region, area1_ top ═ i-3;
the first pixel point under the temporary region is area1_ bottom ═ i + 3;
the second temporary region left pixel point is area2_ left ═ j-34;
the second temporary region right pixel is area2_ right ═ j + 34;
pixel points on the second temporary region are area2_ top ═ i-53;
the second pixel point in the temporary region is area2_ bottom ═ i + 53;
the temporary region (rectangle) formed by the intersection of the horizontal and vertical directions of the upper, lower, left and right pixel points obtained by the processing is the optimal data processing region, and the finally generated license plate probability map is more effective.
c. Obtaining an edge image mean value 1_ edge _ mean and a gray image mean value area1_ grey _ mean corresponding to the first temporary region by adopting a mean value calculation formula in the integral map; obtaining an edge map mean value area2_ edge _ mean corresponding to the second temporary region;
d. defining temporary values temp1, temp2, temp 3;
if the temporary value temp1 is 1, it indicates that the small neighborhood edge mean value of the current pixel point is larger than the large neighborhood edge mean value thereof, indicating that the current point is located in a region with dense edges;
if the temporary value temp2 is 1, it indicates that the gray value of the current pixel point is larger than the neighborhood gray average value, and is a local maximum value;
if the temporary value temp3 is 1, it indicates that the current pixel point requires the edge mean value of the small neighborhood to be much larger than the edge mean value of the large neighborhood on the basis of the local maximum;
if temp1, temp2 and temp3 are 0, the pixel point is not likely to be a license plate.
Setting (i.j) pixel values of a license plate probability map of a position:
if temp1 ═ 1, temp2 ═ 1, and temp3 ═ 1 are simultaneously satisfied, it indicates that the current pixel point can be a point on one character region.
Step five, horizontally scanning the license plate probability map to obtain a horizontal area of license plate distribution; the method for obtaining the horizontal area is to scan the license plate probability map line by line from top to bottom, accumulate the number of the bright spots encountered in a line, if the number of the bright spots accumulated in a line exceeds 70, the line is considered to be an effective line, if the number of the continuous effective lines exceeds 30, the strip area is considered to possibly contain the license plate, and the area is recorded. For example, if the light spot accumulation number of the ith row exceeds 70, temp _ rect _ top is recorded as i, if the accumulation number of the jth row in the subsequent scanning does not reach 70, if j-i >30, the height meets the requirement of the license plate, the area is recorded, the top of the area is i, and the bottom of the area is j. Left is the 0 pixel position and right is the pic _ init _ width-1 pixel position.
And sixthly, vertically scanning the horizontal area of the license plate distribution obtained in the fifth step to obtain a license plate candidate area. The method for obtaining the license plate candidate area comprises the steps of scanning a horizontal area of a license plate distribution obtained by scanning, scanning a license plate probability map row by row from left to right, accumulating the number of bright spots encountered in one row, considering the bright spots as an effective row if the number of the bright spots in one row exceeds 15, and obtaining the area obtained by scanning as the license plate area if the number of continuous effective rows exceeds 50; for example, if the light spot accumulation number of the m-th column exceeds 15, then temp _ rect _ left is recorded as m, if in the subsequent scanning, the accumulation number of the n-th row does not reach 15, if n-m >50, then the width meets the requirement of the license plate, this area is recorded, the left is m, the right is n, and the top and the bottom of the area are obtained in the previous step. And after all the scanning is finished, all the obtained regions are all the license plate candidate regions.
The license plate image rough positioning method is realized based on a computer device, the computer device comprises a processor and a memory, and the processor reads and executes a computer program for realizing the license plate image rough positioning method in the memory.
Although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that various changes in the embodiments and/or modifications of the invention can be made, and equivalents and modifications of some features of the invention can be made without departing from the spirit and scope of the invention.
Claims (5)
1. A license plate image rough positioning method comprises the following steps:
the method comprises the following steps of firstly, graying an input image to generate a gray image;
step two, obtaining an image edge image;
step three, obtaining an integral image of the gray level image generated in the step one and the image edge image generated in the step two;
scanning each pixel of the gray level image to generate a corresponding license plate probability map;
step five, horizontally scanning the license plate probability map to obtain a horizontal area of license plate distribution;
and sixthly, vertically scanning the horizontal area of the license plate distribution obtained in the fifth step to obtain a license plate candidate area.
2. The coarse positioning method for license plate images according to claim 1, characterized in that: and step two, obtaining an image edge image by using a sobel method.
3. The coarse positioning method for license plate images according to claim 1, characterized in that: the method for generating the license plate probability map in the fourth step comprises the following steps:
a. setting the pixel value of the pixel point (i, j) of the input image p (i, j)
i ∈ (0, pic _ init _ height), j ∈ (0, pic _ init _ width); pic _ init _ width is the input image width, pic _ init _ height is the input image height;
b. two temporary regions are arbitrarily generated:
the first temporary region left pixel point is area1_ left ═ j-24;
the first temporary region right pixel point is area1_ right ═ j + 24;
pixel point on the first temporary region, area1_ top ═ i-3;
the first pixel point under the temporary region is area1_ bottom ═ i + 3;
the second temporary region left pixel point is area2_ left ═ j-34;
the second temporary region right pixel is area2_ right ═ j + 34;
pixel points on the second temporary region are area2_ top ═ i-53;
the second pixel point in the temporary region is area2_ bottom ═ i + 53;
c. obtaining an edge image mean value 1_ edge _ mean and a grayscale image mean value 1_ grey _ mean corresponding to the first temporary region; obtaining an edge map mean value area2_ edge _ mean corresponding to the second temporary region;
d. defining temporary values temp1, temp2, temp 3;
if the temporary value temp1 is 1, it indicates that the small neighborhood edge mean value of the current pixel point is larger than the large neighborhood edge mean value thereof, indicating that the current point is located in a region with dense edges;
if the temporary value temp2 is 1, it indicates that the gray value of the current pixel point is larger than the neighborhood gray average value, and is a local maximum value;
if the temporary value temp3 is 1, it indicates that the current pixel point requires the edge mean value of the small neighborhood to be much larger than the edge mean value of the large neighborhood on the basis of the local maximum;
setting (i.j) pixel values of a license plate probability map of a position:
if temp1 ═ 1, temp2 ═ 1, and temp3 ═ 1 are simultaneously satisfied, it indicates that the current pixel point can be a point on one character region.
4. The coarse positioning method for license plate images according to claim 1, characterized in that: the method for obtaining the horizontal area in the fifth step is to scan the license plate probability map line by line from top to bottom, accumulate the number of the bright spots encountered in one line, if the number of the bright spots accumulated in one line exceeds 70, the line is considered to be an effective line, if the number of the continuous effective lines exceeds 30, the strip area is considered to possibly contain the license plate, and record the area.
5. The coarse positioning method for license plate images according to claim 1, characterized in that: the license plate candidate area is obtained by scanning a horizontal area of the scanned license plate distribution, scanning the license plate probability map row by row from left to right, accumulating the number of the bright spots encountered in one row, considering the bright spots as an effective row if the number of the bright spots in one row exceeds 15, and obtaining the area as the license plate area if the number of the continuous effective rows exceeds 50; and after all the scanning is finished, all the obtained regions are all the license plate candidate regions.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810728982.4A CN110689016B (en) | 2018-07-05 | 2018-07-05 | License plate image coarse positioning method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810728982.4A CN110689016B (en) | 2018-07-05 | 2018-07-05 | License plate image coarse positioning method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110689016A true CN110689016A (en) | 2020-01-14 |
CN110689016B CN110689016B (en) | 2023-04-18 |
Family
ID=69106858
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810728982.4A Active CN110689016B (en) | 2018-07-05 | 2018-07-05 | License plate image coarse positioning method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110689016B (en) |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1932838A (en) * | 2005-09-12 | 2007-03-21 | 电子科技大学 | Vehicle plate extracting method based on skiagraphy and mathematical morphology |
CN102243705A (en) * | 2011-05-09 | 2011-11-16 | 东南大学 | Method for positioning license plate based on edge detection |
CN102346910A (en) * | 2010-07-30 | 2012-02-08 | 中国科学院空间科学与应用研究中心 | Single-frame infrared image based real-time detection method of point target |
CN103903018A (en) * | 2014-04-02 | 2014-07-02 | 浙江师范大学 | Method and system for positioning license plate in complex scene |
CN103985135A (en) * | 2014-06-07 | 2014-08-13 | 山西中创伟业科技有限公司 | License plate location method based on difference edge images |
CN104732493A (en) * | 2015-03-18 | 2015-06-24 | 西安电子科技大学 | SAR image de-noising algorithm based on Primal Sketch classification and SVD domain improvement MMSE estimation |
CN104851112A (en) * | 2015-04-28 | 2015-08-19 | 北京理工大学 | Moving target detecting and tracking algorithm evaluation method based on data set compensation |
CN106295642A (en) * | 2016-08-11 | 2017-01-04 | 中防通用河北电信技术有限公司 | A kind of based on serious forgiveness with the license plate locating method of textural characteristics |
CN106340015A (en) * | 2016-08-30 | 2017-01-18 | 沈阳东软医疗系统有限公司 | Key point positioning method and device |
CN107169979A (en) * | 2017-05-11 | 2017-09-15 | 南宁市正祥科技有限公司 | A kind of method for detecting image edge of improvement Canny operators |
CN107423735A (en) * | 2017-04-07 | 2017-12-01 | 西华师范大学 | It is a kind of to utilize horizontal gradient and the algorithm of locating license plate of vehicle of saturation degree |
CN107609555A (en) * | 2017-09-15 | 2018-01-19 | 北京文安智能技术股份有限公司 | Detection method of license plate, model recognizing method and relevant apparatus using it |
CN108171771A (en) * | 2017-12-25 | 2018-06-15 | 天津科技大学 | The line drawing in a kind of combination external margin information and interior polymeric road draws generating algorithm |
-
2018
- 2018-07-05 CN CN201810728982.4A patent/CN110689016B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1932838A (en) * | 2005-09-12 | 2007-03-21 | 电子科技大学 | Vehicle plate extracting method based on skiagraphy and mathematical morphology |
CN102346910A (en) * | 2010-07-30 | 2012-02-08 | 中国科学院空间科学与应用研究中心 | Single-frame infrared image based real-time detection method of point target |
CN102243705A (en) * | 2011-05-09 | 2011-11-16 | 东南大学 | Method for positioning license plate based on edge detection |
CN103903018A (en) * | 2014-04-02 | 2014-07-02 | 浙江师范大学 | Method and system for positioning license plate in complex scene |
CN103985135A (en) * | 2014-06-07 | 2014-08-13 | 山西中创伟业科技有限公司 | License plate location method based on difference edge images |
CN104732493A (en) * | 2015-03-18 | 2015-06-24 | 西安电子科技大学 | SAR image de-noising algorithm based on Primal Sketch classification and SVD domain improvement MMSE estimation |
CN104851112A (en) * | 2015-04-28 | 2015-08-19 | 北京理工大学 | Moving target detecting and tracking algorithm evaluation method based on data set compensation |
CN106295642A (en) * | 2016-08-11 | 2017-01-04 | 中防通用河北电信技术有限公司 | A kind of based on serious forgiveness with the license plate locating method of textural characteristics |
CN106340015A (en) * | 2016-08-30 | 2017-01-18 | 沈阳东软医疗系统有限公司 | Key point positioning method and device |
CN107423735A (en) * | 2017-04-07 | 2017-12-01 | 西华师范大学 | It is a kind of to utilize horizontal gradient and the algorithm of locating license plate of vehicle of saturation degree |
CN107169979A (en) * | 2017-05-11 | 2017-09-15 | 南宁市正祥科技有限公司 | A kind of method for detecting image edge of improvement Canny operators |
CN107609555A (en) * | 2017-09-15 | 2018-01-19 | 北京文安智能技术股份有限公司 | Detection method of license plate, model recognizing method and relevant apparatus using it |
CN108171771A (en) * | 2017-12-25 | 2018-06-15 | 天津科技大学 | The line drawing in a kind of combination external margin information and interior polymeric road draws generating algorithm |
Also Published As
Publication number | Publication date |
---|---|
CN110689016B (en) | 2023-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114972329B (en) | Image enhancement method and system of surface defect detector based on image processing | |
CN107507167B (en) | Cargo tray detection method and system based on point cloud plane contour matching | |
CN111179152B (en) | Road identification recognition method and device, medium and terminal | |
US8867790B2 (en) | Object detection device, object detection method, and program | |
CN109446895B (en) | Pedestrian identification method based on human head features | |
KR100761641B1 (en) | Apparatus and method for correcting distortion of input image | |
CN110349260B (en) | Automatic pavement marking extraction method and device | |
US20130101170A1 (en) | Method of image processing and device therefore | |
CN109902758B (en) | Deep learning-based lane area identification data set calibration method | |
CN107845068B (en) | Image view angle conversion device and method | |
CN111353961B (en) | Document curved surface correction method and device | |
CN104239867A (en) | License plate locating method and system | |
CN109729298B (en) | Image processing method and image processing apparatus | |
CN114004204B (en) | Table structure reconstruction and text extraction method and system based on computer vision | |
CN112036294B (en) | Method and device for automatically identifying paper form structure | |
CN111178193A (en) | Lane line detection method, lane line detection device and computer-readable storage medium | |
JP3471578B2 (en) | Line direction determining device, image tilt detecting device, and image tilt correcting device | |
CN109074646B (en) | Image recognition device and image recognition program | |
CN110689016B (en) | License plate image coarse positioning method | |
CN111914847B (en) | OCR (optical character recognition) method and system based on template matching | |
CN111382718B (en) | Night pedestrian detection system and pedestrian detection method based on same | |
CN113159031B (en) | Handwritten text detection method, device and storage medium | |
CN115187744A (en) | Cabinet identification method based on laser point cloud | |
JP4492258B2 (en) | Character and figure recognition and inspection methods | |
CN112149600A (en) | Big data automobile driving area image analysis method and system |
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 | ||
PP01 | Preservation of patent right | ||
PP01 | Preservation of patent right |
Effective date of registration: 20231113 Granted publication date: 20230418 |