CN110689016B - License plate image coarse positioning method - Google Patents

License plate image coarse positioning method Download PDF

Info

Publication number
CN110689016B
CN110689016B CN201810728982.4A CN201810728982A CN110689016B CN 110689016 B CN110689016 B CN 110689016B CN 201810728982 A CN201810728982 A CN 201810728982A CN 110689016 B CN110689016 B CN 110689016B
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.)
Active
Application number
CN201810728982.4A
Other languages
Chinese (zh)
Other versions
CN110689016A (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.)
Shandong Chinasoft Goldencis Software Co ltd
Original Assignee
Shandong Chinasoft Goldencis Software Co ltd
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 Shandong Chinasoft Goldencis Software Co ltd filed Critical Shandong Chinasoft Goldencis Software Co ltd
Priority to CN201810728982.4A priority Critical patent/CN110689016B/en
Publication of CN110689016A publication Critical patent/CN110689016A/en
Application granted granted Critical
Publication of CN110689016B publication Critical patent/CN110689016B/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/26Segmentation 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 Processing (AREA)
  • Image Analysis (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 lower license plate positioning accuracy, greatly improves the efficiency of license plate positioning and saves time.

Description

License plate image coarse positioning method
Technical Field
The invention relates to the technical field of license plate image positioning, in particular to a license plate image coarse positioning method.
Background
The level of city digitization in China is higher and higher, and license plate identification is an important technology in the digitized city. 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. Edge detection (image edge detection greatly reduces data quantity, rejects irrelevant information and retains important structural attributes of images) is adopted for license plate positioning, but a large number of non-license plate areas exist in a license plate selection area obtained by only depending on edge characteristics, and 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 step six, vertically scanning the horizontal area of the license plate distribution obtained in the step five 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 left pixel point of the first temporary region 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 pixel point under the first temporary region is area1_ bottom = i +3;
the left pixel point of the second temporary region is area2_ left = j-34;
the second temporary region right pixel point is area2_ right = j +34;
pixel points on the second temporary region area2_ top = i-53;
the second pixel point under the temporary region is area2_ bottom = i +53;
c. obtaining an edge image mean value area1_ edge _ mean and a gray image mean value area1_ 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, temp3;
Figure GDA0004038132640000031
Figure GDA0004038132640000032
Figure GDA0004038132640000033
if the temporary value temp1=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, and indicates that the current point is located in a region with dense edges;
if the temporary value temp2=1, it indicates that the gray value of the current pixel point is larger than the mean value of the neighborhood gray values, and is a local maximum value;
if the temporary value temp3=1, it is indicated 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 pixel values of the license plate probability map at the (i, j) position:
Figure GDA0004038132640000034
if temp1=1, temp2=1 and temp3=1 are satisfied at the same time, 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 lower license plate positioning accuracy, greatly improves the efficiency of license plate positioning and saves time.
Drawings
The accompanying drawings are included to provide a further understanding of the invention.
In the drawings:
fig. 1 is a work flow block diagram 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 coarse 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 adopting 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 left pixel point of the first temporary region is area1_ left = j-24;
the first temporary region right pixel point is area1_ right = j +24;
pixel points on the first temporary region are area1_ top = i-3;
the pixel point under the first temporary region is area1_ bottom = i +3;
the left pixel point of the second temporary region is area2_ left = j-34;
the second temporary region right pixel point is area2_ right = j +34;
pixel points on the second temporary region area2_ top = i-53;
the pixel point under the second 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 area1_ 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 graph; obtaining an edge map mean value area2_ edge _ mean corresponding to the second temporary region;
d. defining temporary values temp1, temp2, temp3;
Figure GDA0004038132640000051
Figure GDA0004038132640000061
Figure GDA0004038132640000062
if the temporary value temp1=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, and indicates that the current point is located in a region with dense edges;
if the temporary value temp2=1, it indicates that the gray value of the current pixel point is larger than the mean value of the neighborhood gray values, and is a local maximum value;
if the temporary value temp3=1, it is indicated 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 cannot be a license plate.
Setting pixel values of the license plate probability map at the (i, j) position:
Figure GDA0004038132640000063
if temp1=1, temp2=1 and temp3=1 are satisfied at the same time, it indicates that the current pixel point may 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 cumulative number of bright spots on the ith row exceeds 70, temp _ rect _ top = i is recorded, and if the cumulative number on the jth row in the subsequent scanning does not reach 70, if j-i >30, the height meets the requirement of a license plate, and the area is recorded, wherein 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 spot pixels encountered in one row, considering the bright spot pixels in one row as an effective row if the number of the bright spot pixels in one row exceeds 15, and obtaining the area obtained by scanning as a license plate area if the number of the continuous effective rows exceeds 50; for example, if the light spot accumulation number of the m-th column exceeds 15, temp _ rect _ left = m is recorded, if the accumulation number of the n-th row in the subsequent scanning does not reach 15, if n-m >50, the width meets the requirement of the license plate, the 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 scans are finished, all the obtained regions are all 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 (4)

1. A license plate image coarse 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;
step four, 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;
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 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 left pixel point of the first temporary region is area1_ left = j-24;
the first temporary region right pixel point is area1_ right = j +24;
pixel points on the first temporary region are area1_ top = i-3;
the pixel point under the first temporary region is area1_ bottom = i +3;
the left pixel point of the second temporary region is area2_ left = j-34;
the second temporary region right pixel point is area2_ right = j +34;
pixel points on the second temporary region area2_ top = i-53;
the second pixel point under the temporary region is area2_ bottom = i +53;
c. obtaining an edge image mean value area1_ edge _ mean and a gray image mean value area1_ 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, temp3;
Figure FDA0004038132630000021
Figure FDA0004038132630000022
Figure FDA0004038132630000023
if the temporary value temp1=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, and indicates that the current point is located in a region with dense edges;
if the temporary value temp2=1, it indicates that the gray value of the current pixel point is larger than the mean value of the neighborhood gray values, and is a local maximum value;
if the temporary value temp3=1, it is indicated 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 pixel values of the license plate probability map at the (i, j) position:
Figure FDA0004038132630000024
if temp1=1, temp2=1 and temp3=1 are satisfied at the same time, it indicates that the current pixel point can be a point on one character region.
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 the license plate image 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.
4. The coarse positioning method for the license plate image 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 in one row, if the number of the bright spots in one row exceeds 15, determining the row as an effective row, and if the number of the continuous effective rows exceeds 50, determining the area obtained by scanning as the license plate area; and after all the scanning is finished, all the obtained regions are all the license plate candidate regions.
CN201810728982.4A 2018-07-05 2018-07-05 License plate image coarse positioning method Active CN110689016B (en)

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 CN110689016A (en) 2020-01-14
CN110689016B true 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)

* Cited by examiner, † Cited by third party
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

Patent Citations (13)

* Cited by examiner, † Cited by third party
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
CN110689016A (en) 2020-01-14

Similar Documents

Publication Publication Date Title
CN102567300B (en) Picture document processing method and device
US8867790B2 (en) Object detection device, object detection method, and program
KR100761641B1 (en) Apparatus and method for correcting distortion of input image
CN111179152B (en) Road identification recognition method and device, medium and terminal
CN109446895B (en) Pedestrian identification method based on human head features
CN110349260B (en) Automatic pavement marking extraction method and device
US20090016608A1 (en) Character recognition method
CN107845068B (en) Image view angle conversion device and method
CN109902758B (en) Deep learning-based lane area identification data set calibration method
CN111353961B (en) Document curved surface correction method and device
CN114596313B (en) Building component damage detection method based on indoor point cloud and related equipment
JP6110174B2 (en) Image detection apparatus, control program, and image detection method
JP2014164528A (en) Character recognition device, character recognition method, and program
JP3471578B2 (en) Line direction determining device, image tilt detecting device, and image tilt correcting device
CN110689016B (en) License plate image coarse positioning method
CN109074646B (en) Image recognition device and image recognition program
CN112036294A (en) Method and device for automatically identifying paper table structure
CN113837119A (en) Method and equipment for recognizing confusable characters based on gray level images
CN115187744A (en) Cabinet identification method based on laser point cloud
JP4492258B2 (en) Character and figure recognition and inspection methods
JP2868134B2 (en) Image processing method and apparatus
CN111914847A (en) OCR recognition method and system based on template matching
CN113159031B (en) Handwritten text detection method, device and storage medium
CN115578607B (en) Method for rapidly extracting coverage range of effective pixels of remote sensing image
JP2020035338A (en) Object detection method and object detection device

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

Effective date of registration: 20231113

Granted publication date: 20230418

PP01 Preservation of patent right