CN110533019A - License plate locating method, device and storage medium - Google Patents
License plate locating method, device and storage medium Download PDFInfo
- Publication number
- CN110533019A CN110533019A CN201810502241.4A CN201810502241A CN110533019A CN 110533019 A CN110533019 A CN 110533019A CN 201810502241 A CN201810502241 A CN 201810502241A CN 110533019 A CN110533019 A CN 110533019A
- Authority
- CN
- China
- Prior art keywords
- point
- global characteristic
- license plate
- characteristic point
- selection
- 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
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/40—Extraction of image or video features
- G06V10/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
-
- 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/63—Scene text, e.g. street names
-
- 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/158—Segmentation of character regions using character size, text spacings or pitch estimation
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
This application discloses a kind of license plate locating method, device and storage mediums, belong to technical field of image processing.The described method includes: obtaining shooting image and carrying out gray proces to the shooting image, obtain gray level image, it include license plate to be positioned in the shooting image, gray value based on the K row pixel that the gray level image includes, determine L effective sections in the gray level image, the L effectively sections are used to indicate license plate position that may be present in the shooting image, the K and L is positive integer, and the L is less than or equal to the K, based on the L effective sections in the gray level image, the license plate is positioned from the shooting image.In this way, avoiding the need for the positioning licence plate in such a way that connected domain detects leads to the problem of License Plate inaccuracy when the distribution of the character of license plate is irregular, that is, improve the accuracy of positioning.
Description
Technical field
This application involves technical field of image processing, in particular to a kind of license plate locating method, device and storage medium.
Background technique
In daily life, identity card of the license plate as automobile is widely used in the scenes such as parking lot, electronic charging station.
In practical application scene, usually shooting and automatic identification can be carried out to license plate by the equipment of such as computer etc, to obtain
The information of pick-up board.Wherein, which mainly includes License Plate, Text segmentation, the several processes of Text region.Thus may be used
See, License Plate is one of the important link for realizing Car license recognition.
In the related art, connected domain detection method is generallyd use to realize License Plate, realization process specifically includes that pair
Binary conversion treatment is carried out by shooting obtained shooting image, bianry image is obtained, based on character and background in the bianry image
Corresponding color is respectively the characteristic of white and black, carries out the behaviour such as a series of morphological dilations, corrosion to the bianry image
Make, determines the corresponding connected domain of each character.Later, the tandem according to character in shooting image, successively detects every phase
The distance between corresponding connected domain of two characters of neighbour, if the distance of two adjacent connected domains is less than the distance of setting, is protected
Stay connected domain detected, until detect the distance between two neighboring connected domain be greater than the setting apart from when, stop inspection
It surveys, and the region that all connected domains retained form is determined as license plate region, to realize License Plate.
During realizing the application, the inventor finds that the existing technology has at least the following problems: due to some countries
License plate character distribution it is irregular, for example, be separated by biggish distance between first character and second character, at this point, inspection
The distance for corresponding two connected domains of the first character and second character surveyed is greater than the distance of setting, therefore, Jiu Huiting
Only detect.But in fact, second character and the corresponding connected domain of back character also belong to license plate region, thus
As it can be seen that being easy to cause the accuracy rate of License Plate to reduce when positioning by connected domain detection method to license plate.
Summary of the invention
In order to solve problems in the prior art, the embodiment of the present application provides a kind of license plate locating method, device and storage
Medium.The technical solution is as follows:
On the one hand, a kind of license plate locating method is provided, which comprises
Shooting image is obtained simultaneously to shooting image progress gray proces, gray level image is obtained, in the shooting image
Including license plate to be positioned;
Gray value based on the K row pixel that the gray level image includes determines that L in the gray level image are effective
Section, the L effectively sections are used to indicate license plate position that may be present described in the shooting image, and the K and the L are equal
For positive integer, and the L is less than or equal to the K;
Based on the L effective sections in the gray level image, the license plate is positioned from the shooting image.
Optionally, the gray value of the K row pixel for including based on the gray level image, determines in the gray level image
L effective sections, comprising:
Based on the gray value of each pixel in the K row pixel, the local feature region in the gray level image is marked,
The local feature region includes peak dot or valley point;
The local feature region marked is filtered, global characteristic point is obtained;
Based on the global characteristic point obtained after filtering, the L effective sections in the gray level image are determined.
Optionally, the gray value based on each pixel in the K row pixel, marks in the gray level image
Local feature region, comprising:
For target pixel points, determining same a line and adjacent with the target pixel points of belonging to the target pixel points
The gray value of former and later two pixels, the target pixel points be the K row pixel include any row pixel in addition to
First and any pixel point except the last one;
If the gray value of the target pixel points is respectively less than the gray value of former and later two pixels, by the target
Pixel is labeled as valley point;If the gray value of the target pixel points is all larger than the gray value of former and later two pixels,
The target pixel points are labeled as peak dot.
Optionally, the described pair of local feature region marked is filtered, comprising:
A local feature region is selected from the local feature region marked, and following place is executed to the local feature region of selection
Reason, until having handled all local feature regions in the local feature region marked:
It determines and belongs to same a line with the local feature region of selection and the latter part adjacent with the local feature region of selection
The gray value of characteristic point;
Determine the gray scale between the gray value of the local feature region of selection and the gray value of the latter local feature region
The difference of value;
When the difference of identified gray value is less than default gray scale difference, by the local feature region of selection and the latter office
Portion's characteristic point filters out.
Optionally, described based on the global characteristic point obtained after filtering, determine that the L in the gray level image are effective
Section, comprising:
Obtain the coordinate of each global characteristic point obtained after filtering;
Based on acquired coordinate, determine that the available point in the global characteristic point obtained after filtering, the available point refer to
Belong to the point of effective section;
The line segment that the starting available point belonged in same a line available point and terminal available point connect into is determined as effective section,
To obtain the L effective sections.
Optionally, described based on acquired coordinate, determine the available point in the global characteristic point obtained after filtering, packet
It includes:
A global characteristic point is selected from the global characteristic point obtained after filtering, and the global characteristic point of selection is executed such as
Lower processing, until all global characteristic points in the global characteristic point obtained after having handled filtering:
The coordinate of global characteristic point based on selection, and with the global characteristic point of selection belong to same a line and with selection
The coordinate of former and later two adjacent global characteristic points of global characteristic point determines that distance to a declared goal, the distance to a declared goal refer to selection
The sum of the distance between global characteristic point and former and later two adjacent global characteristic points;
When the distance to a declared goal is less than pre-determined distance, determine that selected global characteristic point is available point.
Optionally, the coordinate of the global characteristic point based on selection, and belong to the global characteristic point of selection same
The coordinate of row and former and later two global characteristic points adjacent with the global characteristic point of selection, after determining distance to a declared goal, further includes:
When the distance to a declared goal is greater than the pre-determined distance and is less than N times of the pre-determined distance, determination is located at respectively
The quantity S and T of specified pixel point between the global characteristic point of selection and former and later two described global characteristic points, the specified picture
Vegetarian refreshments is that the gray value of the global characteristic point of gray value and selection is in the pixel in same default tonal range;
When the S is not more than the default value, and the distance to a declared goal and described S finger greater than default value, the T
When determining the difference between the corresponding coordinate length of pixel less than the pre-determined distance, the global characteristic point of selection is determined as having
Effect point;
When the T is not more than the default value, and the distance to a declared goal and described T finger greater than default value, the S
When determining the difference between the corresponding coordinate length of pixel less than the pre-determined distance, the global characteristic point of selection is determined as having
Effect point;
When the S and the T are all larger than the default value, determine that the corresponding coordinate of the S specified pixel point is long
Spend corresponding with T specified pixel point coordinate length and, if the distance to a declared goal and the coordinate length and between
Difference be less than the pre-determined distance, then the global characteristic point of selection is determined as available point.
Optionally, the L effective sections based in the gray level image, from the shooting image described in positioning
License plate, comprising:
The L effectively sections are scanned one by one according to sequence from top to bottom;
If the overlap length of the effective section of each adjacent two is greater than preset length, retains the effective section scanned and continue to hold
Row scan operation stops scan operation when scanning to two neighboring effective section of overlap length is less than the preset length;
Based on all effective sections retained, left margin, right margin, coboundary and the lower boundary of the license plate are determined, and
According to identified left margin, right margin, coboundary and lower boundary, the license plate is positioned from the shooting image.
Optionally, described based on all effective sections retained, determine the left margin, right margin, coboundary of the license plate
And lower boundary, comprising:
It is averaging after the coordinate of all effective sections retained of starting available point is added, obtains average origin coordinates,
And be averaging after being added the coordinate of all effective sections retained of terminal available point, mean end-point coordinate is obtained, and will
Vertical line where the average origin coordinates is determined as the left margin of the license plate, and will be where the mean end-point coordinate
Vertical line is determined as the right margin of the license plate;
By preliminary scan in all effective sections retained to effective section where the position of one-row pixels point be determined as
The coboundary of the license plate, and by the one-row pixels point where the effective section finally scanned in all effective sections retained
Position be determined as the lower boundary of the license plate.
Optionally, the gray value of the K row pixel for including based on the gray level image, determines in the gray level image
L effectively sections before, further includes:
It will be averaging after the corresponding addition of the gray value for belonging to the pixel of same row in every adjacent M row pixel, it will
One-row pixels point is merged into per adjacent M row pixel, the M is less than total line number of pixel included by the shooting image
And it can be divided exactly by total line number.
On the other hand, a kind of license plate positioning device is provided, described device includes:
Image processing module obtains grayscale image for obtaining shooting image and carrying out gray proces to the shooting image
Picture includes license plate to be positioned in the shooting image;
Effective section determining module, the gray value of the K row pixel for including based on the gray level image determine the ash
L effective sections in image are spent, the L effectively sections are used to indicate license plate position that may be present described in the shooting image
It sets, the K and the L are positive integer, and the L is less than or equal to the K;
Locating module, for positioning institute from the shooting image based on the L effective sections in the gray level image
State license plate.
Optionally, the effective section of determining module includes:
Marking unit marks in the gray level image for the gray value based on each pixel in the K row pixel
Local feature region, the local feature region includes peak dot or valley point;
Filter element obtains global characteristic point for being filtered to the local feature region marked;
Determination unit, for based on the global characteristic point obtained after filtering, determining that the L in the gray level image have
Imitate section.
Optionally, the marking unit is used for:
For target pixel points, determining same a line and adjacent with the target pixel points of belonging to the target pixel points
The gray value of former and later two pixels, the target pixel points be the K row pixel include any row pixel in addition to
First and any pixel point except the last one;
If the gray value of the target pixel points is respectively less than the gray value of former and later two pixels, by the target
Pixel is labeled as valley point;If the gray value of the target pixel points is all larger than the gray value of former and later two pixels,
The target pixel points are labeled as peak dot.
Optionally, the filter element is used for:
A local feature region is selected from the local feature region marked, and following place is executed to the local feature region of selection
Reason, until having handled all local feature regions in the local feature region marked:
It determines and belongs to same a line with the local feature region of selection and the latter part adjacent with the local feature region of selection
The gray value of characteristic point;
Determine the gray scale between the gray value of the local feature region of selection and the gray value of the latter local feature region
The difference of value;
When the difference of identified gray value is less than default gray scale difference, by the local feature region of selection and the latter office
Portion's characteristic point filters out.
Optionally, the determination unit is used for:
Obtain the coordinate of each global characteristic point obtained after filtering;
Based on acquired coordinate, determine that the available point in the global characteristic point obtained after filtering, the available point refer to
Belong to the point of effective section;
The line segment that the starting available point belonged in same a line available point and terminal available point connect into is determined as effective section,
To obtain the L effective sections.
Optionally, the determination unit is used for:
A global characteristic point is selected from the global characteristic point obtained after filtering, and the global characteristic point of selection is executed such as
Lower processing, until all global characteristic points in the global characteristic point obtained after having handled filtering:
The coordinate of global characteristic point based on selection, and with the global characteristic point of selection belong to same a line and with selection
The coordinate of former and later two adjacent global characteristic points of global characteristic point determines that distance to a declared goal, the distance to a declared goal refer to selection
The sum of the distance between global characteristic point and former and later two adjacent global characteristic points;
When the distance to a declared goal is less than pre-determined distance, determine that selected global characteristic point is available point.
Optionally, the determination unit is also used to:
When the distance to a declared goal is greater than the pre-determined distance and is less than N times of the pre-determined distance, determination is located at respectively
The quantity S and T of specified pixel point between the global characteristic point of selection and former and later two described global characteristic points, the specified picture
Vegetarian refreshments is that the gray value of the global characteristic point of gray value and selection is in the pixel in same default tonal range;
When the S is not more than the default value, and the distance to a declared goal and described S finger greater than default value, the T
When determining the difference between the corresponding coordinate length of pixel less than the pre-determined distance, the global characteristic point of selection is determined as having
Effect point;
When the T is not more than the default value, and the distance to a declared goal and described T finger greater than default value, the S
When determining the difference between the corresponding coordinate length of pixel less than the pre-determined distance, the global characteristic point of selection is determined as having
Effect point;
When the S and the T are all larger than the default value, determine that the corresponding coordinate of the S specified pixel point is long
Spend corresponding with T specified pixel point coordinate length and, if the distance to a declared goal and the coordinate length and between
Difference be less than the pre-determined distance, then the global characteristic point of selection is determined as available point.
Optionally, the locating module includes:
Scanning element, for being scanned one by one according to sequence from top to bottom to the L effectively sections;
If the overlap length of the effective section of each adjacent two is greater than preset length, retains the effective section scanned and continue to hold
Row scan operation stops scan operation when scanning to two neighboring effective section of overlap length is less than the preset length;
Positioning unit, for determining the left margin, right margin, top of the license plate based on all effective sections retained
Boundary and lower boundary, and according to identified left margin, right margin, coboundary and lower boundary, institute is positioned from the shooting image
State license plate.
Optionally, the positioning unit is used for:
It is averaging after the coordinate of all effective sections retained of starting available point is added, obtains average origin coordinates,
And be averaging after being added the coordinate of all effective sections retained of terminal available point, mean end-point coordinate is obtained, and will
Vertical line where the average origin coordinates is determined as the left margin of the license plate, and will be where the mean end-point coordinate
Vertical line is determined as the right margin of the license plate;
By preliminary scan in all effective sections retained to effective section where the position of one-row pixels point be determined as
The coboundary of the license plate, and by the one-row pixels point where the effective section finally scanned in all effective rows retained
Position be determined as the lower boundary of the license plate.
Optionally, described device further include:
Merging module, the corresponding addition of gray value for the pixel of same row will to be belonged in every adjacent M row pixel
After be averaging, every adjacent M row pixel is merged into one-row pixels point, the M is less than included by the shooting image
Total line number of pixel and it can be divided exactly by total line number.
On the other hand, a kind of computer readable storage medium is provided, is stored on the computer readable storage medium
Instruction, which is characterized in that the step of any one method described above is realized when described instruction is executed by processor.
Technical solution provided by the embodiments of the present application, which has the benefit that, obtains the shooting including license plate to be positioned
Image, and gray proces are carried out to the shooting image, obtain gray level image.The K row pixel for including based on the gray level image
Gray value determines L effective sections in the gray level image.Since the identified L effectively sections are used to indicate the shooting figure
Therefore the license plate position that may be present as in based on the L effective sections in the gray level image, can be realized from shooting image
Middle positioning licence plate.In this way, avoiding the need for positioning vehicle in such a way that connected domain detects when the distribution of the character of license plate is irregular
Board leads to the problem of License Plate inaccuracy, that is, improves the accuracy of positioning.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is a kind of license plate schematic diagram shown according to an exemplary embodiment;
Fig. 2 is a kind of flow chart of license plate locating method shown according to an exemplary embodiment;
Fig. 3 is a kind of flow chart of license plate locating method shown according to an exemplary embodiment;
Fig. 4 is a kind of flow chart of the license plate locating method shown according to another exemplary embodiment;
Fig. 5 is a kind of schematic diagram for shooting image shown according to an exemplary embodiment;
Fig. 6 is the schematic diagram of another shooting image shown according to an exemplary embodiment;
Fig. 7 is a kind of corresponding effective section of the schematic diagram of adjacent rows pixel shown according to an exemplary embodiment;
Fig. 8 is a kind of schematic diagram of license plate oriented shown according to an exemplary embodiment;
Fig. 9 is a kind of structural schematic diagram of license plate positioning device shown according to an exemplary embodiment;
Figure 10 is the structural schematic diagram of another license plate positioning device shown according to an exemplary embodiment;
Figure 11 shows the structural block diagram of the terminal 400 of an illustrative embodiment of the invention offer.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with attached drawing to the application embodiment party
Formula is described in further detail.
To this application involves license plate locating method describe in detail before, first to this application involves applied field
Scape, term and implementation environment are simply introduced.
Firstly, to this application involves application scenarios simply introduced.
In daily life, with widely available, hot spot of the automatic Recognition of License Plate as whole world research of vehicle.In
In actual implementation, it generally requires and license plate is identified using image processing techniques later to license plate location progress image taking
In information.In order to expeditiously identify the information in license plate, it usually needs from shooting image corresponding to positioning licence plate
Region.Since the information in license plate is typically all to be made of multiple characters, the relevant technologies are generallyd use based on this feature
The mode of connected domain detection carrys out positioning licence plate.However, character distribution and irregular, In in numerous countries and regions, in license plate
In the case of this kind, connected domain distribution characteristics dies down, poor so as to cause License Plate effect.For example, Europe as shown in Figure 1/
The license plate of the Asian-Pacific area and Middle East, character (including number, letter and other symbols) distribution of license plate is simultaneously irregular, existing
Some license plate recognition technologies are difficult to accurately identify.
For this purpose, this application provides a kind of license plate locating method, this method " prospect and back of license plate intrinsic using license plate
Scape has strong contrast " characteristic realize License Plate.Its inventive concept are as follows: the method based on image procossing has chosen vehicle
The build-in attribute feature of board: character is strong with background contrasts, therefore is positioned using license plate gray scale peak valley curvilinear characteristic to license plate,
The corresponding grey scale curve of license plate area can effecting reaction go out the comparative information of license plate prospect and background, can be according to this feature by license plate
Region is separated from image, has the characteristics that generalization ability is strong, does not need the prior information of license plate, is applicable in overseas numerous vehicles
Board type and a variety of imaging circumstances, positioning rate are high (being greater than 99%).Meanwhile utilizing characters on license plate string region corresponding grey scale curve
Multiple features complete the filtering and the positioning of at equal intervals/unequal interval character of interference region, it is medium can to solve simultaneously all kinds of license plates
The License Plate at interval and unequal interval.It that is to say, method provided by the present application, no matter whether the character distribution in license plate advises
Rule, may be implemented License Plate, avoids and positions in such a way that connected domain detects when the character of license plate is distributed irregular
License plate leads to the problem of License Plate inaccuracy, that is, improves the accuracy of positioning, licence plate recognition method provided by the present application can
To solve the recognition accuracy of such license plate.Specific implementation refers to following Fig. 2, Fig. 3 or embodiment shown in Fig. 4.
Secondly, to this application involves term be introduced.
Effective section: indicating license plate position that may be present in a line image, and effective section will record right boundary, average ash
The information such as degree, curve level difference, feature point number.
Adaboost algorithm: Adaboost is a kind of iterative algorithm, and core concept is for the training of the same training set
Different classifiers (Weak Classifier), then gets up these weak classifier sets, and it is (strong to constitute a stronger final classification device
Classifier).
CNN:Convolutional Neural Network, convolutional neural networks.
Finally, to this application involves implementation environment simply introduced.
License plate locating method involved in the application can be executed by terminal, and in practical implementations, which can be
Such as terminal of smart phone, tablet computer, desktop computer etc.Under normal conditions, which can be installed in and such as stop
In the application places such as parking lot, electronic charging station, and the terminal has image camera function, for clapping license plate location
It takes the photograph.
Further, in the concrete realization, which can be configured with camera, and the camera shooting configured by itself with itself
Head realizes shooting function, alternatively, the terminal can also be connect by data line with external camera, and external by being connected
Camera realizes shooting function, and the application is not construed as limiting this.
Introduced this application involves application scenarios and implementation environment after, next in conjunction with attached drawing to this application involves
License plate locating method describes in detail.
Fig. 2 illustrates a kind of flow chart of license plate locating method provided by the embodiments of the present application, is carried out using grayscale image
License Plate, can positioning licence plate to colored and infrared image.The process of License Plate substantially may include three steps: gray scale
Curvilinear characteristic point label, license plate line segment are chosen and license plate line segment merges.
Specifically, as shown in Fig. 2, being pre-processed based on gray level image, firstly, being adopted under being carried out vertically to gray level image
Sample, one-row pixels point is merged into the averaging of every M row pixel, further, after merging based on the data after sampling
Gray level image carries out level smoothly, to reduce the interference of the high frequency details such as noise and texture.Later, for the picture number of every a line
According to acquisition local feature region (predominantly H-type peak dot and L-type valley point) is then filtered local feature region, leaving can indicate
Global global characteristic point, i.e. completion grey scale curve characteristic point label.Wherein, such global characteristic point can effectively show gray scale
The feature tendency of curve, the tendency of the grey scale curve can embody the distribution character of the foreground and background of license plate.
Later, the selection of license plate line segment is carried out.The corresponding global characteristic point for representing grey scale curve tendency of license plate area exists
It is with uniformity on hopping amplitude, except the horizontal interval of remaining global characteristic point at intercharacter large-spacing is more uniform, therefore can be according to
To each global characteristic point at a distance from adjacent global characteristic point, the characteristic informations such as sum of the grayscale values gray scale difference, by grey scale curve point
For effective section, corresponding effective section in license plate is got as a result, which can be described as license plate line segment again.Wherein, to it is adjacent
Global characteristic point horizontal interval is larger but there are continuous one section of global characteristic points compared with similar gray-value, can also increase its left and right
The determined property of global characteristic point, specific implementation can be found in hereafter.
Finally, carrying out the merging of license plate line segment to obtain locating piece.Wherein, the merging of effective section needs to complete two work:
1, merging neighbouring license plate line segment is a candidate license plate region;2, confirm the upper and lower, left and right side in candidate license plate region
Boundary obtains locating piece.In actual implementation, license plate line segment can be merged according to the overlapping region of upper and lower license plate line segment.
Furthermore it is possible to according to the left side of the top in candidate license plate region and row and license plate line segment where license plate line segment bottom
Boundary's minimum value and right margin maximum value determine upper and lower, left and right four edges circle of license plate area, in this way, four edges circle are based on,
Can from gray level image positioning licence plate region.
Fig. 3 is a kind of flow chart of license plate locating method shown according to an exemplary embodiment, the license plate locating method
Applied in above-mentioned terminal, this method may include following several realization steps:
Step 101: obtaining shooting image and gray proces are carried out to the shooting image, obtain gray level image, the shooting figure
It include license plate to be positioned as in.
Step 102: the gray value based on the K row pixel that the gray level image includes determines that the L in the gray level image have
Section is imitated, the L effectively sections are used to indicate license plate position that may be present in the shooting image, and the K and the L are positive whole
Number, and the L is less than or equal to the K.
Step 103: based on the L effective sections in the gray level image, positioning the license plate from the shooting image.
In the embodiment of the present application, the shooting image including license plate to be positioned is obtained, and ash is carried out to the shooting image
Degree processing, obtains gray level image.Gray value based on the K row pixel that the gray level image includes, determines the L in the gray level image
A effective section.Since the identified L effectively sections are used to indicate license plate position that may be present in the shooting image, because
The middle positioning licence plate from shooting image can be realized based on the L effective sections in the gray level image in this.In this way, when license plate
When character distribution is irregular, avoiding the need for the positioning licence plate in such a way that connected domain detects leads to asking for License Plate inaccuracy
Topic, that is, improve the accuracy of positioning.
Optionally, the gray value for the K row pixel for including based on the gray level image determines that the L in the gray level image have
Imitate section, comprising:
Based on the gray value of each pixel in the K row pixel, the local feature region in the gray level image is marked, the office
Portion's characteristic point includes peak dot or valley point;
The local feature region marked is filtered, global characteristic point is obtained;
Based on the global characteristic point obtained after filtering, the L effective sections in the gray level image are determined.
Optionally, the gray value based on each pixel in the K row pixel, marks the local feature in the gray level image
Point, comprising:
For target pixel points, determines and belong to same a line and the front and back adjacent with the target pixel points with the target pixel points
The gray value of two pixels, the target pixel points be in any row pixel that the K row pixel includes in addition to first and
Any pixel point except the last one;
If the gray value of the target pixel points is respectively less than the gray value of former and later two pixels, by the target pixel points
Labeled as valley point;If the gray value of the target pixel points is all larger than the gray value of former and later two pixels, by the target picture
Vegetarian refreshments is labeled as peak dot.
Optionally, the local feature region marked is filtered, comprising:
A local feature region is selected from the local feature region marked, and following place is executed to the local feature region of selection
Reason, until having handled all local feature regions in the local feature region marked:
It determines and belongs to same a line with the local feature region of selection and the latter part adjacent with the local feature region of selection
The gray value of characteristic point;
Determine gray value between the gray value of the local feature region of selection and the gray value of the latter portion characteristic point it
Difference;
When the difference of identified gray value is less than default gray scale difference, by the local feature region of selection and the latter part
Characteristic point filters out.
Optionally, based on the global characteristic point obtained after filtering, the L effective sections in the gray level image are determined, comprising:
Obtain the coordinate of each global characteristic point obtained after filtering;
Based on acquired coordinate, determine that the available point in the global characteristic point obtained after filtering, the available point refer to category
In the point of effective section;
The line segment that the starting available point belonged in same a line available point and terminal available point connect into is determined as effective section,
To obtain the L effective sections.
Optionally, the available point in the global characteristic point obtained after filtering should be determined based on acquired coordinate, comprising:
A global characteristic point is selected from the global characteristic point obtained after filtering, and the global characteristic point of selection is executed such as
Lower processing, until all global characteristic points in the global characteristic point obtained after having handled filtering:
The coordinate of global characteristic point based on selection, and with the global characteristic point of selection belong to same a line and with selection
The coordinate of former and later two adjacent global characteristic points of global characteristic point, determines distance to a declared goal, which refers to the complete of selection
The sum of the distance between office's characteristic point and former and later two adjacent global characteristic points;
When the distance to a declared goal is less than pre-determined distance, determine that selected global characteristic point is available point.
Optionally, the coordinate of the global characteristic point based on selection, and with the global characteristic point of selection belong to same a line and
The coordinate of former and later two global characteristic points adjacent with the global characteristic point of selection, after determining distance to a declared goal, further includes:
When the distance to a declared goal is greater than the pre-determined distance and is less than N times of the pre-determined distance, determines be located at selection respectively
The quantity S and T of specified pixel point between global characteristic point and former and later two global characteristic points, the specified pixel point are gray scale
Value and the gray value of the global characteristic point of selection are in the pixel in same default tonal range;
When the S is not more than the default value, and the distance to a declared goal and the S specified pixel point pair greater than default value, the T
When the difference between coordinate length answered is less than the pre-determined distance, the global characteristic point of selection is determined as available point;
When the T is not more than the default value, and the distance to a declared goal and the T specified pixel point pair greater than default value, the S
When the difference between coordinate length answered is less than the pre-determined distance, the global characteristic point of selection is determined as available point;
When the S and the T are all larger than the default value, the corresponding coordinate length of S specified pixel point and the T are determined
The sum of the corresponding coordinate length of specified pixel point, if the distance to a declared goal and the coordinate length and between difference it is default less than this
The global characteristic point of selection is then determined as available point by distance.
Optionally, based on the L effective sections in the gray level image, the license plate is positioned from the shooting image, comprising:
The L effectively sections are scanned one by one according to sequence from top to bottom;
If the overlap length of the effective section of each adjacent two is greater than preset length, retains the effective section scanned and continue to hold
Row scan operation stops scan operation when scanning to two neighboring effective section of overlap length is less than the preset length;
Based on all effective sections retained, left margin, right margin, coboundary and the lower boundary of the license plate, and root are determined
According to identified left margin, right margin, coboundary and lower boundary, the license plate is positioned from the shooting image.
Optionally, based on all effective sections retained, the left margin of the license plate, right margin, coboundary and following are determined
Boundary, comprising:
It is averaging after the coordinate of all effective sections retained of starting available point is added, obtains average origin coordinates,
And be averaging after being added the coordinate of all effective sections retained of terminal available point, mean end-point coordinate is obtained, and will
Vertical line where the average origin coordinates is determined as the left margin of the license plate, and the vertical line where the mean end-point coordinate is true
It is set to the right margin of the license plate;
By preliminary scan in all effective sections retained to effective section where the position of one-row pixels point be determined as
The coboundary of the license plate, and by the one-row pixels point where the effective section finally scanned in all effective sections retained
Position is determined as the lower boundary of the license plate.
Optionally, the gray value for the K row pixel for including based on the gray level image determines that the L in the gray level image have
Before effect section, further includes:
It will be averaging after the corresponding addition of the gray value for belonging to the pixel of same row in every adjacent M row pixel, it will
One-row pixels point is merged into per adjacent M row pixel, which is less than the total line number and energy of pixel included by the shooting image
Divided exactly by total line number.
All the above alternatives, can form the alternative embodiment of the application according to any combination, and the application is real
It applies example and this is no longer repeated one by one.
Fig. 4 is a kind of flow chart of the license plate locating method shown according to another exemplary embodiment, and the present embodiment is with this
License plate locating method is applied to be illustrated in above-mentioned terminal, which may include following several realization steps
It is rapid:
Step 201: obtaining shooting image and gray proces are carried out to the shooting image, obtain gray level image, the shooting figure
It include license plate to be positioned as in.
In daily life, in order to realize License Plate, user usually can according to actual needs, such as parking lot,
The application scenarios installing terminal at electronic charging station etc, and the coverage of the terminal is adjusted, to be carried out to license plate location
Shooting, thus obtain include license plate to be positioned shooting image, for example, referring to FIG. 5, the shooting image is 1 institute in Fig. 5
Show, later, terminal carries out gray proces to the shooting image.
It should be noted that be illustrated so that acquired shooting image is shot to obtain by the terminal as an example here,
In another embodiment, acquired shooting image is sent to the terminal after can also being shot by other terminals, and the application is to this
Without limitation.
It is noted that in the embodiment of the present application, since terminal is based on the gray level image after gray proces
Carry out License Plate therefore not will receive the influence of license plate color huge number, compared to other need using color characteristic into
The method of row License Plate improves the validity of License Plate.
It should be noted that the specific implementation process that terminal carries out gray proces to shooting image may refer to related skill
Art, the application are not described in detail this.
Step 202: the gray value based on each pixel in K row pixel marks the local feature in the gray level image
Point, the local feature region include peak dot and valley point.
It can be appreciated that the gray level image generally includes multirow pixel, in order to facilitate understanding and describe, here by the gray scale
The multirow pixel that image includes is identified as K row pixel.Wherein, each pixel is corresponding with gray value, each pixel
Gray value value range be [0,255], terminal can be based on the gray value for the K row pixel that the gray level image includes, really
It is used to indicate L effective sections of license plate position that may be present in the fixed gray level image, can specifically include the step 202 to step
Rapid 204 several realization processes.
It should be noted that the K and the L are positive integer, also, since the L effectively sections are used to indicate the shooting
License plate position that may be present in image, and license plate size in shared region in shooting image is usually less than or equal to
The size of the shooting image, therefore, the L are less than or equal to the K.
In practical implementations, terminal is according to the size of the gray value of each pixel in K row pixel, to the K row pixel
Point is handled, to mark peak dot and the valley point in the gray level image, it is generally the case that and the peak dot can be described as H-type peak dot again,
The valley point is properly termed as L-type valley point again.In the concrete realization, it may include as follows for marking peak dot and valley point in the gray level image
(1) the several realization processes in-(2):
(1) target pixel points are directed to, determining same a line and adjacent with the target pixel points of belonging to the target pixel points
The gray value of former and later two pixels, the target pixel points be the K row pixel include any row pixel in addition to first
Any pixel point a and except the last one.
For example, it is assumed that the target pixel points are the second pixel point in the line n pixel that the K row pixel includes,
The terminal determines the gray value of first pixel in the line n pixel, and determines the third in the line n pixel
The gray value of the second pixel point is compared by the gray value of a pixel with the gray value of first pixel later,
And the gray value of the second pixel point is compared with the gray value of third pixel.
(2) if the gray value of the target pixel points is respectively less than the gray value of former and later two pixels, by the target picture
Vegetarian refreshments is labeled as valley point;If the gray value of the target pixel points is all larger than the gray value of former and later two pixels, by the mesh
It marks pixel and is labeled as peak dot.
Continue the example above, if the gray value of the second pixel point less than the gray value of first pixel, and should
The gray value of second pixel point again smaller than third pixel gray value, then by the second pixel point labeled as this n-th
Valley point in capable local feature region.If the gray value of the second pixel point is greater than the gray value of first pixel, and
The gray value of the second pixel point also greater than third pixel gray value, then by the second pixel point labeled as this
Peak dot in the local feature region of n row.
Certainly, if the gray value of the target pixel points is not less than the gray value of former and later two pixels simultaneously, and should
The gray value of target pixel points is not also simultaneously greater than the gray value of former and later two pixels, then does not carry out to the target pixel points
Label, that is, target pixel points at this time are both not belonging to peak dot, are also not belonging to valley point.
According to above-mentioned comparison, the process of label, peak dot and valley point all in the gray level image can be marked.Later,
Based on the gray value of each peak dot and valley point that mark, indicate that pixel, the longitudinal axis indicate gray value, can draw out with horizontal axis
All peak dots and valley point are formed by grey scale curve in any row that the gray level image includes, for example, peak all in certain a line
Point and valley point are formed by grey scale curve as shown in figure 5, the tendency of the grey scale curve can embody the foreground and background of license plate
Distribution character.
It is noted that it is above-mentioned be directed to target pixel points, by the gray value with former and later two adjacent pixels into
Row, to filter out the point that can not embody grey scale curve tendency in every a line, has relatively come the peak dot for marking every a line and valley point
It is demonstrated by grey scale curve to effect.
Step 203: the local feature region marked being filtered, global characteristic point is obtained.
From figure 5 it can be seen that some points can not obviously embody the trend characteristic of grey scale curve, therefore, in order to
The fully trend characteristic of outstanding behaviours grey scale curve, and in order to reduce the subsequent treating capacity to characteristic point, usually need
The local feature region marked is filtered, the local feature region of curve tendency can not obviously be embodied by removing those.
It in the concrete realization, may include: from marking to the realization process that the local feature region marked is filtered
Local feature region in select a local feature region, following processing is executed to the local feature region of selection, until handle often
Until all local feature regions in the local feature region marked:
It determines and belongs to same a line with the local feature region of selection and the latter part adjacent with the local feature region of selection
The gray value of characteristic point determines the ash between the gray value of the local feature region of selection and the gray value of the latter local feature region
The difference of angle value, when the difference of identified gray value is less than default gray scale difference, by the local feature region of selection and the latter office
Portion's characteristic point filters out.
Wherein, which can be configured by user is customized according to actual needs, can also be by the terminal
Default setting, the application do not limit this.
For example, referring to FIG. 5, selecting a local feature region A, herein, the office from the local feature region in line n
Portion characteristic point A is peak dot.Terminal determine the gray value between local feature region A and adjacent the latter local feature region B it
Difference, it can be appreciated that local feature region B is valley point.If local feature region A and adjacent the latter local feature region B it
Between the difference of gray value be less than default gray scale difference, illustrate that local feature region A cannot be protruded with the latter local feature region B
Therefore the tendency of display grey scale curve can filter out local feature region A and the latter local feature region B.
According to above-mentioned realization process, processing can be filtered to the local feature region marked, obtain global characteristic point.
For example, the global characteristic point that same a line is belonged in filtered global characteristic point is formed by grey scale curve as shown in fig. 6, being not difficult
Find out, curvilinear characteristic tendency can effectively be shown by being formed by grey scale curve.
In this way, filtering out the point that some points can not obviously embody the trend characteristic of grey scale curve, can fully protrude
The trend characteristic of representing gradation curve, also, reduce the subsequent treating capacity to characteristic point, improve treatment effeciency.
Step 204: based on the global characteristic point obtained after filtering, determining L effective sections in the gray level image.
It can also be seen that the amplitude variation of the global characteristic point in the corresponding grey scale curve of license plate area has from the Fig. 6
Certain regularity, i.e., other than at the big neutral gear of intercharacter, the horizontal interval of remaining global characteristic point is more uniform, and phase
It is separated by between adjacent two global characteristic points relatively close.Therefore, in the embodiment of the present application, terminal can be complete according to what is obtained after filtering
Belong to the distance between the global characteristic point of same a line feature in office's characteristic point, determination is used to indicate license plate position that may be present
L effective sections.Specifically, based on the global characteristic point obtained after filtering, determine that L in the gray level image effectively sections can be with
Including following (3)-(5) several realization processes:
(3) coordinate of each global characteristic point obtained after filtering is obtained.
Firstly the need of explanation, in practical implementations, rectangular coordinate system can be established in the gray level image, for example,
The rectangular coordinate system, establishment process of the application to rectangular coordinate system can be established as origin using the lower left corner of the gray level image
Without limitation.
Each of in this way, each global characteristic point is corresponding with the coordinate of oneself, i.e., obtained after the available filtering of terminal
The coordinate of global characteristic point.Further, the terminal is according to the coordinate of the two neighboring global characteristic point for belonging to same a line, can be with
Determine the distance between the two neighboring global characteristic point.
(4) based on acquired coordinate, determine that the available point in the global characteristic point obtained after filtering, the available point refer to
Belong to the point of effective section, to obtain the L effective sections.
In the concrete realization, a global characteristic point is selected from the global characteristic point obtained after filtering, to the complete of selection
Office's characteristic point executes following processing, until all global characteristic points in the global characteristic point obtained after having handled filtering:
The coordinate of global characteristic point based on selection, and with the global characteristic point of selection belong to same a line and with selection
The coordinate of former and later two adjacent global characteristic points of global characteristic point, determines distance to a declared goal, which refers to the complete of selection
The sum of the distance between office's characteristic point and former and later two adjacent global characteristic points, when the distance to a declared goal is less than pre-determined distance,
Determine that selected global characteristic point is available point.
Wherein, which can also be defaulted by the terminal and be set by user's customized setting according to actual needs
It sets, the embodiment of the present application does not limit this.
For example, referring to FIG. 6, assuming that the global characteristic point selected for global characteristic point D, belongs to together with the global characteristic point
A line and former and later two global characteristic points adjacent with global characteristic point D are respectively C and E, at this point, being based on the global characteristic point
C, the coordinate of global characteristic point D and global characteristic point E, can determine between global characteristic point C and global characteristic point D away from
From being x2 for x1, the distance between global characteristic point E and global characteristic point E, in this way, can determine that the distance to a declared goal is x1
+x2。
As it was noted above, since the horizontal interval in the corresponding grey scale curve of license plate area is more uniform, and belong to same
It is separated by between capable two neighboring global characteristic point relatively closely, therefore, as identified global characteristic point D and former and later two overall situations
When the sum of the distance between characteristic point x1+x2 is less than pre-determined distance, illustrate the global characteristic point selected to belong to license plate location
Point in domain, at this point it is possible to which the global characteristic point of selection is determined as available point.
Further, when the distance to a declared goal is greater than pre-determined distance and is less than N times of the pre-determined distance, determination is located at respectively
The quantity S and T of specified pixel point between the global characteristic point of selection and former and later two global characteristic points, the specified pixel point
The pixel in same default tonal range is in for the gray value of gray value and the global characteristic point of selection.When the S is greater than in advance
If numerical value, the T are not more than the default value, and between distance to a declared goal coordinate length corresponding with the S specified pixel point
When difference is less than the pre-determined distance, the global characteristic point of selection is determined as available point;When the T is little greater than default value, the S
In the default value, and the difference between distance to a declared goal coordinate length corresponding with the T specified pixel point is default less than this
Apart from when, the global characteristic point of selection is determined as available point;When the S and the T are all larger than the default value, the S are determined
The corresponding coordinate length of specified pixel point coordinate length corresponding with the T specified pixel point and, if the distance to a declared goal with should
Coordinate length and between difference be less than the pre-determined distance, then the global characteristic point of selection is determined as available point.
Wherein, above-mentioned N is the integer greater than 1, it is generally the case that the N can be set to 2.In addition, above-mentioned default value can
To be configured by user is customized according to actual needs, alternatively, can also be by the terminal default setting, the embodiment of the present application pair
This is not construed as limiting.
It, in that case, can since the character in license plate has that distribution is irregular in practical application scene
Can lead between character that there are big neutral gears, for example, the big neutral gear be in Fig. 6 21 shown in.At this point, if the global characteristic point of selection
On the big neutral gear, terminal may detect between the global characteristic point of selection and former and later two global characteristic points away from
From the sum of be greater than pre-determined distance, but be less than N times of the pre-determined distance.In fact, the global characteristic point of the selection on the big neutral gear
For available point, therefore, in order to avoid omitting these available points, if the global characteristic point and former and later two global characteristics of selection
The sum of the distance between point is greater than pre-determined distance and less than N times of the pre-determined distance, then needs to further increase to the complete of selection
The determined property of office's characteristic point.
In the embodiment of the present application, the distance of the big neutral gear can be cut, is equivalent to the big neutral gear along level side
To folding up, and then by comparing the distance between global characteristic point of selection and former and later two global characteristic points it
And the size relation between pre-determined distance, to judge the global characteristic point selected whether for available point.
In the concrete realization, the global characteristic point and former and later two described global characteristic points positioned at selection can be determined respectively
Between specified pixel point quantity, and the quantity is individually identified as S and T.
When the S be greater than default value, the T be not more than the default value, illustrate in the global characteristic point of selection and front and back
There are big neutral gears between previous global characteristic point in two global characteristic points, at this point, determining the distance to a declared goal and this S finger
Determine the difference between the corresponding coordinate length of pixel, the distance of the big neutral gear is cut, i.e., by the big neutral gear along level
It folds up in direction.If the difference is less than pre-determined distance, illustrate the global characteristic point selected to belong to license plate region
Interior point, at this point it is possible to which the global characteristic point of selection is determined as available point.
When the T be greater than default value, the S be not more than the default value, illustrate in the global characteristic point of selection and front and back
There are big neutral gears between the latter global characteristic point in two global characteristic points, at this point, determining the distance to a declared goal and this T finger
Determine the difference between the corresponding coordinate length of pixel, the distance of the big neutral gear is cut, i.e., by the big neutral gear along level
If direction is folded up, the difference is less than pre-determined distance, illustrate the global characteristic point selected to belong to license plate region
Interior point, at this point it is possible to which the global characteristic point of selection is determined as available point.
When the S and T are all larger than default value, illustrate global characteristic point and former and later two global characteristic points in selection
Between there is big neutral gear, at this point, determining corresponding with the S specified pixel point coordinate length of the distance to a declared goal and this T refers to
Determine the sum of the corresponding coordinate length of pixel, and determine the distance to a declared goal and the coordinate length and between difference, should
The distance of two big neutral gear is cut, i.e., folds up this two big neutral gear each along horizontal direction.If the difference is less than pre-
If distance, then illustrate the global characteristic point selected to belong to the point in license plate region, at this point it is possible to which the overall situation by selection is special
Sign point is determined as available point.
It is noted that being cut above by by the distance of big neutral gear, and then by comparing the global characteristics of selection
The size relation of the sum of the distance between point and former and later two global characteristic points between pre-determined distance, further to judge to select
Whether the global characteristic point selected is available point, avoids omitting available point, in this way, improving the accuracy of available point judgement.
For example, with continued reference to FIG. 6, assuming the global characteristic point selected for global characteristic point F, and above-mentioned pre-determined distance is
It is x3, overall situation spy at a distance from 2, the previous global characteristic point E in former and later two global characteristic points of global characteristic point F and this
Levying is x4 at a distance from the latter global characteristic point G in former and later two global characteristic points of point F and this.It can then determine selected
The sum of the distance between global characteristic point and former and later two global characteristic points are x3+x4.
If the x3+x4 is greater than pre-determined distance and is less than 2 times of the pre-determined distance, at this point, the terminal determines that this is complete respectively
Same default ash is in the gray value of global characteristic point F between office characteristic point F and former and later two global characteristic points E and G
The quantity for spending the pixel in range, is denoted as S and T.
At this point it is possible to find that the T is greater than default value, therefore, terminal determines that coordinate corresponding to the T pixel is long
Degree, it is assumed that the coordinate length is l, and terminal cuts coordinate length l.Later, if the difference of x3+x4-l be less than this it is default away from
From global characteristic point F is then determined as the available point, otherwise, can determine that global characteristic point F is not available point.
In addition, it is necessary to explanation, when the distance between the global characteristic point of selection and former and later two global characteristic points
The sum of when being greater than N times of the pre-determined distance, can determine that selected global characteristic point is not available point, i.e. the overall situation of selection is special
The point that sign point is not belonging in effective section.
(5) line segment that the starting available point belonged in same a line available point and terminal available point connect into is determined as effectively
Section.
According to above-mentioned realization process, which can determine all available points in shooting image, wherein belong to same a line
Available point include starting available point and terminal available point, terminal by the available point for belonging to same a line starting available point with
Terminal available point connects, and is formed by line segment and is determined as effective section, so that L effective sections are obtained, for example, continuing with ginseng
Fig. 6 is examined, the corresponding effective section of certain row pixel is as shown at 22.
It should be noted that the K row pixel that above-mentioned steps 202 include based on the gray level image to step 204
The gray value of point, the step of determining L in the gray level image effective sections.Wherein, the L effectively sections are used to indicate the shooting
License plate position that may be present in image.In this way, based on the L effective sections, can from gray level image positioning licence plate position
It sets, without the positioning licence plate in such a way that connected domain detects, improves the accuracy of positioning.
Further, in order to improve subsequent processing speed, the ash for the K row pixel that terminal includes based on the gray level image
Multirow pixel can also be merged into one-row pixels point, before determining L effective sections in the gray level image with weight by angle value
Newly obtain every a line pixel of gray level image.
In the concrete realization, the process that the above-mentioned row in gray level image carries out merging treatment may include: will be every adjacent
M row pixel in belong to same row pixel gray value it is corresponding be added after be averaging, by every adjacent M row pixel
One-row pixels point is merged into, which is less than total line number of pixel included by the shooting image and can be divided exactly by total line number.
Wherein, which can be by user's customized setting according to actual needs, it is generally the case that user can be according to shooting
The height of image is configured.Specifically, pixel included by the shooting image can be determined according to the height of the shooting image
The M according to actual needs, is arranged to the numerical value divided exactly by total line number later by total line number of point.
For example, total line number of the pixel of the shooting image is 40, which can be set to 4.At this point, terminal will be per adjacent
Four rows in be located at same row pixel gray value be added after be averaging so that merging into one per four adjacent row pixels
Row pixel, to realize row merging treatment, that is, it is adjacent four that the gray value of each pixel is practical in every a line after merging
In row in respective column the gray value of four pixels average value.
At this point, determining that the L in the gray level image have in the gray value for the K row pixel for including based on the gray level image
In the implementation procedure for imitating section, terminal can be handled based on the gray level image after row merging treatment, so, it is possible to reduce row
Treating capacity, so as to improve the operational efficiency of terminal.
Further, after carrying out merging treatment to the row in gray level image, which can also be carried out horizontal
Smoothing processing, to reduce the interference of the high frequency details such as noise and texture in the gray level image.Wherein, water is carried out to gray level image
The specific implementation of flat smoothing processing may refer to the relevant technologies, and the embodiment of the present application is not described in detail this.
Step 205: based on L effective sections in the gray level image, positioning the license plate from the shooting image.
In the concrete realization, above-mentioned L effective sections based in the gray level image, position the license plate from the shooting image
It may include: that the L effectively sections are scanned one by one according to sequence from top to bottom, if the overlapping of the effective section of each adjacent two
Length is greater than preset length, then retains the effective section scanned and continue to execute scan operation, have until scanning to two neighboring
When imitating the overlap length of section less than the preset length, stop scan operation.Based on all effective sections retained, the license plate is determined
Left margin, right margin, coboundary and lower boundary, and according to identified left margin, right margin, coboundary and lower boundary, from
The license plate is positioned in the shooting image.
It is noted that the embodiment of the present invention is by scan one by one come positioning licence plate the L effectively sections, due to
The L effectively sections are used to license plate position that may be present in instruction shooting image, therefore, even if the character distribution of license plate is not advised
Rule, can also accurately positioning licence plate, with improving License Plate accuracy from shooting image.
In the concrete realization, terminal can be each traveling row number effectively where section, for example, first effectively where section
Capable number is 001, and the number of the second row is 002, and so on.Later, according to sequence from top to bottom to the L effective sections
It is scanned one by one, to determine the overlap length of the effective section of each adjacent two, for example, referring to FIG. 7, the 001st row and the 002nd row
Overlap length be figure in 23 shown in.
If the overlap length is greater than preset length, two rows where illustrating the effective section of scanned two may be belonged to
Therefore license plate region retains the two effective sections scanned, and continue to scan on.Until scanning to two neighboring effective
When the overlap length of section is less than the preset length, the row where illustrating next effective section scanned is not belonging to license plate location
Therefore domain can stop scanning.
Wherein, above-mentioned preset length can also be defaulted by terminal and be set by user's customized setting according to actual needs
It sets, the embodiment of the present disclosure does not limit this.
Later, terminal is based on all effective sections retained, determine the left margin of the license plate, right margin, coboundary and under
Boundary, specific implementation may include: to be averaging after the coordinate of all effective sections will retained of starting available point is added, and obtain
It is averaging, is put down to average origin coordinates, and after the coordinate of all effective sections retained of terminal available point is added
Equal terminal point coordinate, and the vertical line where the origin coordinates that is averaged is determined as to the left margin of the license plate, and by the mean end-point
Vertical line where coordinate is determined as the right margin of the license plate;By the effective section of institute that preliminary scan arrives in all effective sections retained
The position of one-row pixels point be determined as the coboundary of the license plate, and by finally scanning is arrived in all effective rows retained
Effective section where the position of one-row pixels point be determined as the lower boundary of the license plate.
According to record above it is found that each effectively section includes originating available point and terminal available point, in the concrete realization,
It is averaging after the coordinate of all effective sections of starting available point being added, obtains an average origin coordinates, this average
Vertical line where beginning coordinate is the left margin that can be identified as license plate.Similarly, according to similar realization thought, terminal is had based on all
The coordinate for imitating the terminal available point of section, can determine the right margin of license plate.In this way, based on each effective section starting available point and
Terminal available point determines left margin and right margin, ensure that the accuracy of the left and right side positioning to license plate.
In addition, during determining coboundary and lower boundary, since all effective sections for scanning and remaining are
Belong to effective section of license plate area, and terminal is scanned according to the sequence of shooting image from top to bottom, therefore, can be incited somebody to action
In all effective rows retained preliminary scan to effective section where the position of one-row pixels point be determined as the license plate
Coboundary, and the position of the one-row pixels point where the effective section finally scanned in all effective rows retained is determined
For the lower boundary of the license plate.In this way, determining coboundary and lower boundary based on the effective section scanned, ensure that license plate
The accuracy of upper and lower side positioning.
It should be noted that if carry out row merging treatment to gray level image in execution step above, then actually institute
Determining coboundary is the position for effective section first trip pixel at place before merging that preliminary scan arrives, and lower boundary is finally to sweep
The position of footline pixel of the effective section retouched where before merging.
It can be appreciated that after located four edges circle of the license plate, since four edges circle can uniquely position a region
Block, therefore, terminal can position the license plate from shooting image, for example, the license plate positioned such as Fig. 8 according to four edges circle
It is shown.
In the embodiment of the present application, the shooting image including license plate to be positioned is obtained, and ash is carried out to the shooting image
Degree processing, obtains gray level image.Gray value based on the K row pixel that the gray level image includes, determines the L in the gray level image
A effective section.Since the identified L effectively sections are used to indicate license plate position that may be present in the shooting image, because
The middle positioning licence plate from shooting image can be realized based on L effective sections in the gray level image in this.In this way, working as the word of license plate
When symbol distribution is irregular, avoiding the need for the positioning licence plate in such a way that connected domain detects leads to the problem of License Plate inaccuracy,
Improve the accuracy of positioning.
Fig. 9 is a kind of structural schematic diagram of license plate positioning device shown according to an exemplary embodiment, the License Plate
Device being implemented in combination with by software, hardware or both.The device of the License Plate may include:
Image processing module 310 obtains grayscale image for obtaining shooting image and carrying out gray proces to the shooting image
Picture includes license plate to be positioned in the shooting image;
Effective section determining module 320, the gray value of the K row pixel for including based on the gray level image determines the ash
L effective sections in image are spent, the L effectively sections are used to indicate license plate position that may be present, K in the shooting image
It is positive integer with the L, and the L is less than or equal to the K;
Locating module 330, for positioning the vehicle from the shooting image based on the L effective sections in the gray level image
Board.
Optionally, which includes:
Marking unit marks the office in the gray level image for the gray value based on each pixel in the K row pixel
Portion's characteristic point, the local feature region include peak dot or valley point;
Filter element obtains global characteristic point for being filtered to the local feature region marked;
Determination unit, for based on the global characteristic point obtained after filtering, determining that the L in the gray level image have
Imitate section.
Optionally, which is used for:
For target pixel points, determines and belong to same a line and the front and back adjacent with the target pixel points with the target pixel points
The gray value of two pixels, the target pixel points be in any row pixel that the K row pixel includes in addition to first and
Any pixel point except the last one;
If the gray value of the target pixel points is respectively less than the gray value of former and later two pixels, by the target pixel points
Labeled as valley point;If the gray value of the target pixel points is all larger than the gray value of former and later two pixels, by the target picture
Vegetarian refreshments is labeled as peak dot.
Optionally, which is used for:
A local feature region is selected from the local feature region marked, and following place is executed to the local feature region of selection
Reason, until having handled all local feature regions in the local feature region marked:
It determines and belongs to same a line with the local feature region of selection and the latter part adjacent with the local feature region of selection
The gray value of characteristic point;
Determine the gray value between the gray value of the local feature region of selection and the gray value of the latter local feature region
Difference;
When the difference of identified gray value is less than default gray scale difference, by the local feature region of selection and the latter part
Characteristic point filters out.
Optionally, which is used for:
Obtain the coordinate of each global characteristic point obtained after filtering;
Based on acquired coordinate, determine that the available point in the global characteristic point obtained after filtering, the available point refer to category
In the point of effective section;
The line segment that the starting available point belonged in same a line available point and terminal available point connect into is determined as effective section,
To obtain the L effective sections.
Optionally, which is used for:
A global characteristic point is selected from the global characteristic point obtained after filtering, and the global characteristic point of selection is executed such as
Lower processing, until all global characteristic points in the global characteristic point obtained after having handled filtering:
The coordinate of global characteristic point based on selection, and with the global characteristic point of selection belong to same a line and with selection
The coordinate of former and later two adjacent global characteristic points of global characteristic point, determines distance to a declared goal, which refers to the complete of selection
The sum of the distance between office's characteristic point and former and later two adjacent global characteristic points;
When the distance to a declared goal is less than pre-determined distance, determine that selected global characteristic point is available point.
Optionally, which is also used to:
When the distance to a declared goal is greater than pre-determined distance and is less than N times of the pre-determined distance, determines be located at the complete of selection respectively
The quantity S and T of specified pixel point between office's characteristic point and former and later two global characteristic points, the specified pixel point are gray value
The pixel being in the gray value of the global characteristic point of selection in same default tonal range;
When the S is not more than the default value, and the distance to a declared goal and the S specified pixel point pair greater than default value, the T
When the difference between coordinate length answered is less than the pre-determined distance, the global characteristic point of selection is determined as available point;
When the T is not more than the default value, and the distance to a declared goal and the T specified pixel point pair greater than default value, the S
When the difference between coordinate length answered is less than the pre-determined distance, the global characteristic point of selection is determined as available point;
When the S and the T are all larger than the default value, the corresponding coordinate length of S specified pixel point and the T are determined
The sum of the corresponding coordinate length of specified pixel point, if the distance to a declared goal and the coordinate length and between difference it is default less than this
The global characteristic point of selection is then determined as available point by distance.
Optionally, which includes:
Scanning element, for being scanned one by one according to sequence from top to bottom to the L effectively sections;
If the overlap length of the effective section of each adjacent two is greater than preset length, retains the effective section scanned and continue to hold
Row scan operation stops scan operation when scanning to two neighboring effective section of overlap length is less than the preset length;
Positioning unit, for determining the left margin, right margin, coboundary of the license plate based on all effective sections retained
And lower boundary, and according to identified left margin, right margin, coboundary and lower boundary, the license plate is positioned from the shooting image.
Optionally, which is used for:
It is averaging after the coordinate of all effective sections retained of starting available point is added, obtains average origin coordinates,
And be averaging after being added the coordinate of all effective sections retained of terminal available point, mean end-point coordinate is obtained, and will
Vertical line where the average origin coordinates is determined as the left margin of the license plate, and the vertical line where the mean end-point coordinate is true
It is set to the right margin of the license plate;
By preliminary scan in all effective sections retained to effective section where the position of one-row pixels point be determined as
The coboundary of the license plate, and by the one-row pixels point where the effective section finally scanned in all effective rows retained
Position is determined as the lower boundary of the license plate.
Optionally, referring to FIG. 10, the device further include:
Merging module 340, for the gray value for the pixel for belonging to same row in every adjacent M row pixel to be corresponded to phase
It is averaging after adding, every adjacent M row pixel is merged into one-row pixels point, which is less than picture included by the shooting image
Total line number of vegetarian refreshments and can be by total line number integer.
In the embodiment of the present application, the shooting image including license plate to be positioned is obtained, and ash is carried out to the shooting image
Degree processing, obtains gray level image.Gray value based on the K row pixel that the gray level image includes, determines the L in the gray level image
A effective section.Since the identified L effectively sections are used to indicate license plate position that may be present in the shooting image, because
The middle positioning licence plate from shooting image can be realized based on the L effective sections in the gray level image in this.In this way, when license plate
When character distribution is irregular, avoiding the need for the positioning licence plate in such a way that connected domain detects leads to asking for License Plate inaccuracy
Topic, that is, improve the accuracy of positioning.
It should be understood that the device of License Plate provided by the above embodiment realize License Plate method when, only
The example of the division of the above functional modules, in practical application, can according to need and by above-mentioned function distribution by
Different functional modules is completed, i.e., the internal structure of equipment is divided into different functional modules, described above complete to complete
Portion or partial function.In addition, the device of License Plate provided by the above embodiment and the embodiment of the method for License Plate belong to
Same design, specific implementation process are detailed in embodiment of the method, and which is not described herein again.
Figure 11 shows the structural block diagram of the terminal 400 of an illustrative embodiment of the invention offer.The terminal 400 can be with
It is: smart phone, tablet computer, laptop or desktop computer.Terminal 400 is also possible to referred to as user equipment, portable
Other titles such as terminal, laptop terminal, terminal console.
In general, terminal 400 includes: processor 401 and memory 402.
Processor 401 may include one or more processing cores, such as 4 core processors, 8 core processors etc..Place
Reason device 401 can use DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field-
Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, may be programmed
Logic array) at least one of example, in hardware realize.Processor 401 also may include primary processor and coprocessor, master
Processor is the processor for being handled data in the awake state, also referred to as CPU (Central Processing
Unit, central processing unit);Coprocessor is the low power processor for being handled data in the standby state.In
In some embodiments, processor 401 can be integrated with GPU (Graphics Processing Unit, image processor),
GPU is used to be responsible for the rendering and drafting of content to be shown needed for display screen.In some embodiments, processor 401 can also be wrapped
AI (Artificial Intelligence, artificial intelligence) processor is included, the AI processor is for handling related machine learning
Calculating operation.
Memory 402 may include one or more computer readable storage mediums, which can
To be non-transient.Memory 402 may also include high-speed random access memory and nonvolatile memory, such as one
Or multiple disk storage equipments, flash memory device.In some embodiments, the non-transient computer in memory 402 can
Storage medium is read for storing at least one instruction, at least one instruction performed by processor 401 for realizing this Shen
Please in embodiment of the method provide license plate locating method.
In some embodiments, terminal 400 is also optional includes: peripheral device interface 403 and at least one peripheral equipment.
It can be connected by bus or signal wire between processor 401, memory 402 and peripheral device interface 403.Each peripheral equipment
It can be connected by bus, signal wire or circuit board with peripheral device interface 403.Specifically, peripheral equipment includes: radio circuit
404, at least one of touch display screen 405, camera 406, voicefrequency circuit 407, positioning component 408 and power supply 409.
Peripheral device interface 403 can be used for I/O (Input/Output, input/output) is relevant outside at least one
Peripheral equipment is connected to processor 401 and memory 402.In some embodiments, processor 401, memory 402 and peripheral equipment
Interface 403 is integrated on same chip or circuit board;In some other embodiments, processor 401, memory 402 and outer
Any one or two in peripheral equipment interface 403 can realize on individual chip or circuit board, the present embodiment to this not
It is limited.
Radio circuit 404 is for receiving and emitting RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal.It penetrates
Frequency circuit 404 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 404 turns electric signal
It is changed to electromagnetic signal to be sent, alternatively, the electromagnetic signal received is converted to electric signal.Optionally, radio circuit 404 wraps
It includes: antenna system, RF transceiver, one or more amplifiers, tuner, oscillator, digital signal processor, codec chip
Group, user identity module card etc..Radio circuit 404 can be carried out by least one wireless communication protocol with other terminals
Communication.The wireless communication protocol includes but is not limited to: WWW, Metropolitan Area Network (MAN), Intranet, each third generation mobile communication network (2G, 3G,
4G and 5G), WLAN and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.In some embodiments, it penetrates
Frequency circuit 404 can also include NFC (Near Field Communication, wireless near field communication) related circuit, this
Application is not limited this.
Display screen 405 is for showing UI (User Interface, user interface).The UI may include figure, text, figure
Mark, video and its their any combination.When display screen 405 is touch display screen, display screen 405 also there is acquisition to show
The ability of the touch signal on the surface or surface of screen 405.The touch signal can be used as control signal and be input to processor
401 are handled.At this point, display screen 405 can be also used for providing virtual push button and/or dummy keyboard, also referred to as soft button and/or
Soft keyboard.In some embodiments, display screen 405 can be one, and the front panel of terminal 400 is arranged;In other embodiments
In, display screen 405 can be at least two, be separately positioned on the different surfaces of terminal 400 or in foldover design;In still other reality
It applies in example, display screen 405 can be flexible display screen, be arranged on the curved surface of terminal 400 or on fold plane.Even, it shows
Display screen 405 can also be arranged to non-rectangle irregular figure, namely abnormity screen.Display screen 405 can use LCD (Liquid
Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode)
Etc. materials preparation.
CCD camera assembly 406 is for acquiring image or video.Optionally, CCD camera assembly 406 include front camera and
Rear camera.In general, the front panel of terminal is arranged in front camera, the back side of terminal is arranged in rear camera.One
In a little embodiments, rear camera at least two is main camera, depth of field camera, wide-angle camera, focal length camera shooting respectively
Any one in head, to realize that main camera and the fusion of depth of field camera realize background blurring function, main camera and wide-angle
Camera fusion realizes that pan-shot and VR (Virtual Reality, virtual reality) shooting function or other fusions are clapped
Camera shooting function.In some embodiments, CCD camera assembly 406 can also include flash lamp.Flash lamp can be monochromatic warm flash lamp,
It is also possible to double-colored temperature flash lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, can be used for not
With the light compensation under colour temperature.
Voicefrequency circuit 407 may include microphone and loudspeaker.Microphone is used to acquire the sound wave of user and environment, and will
Sound wave, which is converted to electric signal and is input to processor 401, to be handled, or is input to radio circuit 404 to realize voice communication.
For stereo acquisition or the purpose of noise reduction, microphone can be separately positioned on the different parts of terminal 400 to be multiple.Mike
Wind can also be array microphone or omnidirectional's acquisition type microphone.Loudspeaker is then used to that processor 401 or radio circuit will to be come from
404 electric signal is converted to sound wave.Loudspeaker can be traditional wafer speaker, be also possible to piezoelectric ceramic loudspeaker.When
When loudspeaker is piezoelectric ceramic loudspeaker, the audible sound wave of the mankind can be not only converted electrical signals to, it can also be by telecommunications
Number the sound wave that the mankind do not hear is converted to carry out the purposes such as ranging.In some embodiments, voicefrequency circuit 407 can also include
Earphone jack.
Positioning component 408 is used for the current geographic position of positioning terminal 400, to realize navigation or LBS (Location
Based Service, location based service).Positioning component 408 can be the GPS (Global based on the U.S.
Positioning System, global positioning system), China dipper system or Russia Galileo system positioning group
Part.
Power supply 409 is used to be powered for the various components in terminal 400.Power supply 409 can be alternating current, direct current,
Disposable battery or rechargeable battery.When power supply 409 includes rechargeable battery, which can be wired charging electricity
Pond or wireless charging battery.Wired charging battery is the battery to be charged by Wireline, and wireless charging battery is by wireless
The battery of coil charges.The rechargeable battery can be also used for supporting fast charge technology.
In some embodiments, terminal 400 further includes having one or more sensors 410.The one or more sensors
410 include but is not limited to: acceleration transducer 411, gyro sensor 412, pressure sensor 413, fingerprint sensor 414,
Optical sensor 415 and proximity sensor 416.
The acceleration that acceleration transducer 411 can detecte in three reference axis of the coordinate system established with terminal 400 is big
It is small.For example, acceleration transducer 411 can be used for detecting component of the acceleration of gravity in three reference axis.Processor 401 can
With the acceleration of gravity signal acquired according to acceleration transducer 411, touch display screen 405 is controlled with transverse views or longitudinal view
Figure carries out the display of user interface.Acceleration transducer 411 can be also used for the acquisition of game or the exercise data of user.
Gyro sensor 412 can detecte body direction and the rotational angle of terminal 400, and gyro sensor 412 can
To cooperate with acquisition user to act the 3D of terminal 400 with acceleration transducer 411.Processor 401 is according to gyro sensor 412
Following function may be implemented in the data of acquisition: when action induction (for example changing UI according to the tilt operation of user), shooting
Image stabilization, game control and inertial navigation.
The lower layer of side frame and/or touch display screen 405 in terminal 400 can be set in pressure sensor 413.Work as pressure
When the side frame of terminal 400 is arranged in sensor 413, user can detecte to the gripping signal of terminal 400, by processor 401
Right-hand man's identification or prompt operation are carried out according to the gripping signal that pressure sensor 413 acquires.When the setting of pressure sensor 413 exists
When the lower layer of touch display screen 405, the pressure operation of touch display screen 405 is realized to UI circle according to user by processor 401
Operability control on face is controlled.Operability control includes button control, scroll bar control, icon control, menu
At least one of control.
Fingerprint sensor 414 is used to acquire the fingerprint of user, collected according to fingerprint sensor 414 by processor 401
The identity of fingerprint recognition user, alternatively, by fingerprint sensor 414 according to the identity of collected fingerprint recognition user.It is identifying
When the identity of user is trusted identity out, the user is authorized to execute relevant sensitive operation, the sensitive operation packet by processor 401
Include solution lock screen, check encryption information, downloading software, payment and change setting etc..Terminal can be set in fingerprint sensor 414
400 front, the back side or side.When being provided with physical button or manufacturer Logo in terminal 400, fingerprint sensor 414 can be with
It is integrated with physical button or manufacturer Logo.
Optical sensor 415 is for acquiring ambient light intensity.In one embodiment, processor 401 can be according to optics
The ambient light intensity that sensor 415 acquires controls the display brightness of touch display screen 405.Specifically, when ambient light intensity is higher
When, the display brightness of touch display screen 405 is turned up;When ambient light intensity is lower, the display for turning down touch display screen 405 is bright
Degree.In another embodiment, the ambient light intensity that processor 401 can also be acquired according to optical sensor 415, dynamic adjust
The acquisition parameters of CCD camera assembly 406.
Proximity sensor 416, also referred to as range sensor are generally arranged at the front panel of terminal 400.Proximity sensor 416
For acquiring the distance between the front of user Yu terminal 400.In one embodiment, when proximity sensor 416 detects use
When family and the distance between the front of terminal 400 gradually become smaller, touch display screen 405 is controlled from bright screen state by processor 401
It is switched to breath screen state;When proximity sensor 416 detects user and the distance between the front of terminal 400 becomes larger,
Touch display screen 405 is controlled by processor 401 and is switched to bright screen state from breath screen state.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal 400 of structure shown in Figure 11, can wrap
It includes than illustrating more or fewer components, perhaps combine certain components or is arranged using different components.
The embodiment of the present application also provides a kind of non-transitorycomputer readable storage mediums, when in the storage medium
When instruction is executed by the processor of mobile terminal, so that mobile terminal is able to carry out above-mentioned Fig. 2, Fig. 3 or embodiment illustrated in fig. 4 mentions
The license plate locating method of confession.
The embodiment of the present application also provides a kind of computer program products comprising instruction, when it runs on computers
When, so that the license plate locating method that computer executes above-mentioned Fig. 2, Fig. 3 or embodiment illustrated in fig. 4 provides.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely the preferred embodiments of the application, not to limit the application, it is all in spirit herein and
Within principle, any modification, equivalent replacement, improvement and so on be should be included within the scope of protection of this application.
Claims (21)
1. a kind of license plate locating method, which is characterized in that the described method includes:
It obtains shooting image and gray proces is carried out to the shooting image, obtain gray level image, include in the shooting image
License plate to be positioned;
Gray value based on the K row pixel that the gray level image includes determines L effective sections in the gray level image, institute
It states L effectively sections to be used to indicate license plate position that may be present described in the shooting image, the K and the L are positive
Integer, and the L is less than or equal to the K;
Based on the L effective sections in the gray level image, the license plate is positioned from the shooting image.
2. the method as described in claim 1, which is characterized in that the K row pixel for including based on the gray level image
Gray value determines L effective sections in the gray level image, comprising:
Based on the gray value of each pixel in the K row pixel, the local feature region in the gray level image is marked, it is described
Local feature region includes peak dot or valley point;
The local feature region marked is filtered, global characteristic point is obtained;
Based on the global characteristic point obtained after filtering, the L effective sections in the gray level image are determined.
3. method according to claim 2, which is characterized in that the ash based on each pixel in the K row pixel
Angle value marks the local feature region in the gray level image, comprising:
For target pixel points, determines and belong to same a line and the front and back adjacent with the target pixel points with the target pixel points
The gray value of two pixels, the target pixel points be the K row pixel include any row pixel in addition to first
Any pixel point a and except the last one;
If the gray value of the target pixel points is respectively less than the gray value of former and later two pixels, by the object pixel
Point is labeled as valley point;If the gray value of the target pixel points is all larger than the gray value of former and later two pixels, by institute
Target pixel points are stated labeled as peak dot.
4. method according to claim 2, which is characterized in that the described pair of local feature region marked is filtered, comprising:
A local feature region is selected from the local feature region marked, and following processing is executed to the local feature region of selection,
Until having handled all local feature regions in the local feature region marked:
It determines and belongs to same a line and the latter local feature adjacent with the local feature region of selection with the local feature region of selection
The gray value of point;
Determine gray value between the gray value of the local feature region of selection and the gray value of the latter local feature region it
Difference;
It is when the difference of identified gray value is less than default gray scale difference, the local feature region of selection and described the latter part is special
Sign point filters out.
5. the method as described in claim 2-4 is any, which is characterized in that it is described based on the global characteristic point obtained after filtering,
Determine the L effective sections in the gray level image, comprising:
Obtain the coordinate of each global characteristic point obtained after filtering;
Based on acquired coordinate, the available point in the global characteristic point obtained after filtering is determined, the available point, which refers to, to be belonged to
The point of effective section;
The line segment that the starting available point belonged in same a line available point and terminal available point connect into is determined as effective section, with
To the L effective sections.
6. method as claimed in claim 5, which is characterized in that it is described based on acquired coordinate, it is obtained after determining filtering
Available point in global characteristic point, comprising:
A global characteristic point is selected from the global characteristic point obtained after filtering, and following place is executed to the global characteristic point of selection
Reason, until all global characteristic points in the global characteristic point obtained after having handled filtering:
The coordinate of global characteristic point based on selection, and with the global characteristic point of selection belong to same a line and with the overall situation of selection
The coordinate of former and later two adjacent global characteristic points of characteristic point determines that distance to a declared goal, the distance to a declared goal refer to the overall situation of selection
The sum of the distance between characteristic point and former and later two global characteristic points;
When the distance to a declared goal is less than pre-determined distance, determine that selected global characteristic point is available point.
7. method as claimed in claim 6, which is characterized in that the coordinate of the global characteristic point based on selection, Yi Jiyu
The global characteristic point of selection belongs to same a line and the coordinate of former and later two global characteristic points adjacent with the global characteristic point of selection,
After determining distance to a declared goal, further includes:
When the distance to a declared goal is greater than the pre-determined distance and is less than N times of the pre-determined distance, determines be located at selection respectively
Global characteristic point and former and later two described global characteristic points between specified pixel point quantity S and T, the specified pixel point
The pixel in same default tonal range is in for the gray value of gray value and the global characteristic point of selection;
When the S is not more than the default value, and the distance to a declared goal and the S specified pictures greater than default value, the T
When difference between the corresponding coordinate length of vegetarian refreshments is less than the pre-determined distance, the global characteristic point of selection is determined as effectively
Point;
When the T is not more than the default value, and the distance to a declared goal and the T specified pictures greater than default value, the S
When difference between the corresponding coordinate length of vegetarian refreshments is less than the pre-determined distance, the global characteristic point of selection is determined as effectively
Point;
When the S and the T are all larger than the default value, determine the corresponding coordinate length of the S specified pixel point with
The sum of the corresponding coordinate length of the T specified pixel point, if the distance to a declared goal and the coordinate length and between difference
Value is less than the pre-determined distance, then the global characteristic point of selection is determined as available point.
8. the method as described in claim 1, which is characterized in that the L effective sections based in the gray level image,
The license plate is positioned from the shooting image, comprising:
The L effectively sections are scanned one by one according to sequence from top to bottom;
If the overlap length of the effective section of each adjacent two is greater than preset length, retains the effective section scanned and continue to execute and sweep
Operation is retouched, when scanning to two neighboring effective section of overlap length is less than the preset length, stops scan operation;
Based on all effective sections retained, left margin, right margin, coboundary and the lower boundary of the license plate are determined, and according to
Identified left margin, right margin, coboundary and lower boundary position the license plate from the shooting image.
9. method according to claim 8, which is characterized in that it is described based on all effective sections retained, determine the vehicle
Left margin, right margin, coboundary and the lower boundary of board, comprising:
It is averaging after the coordinate of all effective sections retained of starting available point is added, obtains average origin coordinates, and
It is averaging after the coordinate of all effective sections retained of terminal available point is added, obtains mean end-point coordinate, and will be described
Vertical line where average origin coordinates is determined as the left margin of the license plate, and by the vertical line where the mean end-point coordinate
It is determined as the right margin of the license plate;
By preliminary scan in all effective sections retained to effective section where one-row pixels point position be determined as it is described
The coboundary of license plate, and by the position of the one-row pixels point where the effective section finally scanned in all effective sections retained
Set the lower boundary for being determined as the license plate.
10. the method as described in claim 1, which is characterized in that the K row pixel for including based on the gray level image
Gray value determines L in the gray level image effectively before sections, further includes:
It will be averaging after the corresponding addition of the gray value for belonging to the pixel of same row in every adjacent M row pixel, by every phase
Adjacent M row pixel merges into one-row pixels point, and the M is less than the total line number and energy of pixel included by the shooting image
Divided exactly by total line number.
11. a kind of license plate positioning device, which is characterized in that described device includes:
Image processing module obtains gray level image, institute for obtaining shooting image and carrying out gray proces to the shooting image
Stating in shooting image includes license plate to be positioned;
Effective section determining module, the gray value of the K row pixel for including based on the gray level image determine the grayscale image
L effective sections as in, the L effectively sections are used to indicate license plate position that may be present described in the shooting image,
The K and L is positive integer, and the L is less than or equal to the K;
Locating module, for positioning the vehicle from the shooting image based on the L effective sections in the gray level image
Board.
12. device as claimed in claim 11, which is characterized in that the effective section of determining module include:
Marking unit marks the office in the gray level image for the gray value based on each pixel in the K row pixel
Portion's characteristic point, the local feature region include peak dot or valley point;
Filter element obtains global characteristic point for being filtered to the local feature region marked;
Determination unit, for based on the global characteristic point obtained after filtering, determining that the L in the gray level image is a effectively
Section.
13. device as claimed in claim 12, which is characterized in that the marking unit is used for:
For target pixel points, determines and belong to same a line and the front and back adjacent with the target pixel points with the target pixel points
The gray value of two pixels, the target pixel points be the K row pixel include any row pixel in addition to first
Any pixel point a and except the last one;
If the gray value of the target pixel points is respectively less than the gray value of former and later two pixels, by the object pixel
Point is labeled as valley point;If the gray value of the target pixel points is all larger than the gray value of former and later two pixels, by institute
Target pixel points are stated labeled as peak dot.
14. device as claimed in claim 12, which is characterized in that the filter element is used for:
A local feature region is selected from the local feature region marked, and following processing is executed to the local feature region of selection,
Until having handled all local feature regions in the local feature region marked:
It determines and belongs to same a line and the latter local feature adjacent with the local feature region of selection with the local feature region of selection
The gray value of point;
Determine gray value between the gray value of the local feature region of selection and the gray value of the latter local feature region it
Difference;
It is when the difference of identified gray value is less than default gray scale difference, the local feature region of selection and described the latter part is special
Sign point filters out.
15. the device as described in claim 11-13 is any, which is characterized in that the determination unit is used for:
Obtain the coordinate of each global characteristic point obtained after filtering;
Based on acquired coordinate, the available point in the global characteristic point obtained after filtering is determined, the available point, which refers to, to be belonged to
The point of effective section;
The line segment that the starting available point belonged in same a line available point and terminal available point connect into is determined as effective section, with
To the L effective sections.
16. device as claimed in claim 15, which is characterized in that the determination unit is used for:
A global characteristic point is selected from the global characteristic point obtained after filtering, and following place is executed to the global characteristic point of selection
Reason, until all global characteristic points in the global characteristic point obtained after having handled filtering:
The coordinate of global characteristic point based on selection, and with the global characteristic point of selection belong to same a line and with the overall situation of selection
The coordinate of former and later two adjacent global characteristic points of characteristic point determines that distance to a declared goal, the distance to a declared goal refer to the overall situation of selection
The sum of the distance between characteristic point and former and later two adjacent global characteristic points;
When the distance to a declared goal is less than pre-determined distance, determine that selected global characteristic point is available point.
17. device as claimed in claim 16, which is characterized in that the determination unit is also used to:
When the distance to a declared goal is greater than the pre-determined distance and is less than N times of the pre-determined distance, determines be located at selection respectively
Global characteristic point and former and later two described global characteristic points between specified pixel point quantity S and T, the specified pixel point
The pixel in same default tonal range is in for the gray value of gray value and the global characteristic point of selection;
When the S is not more than the default value, and the distance to a declared goal and the S specified pictures greater than default value, the T
When difference between the corresponding coordinate length of vegetarian refreshments is less than the pre-determined distance, the global characteristic point of selection is determined as effectively
Point;
When the T is not more than the default value, and the distance to a declared goal and the T specified pictures greater than default value, the S
When difference between the corresponding coordinate length of vegetarian refreshments is less than the pre-determined distance, the global characteristic point of selection is determined as effectively
Point;
When the S and the T are all larger than the default value, determine the corresponding coordinate length of the S specified pixel point with
The sum of the corresponding coordinate length of the T specified pixel point, if the distance to a declared goal and the coordinate length and between difference
Value is less than the pre-determined distance, then the global characteristic point of selection is determined as available point.
18. device as claimed in claim 11, which is characterized in that the locating module includes:
Scanning element, for being scanned one by one according to sequence from top to bottom to the L effectively sections;
If the overlap length of the effective section of each adjacent two is greater than preset length, retains the effective section scanned and continue to execute and sweep
Operation is retouched, when scanning to two neighboring effective section of overlap length is less than the preset length, stops scan operation;
Positioning unit, for based on all effective sections retained, determine the left margin of the license plate, right margin, coboundary and
Lower boundary, and according to identified left margin, right margin, coboundary and lower boundary, the vehicle is positioned from the shooting image
Board.
19. device as claimed in claim 18, which is characterized in that the positioning unit is used for:
It is averaging after the coordinate of all effective sections retained of starting available point is added, obtains average origin coordinates, and
It is averaging after the coordinate of all effective sections retained of terminal available point is added, obtains mean end-point coordinate, and will be described
Vertical line where average origin coordinates is determined as the left margin of the license plate, and by the vertical line where the mean end-point coordinate
It is determined as the right margin of the license plate;
By preliminary scan in all effective sections retained to effective section where one-row pixels point position be determined as it is described
The coboundary of license plate, and by the position of the one-row pixels point where the effective section finally scanned in all effective sections retained
Set the lower boundary for being determined as the license plate.
20. device as claimed in claim 11, which is characterized in that described device further include:
Merging module, for will be asked after the corresponding addition of the gray value for belonging to the pixel of same row in every adjacent M row pixel
It is average, every adjacent M row pixel is merged into one-row pixels point, the M is less than pixel included by the shooting image
Point total line number and can be divided exactly by total line number.
21. a kind of computer readable storage medium, instruction is stored on the computer readable storage medium, which is characterized in that
The step of any one method described in claim 1-10 is realized when described instruction is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810502241.4A CN110533019B (en) | 2018-05-23 | 2018-05-23 | License plate positioning method and device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810502241.4A CN110533019B (en) | 2018-05-23 | 2018-05-23 | License plate positioning method and device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110533019A true CN110533019A (en) | 2019-12-03 |
CN110533019B CN110533019B (en) | 2022-08-12 |
Family
ID=68656543
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810502241.4A Active CN110533019B (en) | 2018-05-23 | 2018-05-23 | License plate positioning method and device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110533019B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111723863A (en) * | 2020-06-19 | 2020-09-29 | 中国农业科学院农业信息研究所 | Fruit tree flower identification and position acquisition method and device, computer equipment and storage medium |
CN113129305A (en) * | 2021-05-18 | 2021-07-16 | 浙江大华技术股份有限公司 | Method and device for determining state of silk ingot, storage medium and electronic device |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4817166A (en) * | 1986-05-05 | 1989-03-28 | Perceptics Corporation | Apparatus for reading a license plate |
US5081685A (en) * | 1988-11-29 | 1992-01-14 | Westinghouse Electric Corp. | Apparatus and method for reading a license plate |
CN101877126A (en) * | 2009-11-19 | 2010-11-03 | 东软集团股份有限公司 | Method and device for splitting license plate candidate area |
CN102375982A (en) * | 2011-10-18 | 2012-03-14 | 华中科技大学 | Multi-character characteristic fused license plate positioning method |
CN102693431A (en) * | 2012-05-31 | 2012-09-26 | 信帧电子技术(北京)有限公司 | Method and device for identifying type of white number plate |
CN103455815A (en) * | 2013-08-27 | 2013-12-18 | 电子科技大学 | Self-adaptive license plate character segmentation method in complex scene |
CN103488978A (en) * | 2013-09-26 | 2014-01-01 | 浙江工业大学 | License plate location method based on gray level jump and character projection interval mode |
CN103870803A (en) * | 2013-10-21 | 2014-06-18 | 北京邮电大学 | Vehicle license plate recognition method and system based on coarse positioning and fine positioning fusion |
US20140307924A1 (en) * | 2013-04-15 | 2014-10-16 | Xerox Corporation | Methods and systems for character segmentation in automated license plate recognition applications |
CN106709530A (en) * | 2017-01-17 | 2017-05-24 | 中国科学院上海高等研究院 | License plate recognition method based on video |
CN106886777A (en) * | 2017-04-11 | 2017-06-23 | 深圳怡化电脑股份有限公司 | A kind of character boundary determines method and device |
CN107679534A (en) * | 2017-10-11 | 2018-02-09 | 郑州云海信息技术有限公司 | A kind of license plate locating method and device |
WO2018028306A1 (en) * | 2016-08-11 | 2018-02-15 | 杭州海康威视数字技术股份有限公司 | Method and device for recognizing license plate number |
-
2018
- 2018-05-23 CN CN201810502241.4A patent/CN110533019B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4817166A (en) * | 1986-05-05 | 1989-03-28 | Perceptics Corporation | Apparatus for reading a license plate |
US5081685A (en) * | 1988-11-29 | 1992-01-14 | Westinghouse Electric Corp. | Apparatus and method for reading a license plate |
CN101877126A (en) * | 2009-11-19 | 2010-11-03 | 东软集团股份有限公司 | Method and device for splitting license plate candidate area |
CN102375982A (en) * | 2011-10-18 | 2012-03-14 | 华中科技大学 | Multi-character characteristic fused license plate positioning method |
CN102693431A (en) * | 2012-05-31 | 2012-09-26 | 信帧电子技术(北京)有限公司 | Method and device for identifying type of white number plate |
US20140307924A1 (en) * | 2013-04-15 | 2014-10-16 | Xerox Corporation | Methods and systems for character segmentation in automated license plate recognition applications |
CN103455815A (en) * | 2013-08-27 | 2013-12-18 | 电子科技大学 | Self-adaptive license plate character segmentation method in complex scene |
CN103488978A (en) * | 2013-09-26 | 2014-01-01 | 浙江工业大学 | License plate location method based on gray level jump and character projection interval mode |
CN103870803A (en) * | 2013-10-21 | 2014-06-18 | 北京邮电大学 | Vehicle license plate recognition method and system based on coarse positioning and fine positioning fusion |
WO2018028306A1 (en) * | 2016-08-11 | 2018-02-15 | 杭州海康威视数字技术股份有限公司 | Method and device for recognizing license plate number |
CN107729899A (en) * | 2016-08-11 | 2018-02-23 | 杭州海康威视数字技术股份有限公司 | A kind of number-plate number recognition methods and device |
CN106709530A (en) * | 2017-01-17 | 2017-05-24 | 中国科学院上海高等研究院 | License plate recognition method based on video |
CN106886777A (en) * | 2017-04-11 | 2017-06-23 | 深圳怡化电脑股份有限公司 | A kind of character boundary determines method and device |
CN107679534A (en) * | 2017-10-11 | 2018-02-09 | 郑州云海信息技术有限公司 | A kind of license plate locating method and device |
Non-Patent Citations (4)
Title |
---|
OHNMAR KHIN ET AL.: "《License Plate Detection of Myanmar Vehicle Images Captured from the Dissimilar Environmental Conditions》", 《2017 INTERNATIONAL CONFERENCE ON ADVANCED COMPUTING AND APPLICATIONS (ACOMP)》 * |
范静涛 等: "《沉浸式投影系统设计技术》", 30 June 2015, 北京:国防工业出版社 * |
葛二壮 等: "《基于灰度分布和字符紧密性特征的车牌定位方法》", 《微电子学与计算机》 * |
费继友: "《基于字符特征约束的自适应车牌校正提取》", 《仪器仪表学报》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111723863A (en) * | 2020-06-19 | 2020-09-29 | 中国农业科学院农业信息研究所 | Fruit tree flower identification and position acquisition method and device, computer equipment and storage medium |
CN111723863B (en) * | 2020-06-19 | 2023-06-02 | 中国农业科学院农业信息研究所 | Fruit tree flower identification and position acquisition method and device, computer equipment and storage medium |
CN113129305A (en) * | 2021-05-18 | 2021-07-16 | 浙江大华技术股份有限公司 | Method and device for determining state of silk ingot, storage medium and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN110533019B (en) | 2022-08-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11410277B2 (en) | Method and device for blurring image background, storage medium and electronic apparatus | |
CN109829850B (en) | Image processing method, device, equipment and computer readable medium | |
CN111126182B (en) | Lane line detection method, lane line detection device, electronic device, and storage medium | |
CN109978936B (en) | Disparity map acquisition method and device, storage medium and equipment | |
US11488293B1 (en) | Method for processing images and electronic device | |
CN109829456A (en) | Image-recognizing method, device and terminal | |
CN107945163A (en) | Image enchancing method and device | |
CN108594997A (en) | Gesture framework construction method, apparatus, equipment and storage medium | |
CN110059685A (en) | Word area detection method, apparatus and storage medium | |
CN108305236A (en) | Image enhancement processing method and device | |
CN110097025A (en) | Detection method, device and the storage medium of lane line | |
CN113570052B (en) | Image processing method, device, electronic equipment and storage medium | |
CN110400304A (en) | Object detecting method, device, equipment and storage medium based on deep learning | |
CN109993115A (en) | Image processing method, device and wearable device | |
CN110490186B (en) | License plate recognition method and device and storage medium | |
CN108830186A (en) | Method for extracting content, device, equipment and the storage medium of text image | |
CN111104893B (en) | Target detection method, target detection device, computer equipment and storage medium | |
CN109360222A (en) | Image partition method, device and storage medium | |
CN109886208A (en) | Method, apparatus, computer equipment and the storage medium of object detection | |
CN110991457A (en) | Two-dimensional code processing method and device, electronic equipment and storage medium | |
CN110533019A (en) | License plate locating method, device and storage medium | |
CN108734662A (en) | The method and apparatus for showing icon | |
CN110503159A (en) | Character recognition method, device, equipment and medium | |
CN110414448A (en) | Image processing method, device, electronic equipment and storage medium | |
CN110163862A (en) | Image, semantic dividing method, device and computer equipment |
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 |