CN105608455B - A kind of license plate sloped correcting method and device - Google Patents
A kind of license plate sloped correcting method and device Download PDFInfo
- Publication number
- CN105608455B CN105608455B CN201510968421.8A CN201510968421A CN105608455B CN 105608455 B CN105608455 B CN 105608455B CN 201510968421 A CN201510968421 A CN 201510968421A CN 105608455 B CN105608455 B CN 105608455B
- Authority
- CN
- China
- Prior art keywords
- license plate
- contour point
- candidate
- area image
- plate area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
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/20—Image preprocessing
- G06V10/24—Aligning, centring, orientation detection or correction of the image
- G06V10/242—Aligning, centring, orientation detection or correction of the image by image rotation, e.g. by 90 degrees
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
- Traffic Control Systems (AREA)
Abstract
The present invention provides a kind of license plate sloped correcting method and device, which comprises determines the license plate area image in the monitoring image of target vehicle;The up contour point and down contour point of license plate are searched in two parts up and down of license plate area image respectively;Linear fit is carried out to the up contour point and down contour point respectively, obtains the corresponding slope in license plate boundary and the variance in two parts up and down of the license plate area image;According to the corresponding slope in license plate boundary and variance in two parts up and down of two-part texture concentration degree and the license plate area image above and below the license plate area image, license plate sloped angle is determined;License plate sloped correction is carried out according to the license plate sloped angle.The effect of license plate sloped correction can be optimized using the embodiment of the present invention.
Description
Technical field
The present invention relates to technical field of image processing more particularly to a kind of license plate sloped correcting methods and device.
Background technique
With the swift and violent growth of China's vehicle population and traffic trip, the various problems related to traffic administration are also further
Highlight, traffic condition monitoring, vehicle position in real time, parking lot vehicle management, motor vehicle violation investigation the problems such as efficient solution
Increasingly by the attention of relevant department, intelligent transportation system (Intelligent Transportation System, abbreviation
ITS appearance) effectively alleviates traffic loading, ensure that traffic safety, improves conevying efficiency, becomes Current traffic
The Main way of management development.
Key technology one of of the license plate recognition technology as intelligent transportation system is supervised in expressway tol lcollection, urban road
The fields such as control, parking lot management, vehicle violation investigation are all widely used.License plate recognition technology mainly includes that image is located in advance
Several parts such as reason, License Plate, license plate sloped correction, Character segmentation, character recognition, wherein license plate sloped correction is subsequent words
Symbol effectively divides and the important foundation of identification, and the quality of slant correction will directly influence the whole discrimination of license plate.
Summary of the invention
The present invention provides a kind of license plate sloped correcting method and device, to optimize the effect of license plate sloped correction.
According to a first aspect of the embodiments of the present invention, a kind of license plate sloped correcting method is provided, comprising:
Determine the license plate area image in the monitoring image of target vehicle;
The up contour point and down contour point of license plate are searched in two parts up and down of license plate area image respectively;
Linear fit is carried out to the up contour point and down contour point respectively, obtains up and down the two of the license plate area image
The corresponding slope in license plate boundary and variance in part;
According to two-part texture concentration degree above and below the license plate area image and the license plate area image up and down
The corresponding slope in license plate boundary and variance in two parts, determine license plate sloped angle;
License plate sloped correction is carried out according to the license plate sloped angle.
According to a second aspect of the embodiments of the present invention, a kind of license plate sloped means for correcting is provided, comprising:
First determination unit, the license plate area image in monitoring image for determining target vehicle;
Search unit, for searching for the up contour point of license plate and following in two parts up and down of license plate area image respectively
Edge point;
Fitting unit obtains the license plate area for carrying out linear fit to the up contour point and down contour point respectively
The corresponding slope in license plate boundary and variance in two parts up and down of area image;
Second determination unit, for according to two-part texture concentration degree and the vehicle above and below the license plate area image
The corresponding slope in license plate boundary and variance in two parts up and down of board area image, determine license plate sloped angle;
Unit is corrected, for carrying out license plate sloped correction according to the license plate sloped angle.
Using the embodiment of the present invention, after the license plate area image in the monitoring image for determining target vehicle, pass through difference
The up contour point and down contour point that license plate is searched in two parts up and down of license plate area image, in turn, respectively to up contour point
Linear fit is carried out with down contour point, obtains the corresponding slope in license plate boundary and the side in two parts up and down of license plate area image
Difference, and according in two parts up and down of texture concentration degree two-part above and below license plate area image and the license plate area image
The corresponding slope in license plate boundary and variance, determine license plate sloped angle, license plate sloped school carried out according to the license plate sloped angle
Just, license plate sloped calibration result is optimized.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of license plate sloped correcting method provided in an embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of license plate sloped means for correcting provided in an embodiment of the present invention;
Fig. 3 is the structural schematic diagram of the license plate sloped means for correcting of another kind provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of the license plate sloped means for correcting of another kind provided in an embodiment of the present invention.
Specific embodiment
Technical solution in embodiment in order to enable those skilled in the art to better understand the present invention, and make of the invention real
The above objects, features, and advantages for applying example can be more obvious and easy to understand, with reference to the accompanying drawing to technical side in the embodiment of the present invention
Case is described in further detail.
Referring to Figure 1, Fig. 1 is a kind of flow diagram of license plate sloped correcting method provided in an embodiment of the present invention, such as
Shown in Fig. 1, which may include:
Step 101 determines license plate area image in the monitoring image of target vehicle.
In the embodiment of the present invention, the above method be can be applied in intelligent transportation system, for example, being applied to intelligent transportation system
Background server in system.For ease of description, following executing subject in the above way is to be described for server.
In the embodiment of the present invention, target vehicle is simultaneously not specific to a certain vehicle, but it is license plate sloped to may refer to any progress
The vehicle of correction, the embodiment of the present invention is subsequent no longer to be repeated.
It, can be in locating and monitoring image after the monitoring image of collection of server to target vehicle in the embodiment of the present invention
License plate area, to obtain license plate area image.Wherein, in the monitoring image of target vehicle positioning licence plate region specific reality
The related realization being now referred in existing license plate locating method (such as coarse positioning algorithm), the embodiment of the present invention do not repeat them here.
Step 102, the up contour point and down contour point for searching for license plate in two parts up and down of license plate area image respectively.
It, can be at two up and down of license plate area image after server determines license plate area image in the embodiment of the present invention
The up contour point and down contour point of search license plate in point, in order to determine the specific location of license plate.
As an alternative embodiment, in above-mentioned steps 102, respectively in two parts up and down of license plate area image
The up contour point and down contour point for searching for license plate, may comprise steps of:
11) license plate area image, is divided into two parts up and down;
12) top half image and lower half portion image, are from left to right scanned by column, and respectively that top half image is each
It is continuously each more than or equal to white pixel point and lower half portion image top in the white pixel point of preset quantity in column
Continuously it is determined as candidate up contour point more than or equal to the white pixel point in the white pixel point of preset quantity most on the lower in column
And candidate down contour point;
13), using the credible marginal point screening mode based on statistical information to candidate marginal and candidate down contour point
It is screened, to determine the up contour point and down contour point of license plate.
In this embodiment, server can be boundary with the 1/2 of picture altitude, and license plate area image is divided into up and down
Two parts, and the candidate marginal (may be the point at license plate edge) in two parts image up and down is searched for respectively, specifically search
Rope mode can be such that
A), for top half image: server can scan by column top half image from left to right, for each
Column, then individual element point can be scanned from top to bottom, to detect white pixel point, if finding continuous in a certain column
More than or equal to the white pixel point of preset quantity (preset quantity can be set according to concrete scene, be depicted below as N), then
This is continuously greater than or equal to white pixel point top in N number of white pixel point (the white picture of first i.e. from top to bottom
Vegetarian refreshments) it is determined as candidate up contour point, wherein and the transverse and longitudinal coordinate of i-th of candidate up contour point can be denoted as respectively
LocationUpX [i] and LocationUpY [i].
B, for lower half portion image: server can scan by column lower half portion image from left to right, for each
Column, then individual element point can be scanned from the bottom up, to detect white pixel point, if finding continuous in a certain column
More than or equal to N number of white pixel point, then this is continuously greater than or equal to white pixel point most on the lower in N number of white pixel point
(first white pixel point i.e. from the bottom up) is determined as candidate down contour point, wherein the transverse and longitudinal of i-th of candidate down contour point
Coordinate can be denoted as LocationDnX [i] and LocationDnY [i] respectively.
By above-mentioned processing, server can be searched from upper and lower two parts image respectively several candidate up contour points and
Candidate down contour point.
It in this embodiment, can be according to position after server search to candidate up contour point and candidate down contour point
Confidence breath, texture information etc. screen candidate marginal, such as use the credible marginal point screening mode based on statistical information
Candidate up contour point and candidate down contour point are screened, specific implementation may comprise steps of:
21) average value of the white pixel point number of candidate marginal and lower candidate marginal column, is calculated separately,
And the number of the white pixel of column point is less than to candidate up contour point and the candidate's down contour point deletion of average value;
It 22) is, 0 or license plate area figure by ordinate value in the candidate up contour point and candidate down contour point after primary screening
The candidate up contour point of image height degree and candidate down contour point are deleted;
23), respectively by the candidate up contour point and candidate down contour point after postsearch screening the difference of abscissa value it is exhausted
The candidate up contour point of pre-determined distance threshold value is less than to value and candidate down contour point is deleted;
24) ordinate value in the candidate up contour point after screening three times and candidate down contour point dullness is not met into, respectively
Property candidate up contour point and candidate down contour point delete.
By taking server screens candidate up contour point as an example (screening of candidate down contour point can similarly obtain it),
In the embodiment, after server search to candidate up contour point, the white picture of each candidate up contour point column can be calculated
The average value AverUp of vegetarian refreshments number:
Wherein, m is the sum of candidate up contour point, and HistUp [i] is white picture in i-th of candidate up contour point column
The number of vegetarian refreshments.
After AverUp is calculated in server, the number of the white pixel point of column can be less than to the time of the AverUp
Edge pixel point deletion is chosen, remaining candidate's up contour point is properly termed as the candidate up contour point after primary screening.
In this embodiment, it is contemplated that the ordinate that License Plate not may result in license plate candidate marginal entirely is 0
Or license plate area picture altitude (using the vertex of license plate area image as origin, license plate area image institute planar horizontal direction
It is axis of ordinates for axis of abscissas, vertical direction), these can generate larger interference to the determination of license plate sloped angle, thus,
Ordinate in candidate up contour point after primary screening can be the candidate top edge of 0 or license plate area picture altitude by server
Point deletion, remaining candidate's up contour point are properly termed as the candidate up contour point after postsearch screening.
For the candidate up contour point after postsearch screening, server can further calculate each candidate up contour point in level
The distance in direction, for example, the distance in the horizontal direction of i+1 candidate's up contour point and i-th of candidate up contour point are as follows:
LocationUpX[i+1]-LocationUpX[i].Server can be by level side in the candidate up contour point after postsearch screening
To distance be less than pre-determined distance threshold value candidate up contour point delete, it is remaining candidate up contour point be properly termed as screening three times
Candidate up contour point afterwards.
In this embodiment, it is contemplated that when license plate sloped, the ordinate of license plate candidate marginal should have certain
Monotonicity (such as monotonic increase or monotone decreasing), thus, server can not will be inconsistent in the candidate up contour point after screening three times
The candidate up contour point for closing monotonicity is deleted, and guarantees the monotonicity of remaining candidate up contour point ordinate.
As an example it is assumed that the candidate up contour point after screening three times includes 10 candidate up contour point (ordinates point altogether
Wei y1~y10), by sequence from left to right, this 10 candidate up contour points are from left to right, it is assumed that and y1 to y6 is incremented by successively,
Y8 to y10 is also incremented by successively, but y6 is greater than y7, and y6 is less than y8, then server can determine the 7th candidate up contour point not
Meet monotonicity, can be deleted.
By above-mentioned processing, the screening to candidate up contour point and candidate down contour point is may be implemented in server, and obtaining can
Believe down contour point (may be simply referred to as up contour point) and credible down contour point (may be simply referred to as down contour point).
As an alternative embodiment, in embodiments of the present invention, it is above-mentioned respectively in the upper and lower of license plate area image
It is searched in two parts before the up contour point and down contour point of license plate, can also include:
Interference is carried out to license plate area image by Binarization methods to handle.
In this embodiment, it is contemplated that the license plate area figure positioned in monitoring image by vehicle license location technique
There can be the information for much interfering license plate sloped angle determination as in, thus, in order to improve the accurate of license plate sloped angle determination
Degree, needs to carry out interference to license plate area image to handle, to reduce in license plate area image interference information to license plate sloped angle
The interference of the determination of degree.
It is handled as an alternative embodiment, carrying out interference to license plate area image by Binarization methods, it can
With the following steps are included:
31) gray value of each pixel in license plate area image, is obtained, and counts the intensity histogram of license plate area image
Figure;
32) the binaryzation threshold value of license plate area image, is determined according to the grey level histogram;
33) license plate area image, is mapped as hsv color space from RGB color, and is obtained in license plate area image
Coloration, saturation degree and the brightness of each pixel;
34), according to the coloration of pixel each in license plate area image, saturation degree, brightness, gray value, binaryzation thresholding threshold
Value and preset Chroma threshold, saturation degree threshold value, luminance threshold, determine the foreground pixel and background picture in license plate area image
Element;
35) pixel value of the foreground pixel in license plate area image, is set to 255, the pixel value of background pixel is set to 0,
To obtain the corresponding binary image of license plate area image;
36) expansion process, is carried out to binary image.
In this embodiment, after server gets license plate area image, on the one hand, can be to the license plate area image
Gray processing processing is carried out, obtains the gray value of each pixel in the license plate area image, and count the ash of the license plate area image
Degree histogram determines the binaryzation threshold value (Thres) of license plate area image according to the grey level histogram in turn, for example, clothes
Being engaged in device can be according to the two-value threshold value of Da-Jin algorithm (Ostu) calculating license plate area.
Optionally, in this embodiment, server is after determining the binaryzation threshold value of license plate area image, also
It can be arranged according to the gray value and the binaryzation threshold value of pixel each in license plate area image for each pixel
IForeGround flag bit, the iForeGround flag bit is for identifying a possibility that pixel is foreground pixel, for example, can
With setting when the value of the iForeGround flag bit of pixel is 1, show that the pixel may be foreground pixel point;Work as picture
When the value of the iForeGround flag bit of vegetarian refreshments is 0, show that the pixel can not be foreground pixel point.In turn, server can
By comparing the gray value and binaryzation threshold value of each pixel, gray value to be greater than to the pixel of the binaryzation threshold value
The mark position iForeGround 1 of point, on the contrary set 0.
On the other hand, server can be by license plate area image from RGB (Red, Green, Blue, RGB) color space
It is mapped as HSV (Hue, Saturation, Value, coloration, saturation degree, brightness) color space, and is obtained in license plate area image
Coloration, saturation degree and the luminance information of each pixel.
Based on above- mentioned information, server can carry out binaryzation to image using the binarization method based on multi-information fusion
Processing, can specifically include:
A), collecting certain amount (can set according to concrete scene, as thousands of, tens of thousands of) different colours, different scenes
License plate image counts blue license plate (referred to as blue board), yellow license plate (abbreviation yellow card) and white number plate (abbreviation person who is not a member of any political party) respectively
Coloration, saturation degree and luminance information, and blue board, yellow card, the Chroma threshold of person who is not a member of any political party, saturation degree threshold value are determined according to statistical result
And luminance threshold;
B), when license plate color is blue (the identification method present invention of license plate color is without limitation), then by license plate area
Coloration, saturation degree and brightness is respectively within the scope of the Chroma threshold of blue board, saturation degree threshold value and luminance threshold in image, and
The pixel that the value of iForeGround flag bit is 1 is determined as foreground pixel point, and the pixel value of the pixel is set to 255;
Otherwise, it determines the pixel is background pixel point, and the pixel value of the pixel is set to 0;
C), when license plate color is yellow, then by coloration, saturation degree and brightness in license plate area image respectively in yellow card
Within the scope of Chroma threshold, saturation degree threshold value and luminance threshold, and the pixel that the value of iForeGround flag bit is 1 is determined as
Foreground pixel point, and the pixel value of the pixel is set to 255;Otherwise, it determines the pixel is background pixel point, and by the picture
The pixel value of vegetarian refreshments is set to 0;
B), when license plate color is white, then by coloration, saturation degree and brightness in license plate area image respectively person who is not a member of any political party's
Within the scope of Chroma threshold, saturation degree threshold value and luminance threshold, and the pixel that the value of iForeGround flag bit is 1 is determined as
Foreground pixel point, and the pixel value of the pixel is set to 255;Otherwise, it determines the pixel is background pixel point, and by the picture
The pixel value of vegetarian refreshments is set to 0;
By above-mentioned processing, the corresponding binary image of available license plate area image.
It in this embodiment, can be to the two-value after server obtains the corresponding binary image of license plate area image
Change image and carry out expansion process, with the binary image after being expanded.
It should be appreciated that the above-mentioned specific implementation for carrying out binary conversion treatment to license plate area image is only that the present invention is implemented
A kind of example for the technical solution that example provides, and it is not limiting the scope of the present invention, it is based on the embodiment of the present invention, this
Field technical staff realizes that the modification carried out should belong in the case where not making the creative labor, to above-mentioned binary conversion treatment
Protection scope of the present invention.
Step 103 carries out linear fit to up contour point and down contour point respectively, obtains up and down the two of license plate area image
The corresponding slope in license plate boundary and variance in part.
It, can be respectively to top after the up contour point and down contour point of server search to license plate in the embodiment of the present invention
Edge point and down contour point carry out linear fit, obtain the corresponding slope in license plate boundary in two parts up and down of license plate area image
And variance;Wherein, the corresponding slope in license plate boundary in the top half of license plate area image and variance are quasi- by up contour point
The slope (slope of straight line, hereinafter referred to as first slope i.e. where license plate coboundary) and variance (hereinafter referred to as the of the straight line of conjunction
One variance), what the corresponding slope in license plate boundary and variance in the lower half portion of license plate area image were fitted by down contour point
The slope (i.e. the slope of straight line where license plate lower boundary, hereinafter referred to as the second slope) and variance (hereinafter referred to as second party of straight line
Difference).Wherein, first slope, the second slope, first variance, second variance can be denoted as respectively AngleUp, AngleDn,
VarianceUp、VarianceDn。
Step 104, according to texture concentration degree two-part above and below license plate area image and the license plate area image
The corresponding slope in license plate boundary and variance in upper and lower two parts, determine license plate sloped angle.
In the embodiment of the present invention, server can also be counted respectively after license plate area image to be divided into two parts up and down
License plate area image top half and lower half portion texture concentration degree, i.e. UpTexture and DownTexture are calculated, and is calculated
Under two-part texture concentration degree departure degree TextureScale:
TextureScale=DownTexture/UpTexture;
Wherein, (it can be set, be described below according to concrete scene when TextureScale is greater than the first departure degree threshold value
When for α), it is believed that the texture of lower half portion is richer;When TextureScale (can be according to tool less than the second departure degree threshold value
Body scene settings, are depicted below as β) when, it is believed that top half texture is richer;When TextureScale is at the section [β, α],
Think that two parts texture is suitable up and down.Wherein, α is greater than β.
It is worth noting that in embodiments of the present invention, server calculates the two-part texture of license plate area image or more
The operation of the departure degree of concentration degree and server are being searched between up contour point and the operation of down contour point simultaneously in license plate area
There is no inevitable sequential relationships, i.e., server, which can first carry out, calculates the two-part texture concentration degree of license plate area image or more
Departure degree operation, rear execute searching between up contour point and the operation of down contour point in license plate area, can also be anti-
It can be carried out parallel with the two, and it is not limited in the embodiment of the present invention.
In the embodiment of the present invention, server obtains the deviation journey of the two-part texture concentration degree of license plate area image or more
It spends, after the corresponding slope in license plate boundary in two parts up and down of license plate area image and variance, can be concentrated according to the texture
The corresponding slope in license plate boundary and variance in two parts up and down of the departure degree of degree and the license plate area image determine
License plate sloped angle may include:
If it is richer that there are textures in two parts above and below license plate area image, and the portion that the corresponding variance in license plate boundary is bigger
Point, then license plate sloped angle is determined according to the corresponding slope in license plate boundary in another part;
If it is richer that there are textures in two parts above and below license plate area image, but the portion that the corresponding variance in license plate boundary is small
Point, then it is corresponding according to the corresponding variance size in license plate boundary in another part and the license plate boundary in the another part
Angular dimension corresponding to slope determines license plate sloped angle;
If two parts texture is suitable up and down for license plate area image, corresponding according to the license plate boundary in the two parts
Angular dimension corresponding to slope determines license plate sloped angle.
As an alternative embodiment, above-mentioned implementation may include following several situations:
1, when departure degree is greater than the first departure degree threshold value, and second variance is greater than first variance, by first slope
Corresponding angle is determined as license plate sloped angle;
2, when departure degree is less than the second departure degree threshold value, and first variance is greater than second variance, by the second slope
Corresponding angle is determined as license plate sloped angle;Wherein, the first departure degree threshold value is greater than the second departure degree threshold value;
3, when departure degree is greater than the first departure degree threshold value, first variance is greater than second variance, and first variance is less than
It is if the corresponding angle of first slope is less than first angle threshold value, the corresponding angle of first slope is true when default variance threshold values
It is set to license plate sloped angle;It is if the corresponding angle of first slope is greater than or equal to first angle threshold value, the second slope is corresponding
Angle be determined as license plate sloped angle;
4, when departure degree is less than the second departure degree threshold value, second variance is greater than first variance, and second variance is less than
It is if the corresponding angle of the second slope is less than first angle threshold value, the corresponding angle of the second slope is true when default variance threshold values
It is set to license plate sloped angle;It is if the corresponding angle of the second slope is greater than or equal to first angle threshold value, first slope is corresponding
Angle be determined as license plate sloped angle;
5, when departure degree is greater than the first departure degree threshold value, first variance is greater than second variance, and first variance is greater than
Or when being equal to default variance threshold values, the corresponding angle of the second slope is determined as license plate sloped angle;
6, when departure degree is less than the second departure degree threshold value, second variance is greater than first variance, and second variance is greater than
Or when being equal to default variance threshold values, the corresponding angle of first slope is determined as license plate sloped angle;
7, when departure degree is greater than or equal to the second departure degree threshold value, less than or equal to the first departure degree threshold value, and
When the absolute value of the difference of the corresponding angle of first slope angle corresponding with the second slope is less than second angle threshold value, by first
The average value of the corresponding angle of slope angle corresponding with the second slope is determined as license plate sloped angle;
8, when departure degree is greater than or equal to the second departure degree threshold value, less than or equal to the first departure degree threshold value, and
When the absolute value of the difference of the corresponding angle of first slope angle corresponding with the second slope is greater than or equal to second angle threshold value,
If first variance is less than second variance, the corresponding angle of first slope is determined as license plate sloped angle;If first variance is big
In second variance, then the corresponding tilt angle of the second slope is determined as license plate sloped angle.
In this embodiment, when (top half or lower half portion) texture concentration degree a part of in upper and lower two parts is small
(i.e. another part texture concentration degree is richer), and the variance hour of the marginal point institute fitting a straight line of the part, by the part
The corresponding angle of slope of the straight line of marginal point fitting is determined as license plate sloped angle.For example, work as TextureScale > α and
When VarianceDn > VarianceUp, angle of the corresponding angle of first slope as slant correction is taken;Work as TextureScale
< β and when VarianceDn < VarianceUp, takes angle of the corresponding angle of the second slope as slant correction.
When certain texure concentration degree is small, and the marginal point institute fitting a straight line of the part variance it is big when, i.e.,
TextureScale>α and VarianceDn<VarianceUp or TextureScale<β and VarianceDn>
VarianceUp, server can further judge whether the variance of the marginal point institute fitting a straight line of the part is less than default variance
Threshold value (can be set, be depicted below as T) according to concrete scene;If being less than T, further judge that the marginal point of the part is intended
Whether the corresponding angle of slope for closing straight line is less than first angle threshold value (can set, such as 30 degree, 35 degree according to concrete scene
Deng below for 30 degree), if server can be by the slope pair of the marginal point institute fitting a straight line of the part less than 30 degree
The angle answered is as license plate sloped angle;Such as larger than or equal to 30 degree, then server can intend the marginal point of another part
The corresponding angle of slope of straight line is closed as tilt angle;If the variance of the marginal point institute fitting a straight line of the part is greater than T, take
Being engaged in device can be using the corresponding angle of slope of the marginal point of another part institute fitting a straight line as license plate sloped angle.
When upper and lower two parts texture concentration degree is suitable, i.e. at the section [β, α], server can calculate TextureScale
The absolute value of the difference of the corresponding angle of first slope and the corresponding angle of the second slope, and judge the difference absolute value whether
It (can be set according to concrete scene) less than second angle threshold value, if being less than, tiltedly by the corresponding angle of first slope and second
The mean value of the corresponding angle of rate is as license plate sloped angle;Otherwise, the small marginal point of the variance for the straight line being fitted is fitted
Straight line the corresponding angle of slope as license plate sloped angle.
Step 105 carries out license plate sloped correction according to the license plate sloped angle.
In the embodiment of the present invention, server, can be according to the license plate sloped angle pair after license plate sloped angle has been determined
The license plate of target vehicle carries out license plate sloped correction, and the specific implementation present invention is without limitation.
Through above description as can be seen that in technical solution provided in an embodiment of the present invention, target vehicle is being determined
After license plate area image in monitoring image, by the top for searching for license plate in two parts up and down of license plate area image respectively
Edge point and down contour point carry out linear fit to up contour point and down contour point respectively, obtain the upper of license plate area image in turn
The corresponding slope in license plate boundary and variance in lower two parts, and according to texture concentration degree two-part above and below license plate area image
And the corresponding slope in license plate boundary and variance in two parts up and down of the license plate area image, determine license plate sloped angle
Degree, license plate can be eliminated during the realization of license plate sloped correction by carrying out license plate sloped correction according to the license plate sloped angle
Interference of other textures of surrounding to license plate sloped angle calculation, and do not influenced by environment such as local overexposure, deficient exposures, enhance license plate
The robustness that tilt angle calculates, optimizes license plate sloped calibration result.
Fig. 2 is referred to, is a kind of structural schematic diagram of license plate sloped means for correcting provided in an embodiment of the present invention, wherein
The license plate sloped means for correcting can be applied to the intelligent transportation system in above method embodiment, hand over for example, being applied to intelligence
In the background server of way system, as shown in Fig. 2, the license plate sloped means for correcting may include:
First determination unit 210, the license plate area image in monitoring image for determining target vehicle;
Search unit 220, for respectively in two parts up and down of license plate area image search for license plate up contour point and
Down contour point;
Fitting unit 230 obtains the license plate for carrying out linear fit to the up contour point and down contour point respectively
The corresponding slope in license plate boundary and variance in two parts up and down of area image;
Second determination unit 240, for according to two-part texture concentration degree and institute above and below the license plate area image
The corresponding slope in license plate boundary and the variance in two parts up and down of license plate area image are stated, determines license plate sloped angle;
Unit 250 is corrected, for carrying out license plate sloped correction according to the license plate sloped angle.
It is the structural schematic diagram of the license plate sloped means for correcting of another kind provided in an embodiment of the present invention please also refer to Fig. 3,
On the basis of aforementioned embodiment illustrated in fig. 2, described device can also include: the embodiment
Binary conversion treatment unit 260 is handled for carrying out interference to the license plate area image by Binarization methods;
In an alternative embodiment, in license plate sloped means for correcting shown in Fig. 3, binary conversion treatment unit 260 be can wrap
It includes:
Subelement 261 is counted, for obtaining the gray value of each pixel in the license plate area image, and counts the vehicle
The grey level histogram of board area image;
Subelement 262 is determined, for determining the binaryzation thresholding of the license plate area image according to the grey level histogram
Threshold value;
Subelement 263 is obtained, for the license plate area image to be mapped as coloration saturation from RGB RGB color
Brightness hsv color space is spent, and obtains coloration, saturation degree and the brightness of each pixel in the license plate area image;
The determining subelement 262, be also used to according to the coloration, saturation degree of each pixel in the license plate area image,
Brightness, gray value, the binaryzation threshold value and preset Chroma threshold, saturation degree threshold value, luminance threshold, determine described in
Foreground pixel and background pixel in license plate area image;
Subelement 264, for the pixel value of the foreground pixel in the license plate area image to be set to 255, background are set
The pixel value of pixel is set to 0, to obtain the corresponding binary image of the license plate area image;
Subelement 265 is handled, for carrying out expansion process to the binary image.
It is the structural schematic diagram of the license plate sloped means for correcting of another kind provided in an embodiment of the present invention please also refer to Fig. 4,
On the basis of aforementioned embodiment illustrated in fig. 2, search unit 220 in described device may include: the embodiment
Subelement 221 is divided, for license plate area image to be divided into two parts up and down;
Subelement 222 is scanned, for from left to right scanning by column top half image and lower half portion image, and respectively will
The top half image respectively arrange in continuously more than or equal to top white pixel point in the white pixel point of preset quantity,
And the lower half portion image respectively arrange in continuously more than or equal to white picture most on the lower in the white pixel point of preset quantity
Vegetarian refreshments is determined as candidate up contour point and candidate down contour point;
Subelement 223 is screened, for using the credible marginal point screening mode based on statistical information to the candidate edge
Point and candidate down contour point are screened, to determine the up contour point and down contour point of license plate.
In an alternative embodiment, the screening subelement 223, can be specifically used for:
The average value of the white pixel point number of candidate marginal and lower candidate marginal column is calculated separately, and will
The number of the white pixel point of column is less than the candidate up contour point of average value and candidate down contour point is deleted;
By ordinate value is 0 in the candidate up contour point and candidate down contour point after primary screening or license plate area image is high
The candidate up contour point of degree and candidate down contour point are deleted;
Respectively by the absolute value of the difference of abscissa value in the candidate up contour point and candidate down contour point after postsearch screening
It is deleted less than the candidate up contour point of pre-determined distance threshold value and candidate down contour point;
Ordinate value in the candidate up contour point after screening three times and candidate down contour point monotonicity is not met into respectively
Candidate up contour point and candidate down contour point are deleted.
In an alternative embodiment, second determination unit 240, is specifically used for:
If it is richer that there are textures in two parts above and below license plate area image, and the portion that the corresponding variance in license plate boundary is bigger
Point, then license plate sloped angle is determined according to the corresponding slope in license plate boundary in another part;
If it is richer that there are textures in two parts above and below license plate area image, but the portion that the corresponding variance in license plate boundary is small
Point, then according to corresponding to the corresponding variance size on the license plate boundary in another part and the corresponding slope of the another part
Angular dimension, determine license plate sloped angle;
If two parts texture is suitable up and down for license plate area image, corresponding according to the license plate boundary in the two parts
Angle corresponding to slope determines license plate sloped angle.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
The purpose for needing to select some or all of the modules therein to realize the present invention program.Those of ordinary skill in the art are not paying
Out in the case where creative work, it can understand and implement.
As seen from the above-described embodiment, after the license plate area image in the monitoring image for determining target vehicle, pass through difference
The up contour point and down contour point that license plate is searched in two parts up and down of license plate area image, in turn, respectively to up contour point
Linear fit is carried out with down contour point, obtains the corresponding slope in license plate boundary and the side in two parts up and down of license plate area image
Difference, and according in two parts up and down of texture concentration degree two-part above and below license plate area image and the license plate area image
The corresponding slope in license plate boundary and variance, determine license plate sloped angle, license plate sloped school carried out according to the license plate sloped angle
Just, license plate sloped calibration result is optimized.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or
Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention
Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following
Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.
Claims (8)
1. a kind of license plate sloped correcting method characterized by comprising
Determine the license plate area image in the monitoring image of target vehicle;
The up contour point and down contour point of license plate are searched in two parts up and down of license plate area image respectively;
Linear fit is carried out to the up contour point and down contour point respectively, obtains two parts up and down of the license plate area image
In the corresponding slope in license plate boundary and variance;
According in two parts up and down of texture concentration degree two-part above and below license plate area image and the license plate area image
The corresponding slope in license plate boundary and variance, determine license plate sloped angle, wherein
If it is richer that there are textures in two parts above and below license plate area image, and the part that the corresponding variance in license plate boundary is bigger,
License plate sloped angle is then determined according to the corresponding slope in license plate boundary in another part;
If it is richer that there are textures in two parts above and below license plate area image, but the part that the corresponding variance in license plate boundary is small, then
According to the corresponding slope institute of the corresponding variance size in license plate boundary in another part and the license plate boundary in the another part
Corresponding angular dimension determines license plate sloped angle;
If two parts texture is suitable up and down for license plate area image, according to the corresponding slope in license plate boundary in the two parts
Corresponding angular dimension determines license plate sloped angle;
License plate sloped correction is carried out according to the license plate sloped angle.
2. the method according to claim 1, wherein described respectively in two parts up and down of license plate area image
It searches for before the up contour point and down contour point of license plate, further includes:
Interference is carried out to the license plate area image by Binarization methods to handle;
It is wherein, described interference is carried out to license plate area by Binarization methods to handle, comprising:
The gray value of each pixel in the license plate area image is obtained, and counts the intensity histogram of the license plate area image
Figure;
The binaryzation threshold value of the license plate area image is determined according to the grey level histogram;
The license plate area image is mapped as coloration saturation degree brightness hsv color space from RGB RGB color, and is obtained
Take coloration, saturation degree and the brightness of each pixel in the license plate area image;
According to the coloration, saturation degree of each pixel, brightness, gray value, the binaryzation thresholding threshold in the license plate area image
Value and preset Chroma threshold, saturation degree threshold value, luminance threshold, determine the foreground pixel and back in the license plate area image
Scene element;
The pixel value of foreground pixel in the license plate area image is set to 255, the pixel value of background pixel is set to 0, with
To the corresponding binary image of the license plate area image;
Expansion process is carried out to the binary image.
3. according to the method described in claim 2, it is characterized in that, described respectively in two parts up and down of license plate area image
Search for the up contour point and down contour point of license plate, comprising:
License plate area image is divided into two parts up and down;
Top half image and lower half portion image are from left to right scanned by column, and is respectively respectively arranged the top half image
It is continuous each more than or equal to top white pixel point in the white pixel point of preset quantity and the lower half portion image
Continuously it is determined as candidate up contour point more than or equal to the white pixel point in the white pixel point of preset quantity most on the lower in column
And candidate down contour point;
The candidate marginal and candidate down contour point are carried out using the credible marginal point screening mode based on statistical information
Screening, to determine the up contour point and down contour point of license plate.
4. according to the method described in claim 3, it is characterized in that, described using the credible marginal point screening based on statistical information
Mode screens the candidate up contour point and candidate down contour point, comprising:
Calculate separately the average value of the white pixel point number of candidate marginal and lower candidate marginal column, and by place
The number of the white pixel point of column is less than the candidate up contour point of average value and candidate down contour point is deleted;
It is 0 or license plate area picture altitude by ordinate value in the candidate up contour point and candidate down contour point after primary screening
Candidate up contour point and candidate down contour point are deleted;
The absolute value of the difference of abscissa value in the candidate up contour point and candidate down contour point after postsearch screening is less than respectively
The candidate up contour point of pre-determined distance threshold value and candidate down contour point are deleted;
Ordinate value in candidate up contour point after screening three times and candidate down contour point is not met to the candidate of monotonicity respectively
Up contour point and candidate down contour point are deleted.
5. a kind of license plate sloped means for correcting characterized by comprising
First determination unit, the license plate area image in monitoring image for determining target vehicle;
Search unit, for searching for the up contour point and lower edge of license plate in two parts up and down of license plate area image respectively
Point;
Fitting unit obtains the license plate area figure for carrying out linear fit to the up contour point and down contour point respectively
The corresponding slope in license plate boundary and variance in two parts up and down of picture;
Second determination unit, for according to texture concentration degree two-part above and below license plate area image and the license plate area figure
The corresponding slope in license plate boundary and variance in two parts up and down of picture, determine license plate sloped angle, wherein
If it is richer that there are textures in two parts above and below license plate area image, and the part that the corresponding variance in license plate boundary is bigger,
License plate sloped angle is then determined according to the corresponding slope in license plate boundary in another part;
If it is richer that there are textures in two parts above and below license plate area image, but the part that the corresponding variance in license plate boundary is small, then
According to the corresponding slope institute of the corresponding variance size in license plate boundary in another part and the license plate boundary in the another part
Corresponding angular dimension determines license plate sloped angle;
If two parts texture is suitable up and down for license plate area image, according to the corresponding slope in license plate boundary in the two parts
Corresponding angular dimension determines license plate sloped angle;
Unit is corrected, for carrying out license plate sloped correction according to the license plate sloped angle.
6. device according to claim 5, which is characterized in that described device further include:
Binary conversion treatment unit is handled for carrying out interference to the license plate area image by Binarization methods;
The binary conversion treatment unit, comprising:
Subelement is counted, for obtaining the gray value of each pixel in the license plate area image, and counts the license plate area
The grey level histogram of image;
Subelement is determined, for determining the binaryzation threshold value of the license plate area image according to the grey level histogram;
Subelement is obtained, for the license plate area image to be mapped as coloration saturation degree brightness from RGB RGB color
Hsv color space, and obtain coloration, saturation degree and the brightness of each pixel in the license plate area image;
The determining subelement is also used to according to the coloration, saturation degree of each pixel, brightness, ash in the license plate area image
Angle value, the binaryzation threshold value and preset Chroma threshold, saturation degree threshold value, luminance threshold, determine the license plate area
Foreground pixel and background pixel in area image;
Subelement, for the pixel value of the foreground pixel in the license plate area image to be set to 255, the picture of background pixel are set
Plain value is set to 0, to obtain the corresponding binary image of the license plate area image;
Subelement is handled, for carrying out expansion process to the binary image.
7. device according to claim 6, which is characterized in that described search unit, comprising:
Subelement is divided, for license plate area image to be divided into two parts up and down;
Scan subelement, for from left to right scanning by column top half image and lower half portion image, and respectively will be described on
Half portion partial image respectively arrange in continuously more than or equal to top white pixel point in the white pixel point of preset quantity, Yi Jisuo
State lower half portion image respectively arrange in continuously more than or equal to white pixel point most on the lower in the white pixel point of preset quantity, really
It is set to candidate up contour point and candidate down contour point;
Subelement is screened, for using the credible marginal point screening mode based on statistical information to the candidate marginal and time
Down contour point is selected to be screened, to determine the up contour point and down contour point of license plate.
8. device according to claim 7, which is characterized in that the screening subelement is specifically used for:
Calculate separately the average value of the white pixel point number of candidate marginal and lower candidate marginal column, and by place
The number of the white pixel point of column is less than the candidate up contour point of average value and candidate down contour point is deleted;
It is 0 or license plate area picture altitude by ordinate value in the candidate up contour point and candidate down contour point after primary screening
Candidate up contour point and candidate down contour point are deleted;
The absolute value of the difference of abscissa value in the candidate up contour point and candidate down contour point after postsearch screening is less than respectively
The candidate up contour point of pre-determined distance threshold value and candidate down contour point are deleted;
Ordinate value in candidate up contour point after screening three times and candidate down contour point is not met to the candidate of monotonicity respectively
Up contour point and candidate down contour point are deleted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510968421.8A CN105608455B (en) | 2015-12-18 | 2015-12-18 | A kind of license plate sloped correcting method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510968421.8A CN105608455B (en) | 2015-12-18 | 2015-12-18 | A kind of license plate sloped correcting method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105608455A CN105608455A (en) | 2016-05-25 |
CN105608455B true CN105608455B (en) | 2019-06-11 |
Family
ID=55988381
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510968421.8A Active CN105608455B (en) | 2015-12-18 | 2015-12-18 | A kind of license plate sloped correcting method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105608455B (en) |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106203433A (en) * | 2016-07-13 | 2016-12-07 | 西安电子科技大学 | In a kind of vehicle monitoring image, car plate position automatically extracts and the method for perspective correction |
CN106485248A (en) * | 2016-10-20 | 2017-03-08 | 江苏商贸职业学院 | A kind of slag-soil truck license plate sloped correcting method |
CN106504407B (en) * | 2016-11-01 | 2019-06-07 | 深圳怡化电脑股份有限公司 | A kind of method and device handling banknote image |
CN108241859B (en) * | 2016-12-26 | 2021-12-28 | 浙江宇视科技有限公司 | License plate correction method and device |
CN108805122A (en) * | 2017-05-03 | 2018-11-13 | 迅驰(北京)视讯科技有限公司 | Car plate horizontal tilt antidote, system and car license recognition equipment |
CN107680108B (en) | 2017-07-28 | 2019-06-21 | 平安科技(深圳)有限公司 | Inclination value-acquiring method, device, terminal and the storage medium of tilted image |
CN107506765B (en) * | 2017-10-13 | 2020-09-01 | 厦门大学 | License plate inclination correction method based on neural network |
CN108647678A (en) * | 2018-04-24 | 2018-10-12 | 山东华软金盾软件股份有限公司 | A kind of quick horizontal tilt car plate antidote in monitor video |
EP3874401A4 (en) * | 2018-12-29 | 2021-11-03 | Zhejiang Dahua Technology Co., Ltd. | Systems and methods for license plate recognition |
CN109948521B (en) * | 2019-03-18 | 2021-05-11 | 北京华宇信息技术有限公司 | Image deviation rectifying method and device, equipment and storage medium |
CN110213629B (en) * | 2019-06-27 | 2022-02-11 | 腾讯科技(深圳)有限公司 | Information implantation method, device, server and storage medium |
CN113139409B (en) * | 2020-01-20 | 2023-06-16 | 浙江宇视科技有限公司 | Vehicle identification method, device, equipment and storage medium |
CN113259598B (en) * | 2021-07-16 | 2023-01-31 | 深圳市赛菲姆科技有限公司 | Camera horizontal adjustment control method, system, terminal and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102496019A (en) * | 2011-12-08 | 2012-06-13 | 银江股份有限公司 | License plate character segmenting method |
CN103500327A (en) * | 2013-10-16 | 2014-01-08 | 武汉理工大学 | Vehicle type identification method of vehicles of same brand based on space position information |
CN104318233A (en) * | 2014-10-19 | 2015-01-28 | 温州大学 | Method for horizontal tilt correction of number plate image |
CN104809715A (en) * | 2014-01-23 | 2015-07-29 | 广州南沙资讯科技园有限公司博士后科研工作站 | Banknote image inclination correction and region extraction method |
-
2015
- 2015-12-18 CN CN201510968421.8A patent/CN105608455B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102496019A (en) * | 2011-12-08 | 2012-06-13 | 银江股份有限公司 | License plate character segmenting method |
CN103500327A (en) * | 2013-10-16 | 2014-01-08 | 武汉理工大学 | Vehicle type identification method of vehicles of same brand based on space position information |
CN104809715A (en) * | 2014-01-23 | 2015-07-29 | 广州南沙资讯科技园有限公司博士后科研工作站 | Banknote image inclination correction and region extraction method |
CN104318233A (en) * | 2014-10-19 | 2015-01-28 | 温州大学 | Method for horizontal tilt correction of number plate image |
Also Published As
Publication number | Publication date |
---|---|
CN105608455A (en) | 2016-05-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105608455B (en) | A kind of license plate sloped correcting method and device | |
CN105373794B (en) | A kind of licence plate recognition method | |
US10198657B2 (en) | All-weather thermal-image pedestrian detection method | |
CN103605953B (en) | Vehicle interest target detection method based on sliding window search | |
CN102364496B (en) | Method and system for identifying automobile license plates automatically based on image analysis | |
CN102999753B (en) | License plate locating method | |
CN104978567B (en) | Vehicle checking method based on scene classification | |
CN107301405A (en) | Method for traffic sign detection under natural scene | |
CN104050481B (en) | Multi-template infrared image real-time pedestrian detection method combining contour feature and gray level | |
CN108446707B (en) | Remote sensing image airplane detection method based on key point screening and DPM confirmation | |
CN111967313B (en) | Unmanned aerial vehicle image annotation method assisted by deep learning target detection algorithm | |
CN107392968B (en) | The image significance detection method of Fusion of Color comparison diagram and Color-spatial distribution figure | |
CN107506760A (en) | Traffic signals detection method and system based on GPS location and visual pattern processing | |
CN107705254B (en) | City environment assessment method based on street view | |
CN107301378A (en) | The pedestrian detection method and system of Multi-classifers integrated in image | |
CN106339657B (en) | Crop straw burning monitoring method based on monitor video, device | |
CN106529532A (en) | License plate identification system based on integral feature channels and gray projection | |
CN106951898B (en) | Vehicle candidate area recommendation method and system and electronic equipment | |
CN113052170B (en) | Small target license plate recognition method under unconstrained scene | |
CN115424217A (en) | AI vision-based intelligent vehicle identification method and device and electronic equipment | |
CN106570888A (en) | Target tracking method based on FAST (Features from Accelerated Segment Test) corner point and pyramid KLT (Kanade-Lucas-Tomasi) | |
CN109977941A (en) | Licence plate recognition method and device | |
CN107301421A (en) | The recognition methods of vehicle color and device | |
JP2004054751A (en) | Image processing system and image processing method | |
CN105184317A (en) | License plate character segmentation method based on SVM classification |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |