CN108960259A - A kind of license plate preprocess method based on HSV - Google Patents
A kind of license plate preprocess method based on HSV Download PDFInfo
- Publication number
- CN108960259A CN108960259A CN201810764379.1A CN201810764379A CN108960259A CN 108960259 A CN108960259 A CN 108960259A CN 201810764379 A CN201810764379 A CN 201810764379A CN 108960259 A CN108960259 A CN 108960259A
- Authority
- CN
- China
- Prior art keywords
- image
- hsv
- license plate
- binaryzation
- indicate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
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/56—Extraction of image or video features relating to colour
-
- 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/48—Extraction of image or video features by mapping characteristic values of the pattern into a parameter space, e.g. Hough transformation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/62—Text, e.g. of license plates, overlay texts or captions on TV images
- G06V20/625—License plates
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Character Input (AREA)
- Image Analysis (AREA)
Abstract
A kind of license plate preprocess method based on HSV, belongs to field of intelligent transportation technology.It will obtain license plate image from RGB color and be converted to hsv color space, obtain I by handling HSV triple channelHSV, by IHSVTone, saturation degree and brightness handle respectively, then by Hi,j、S* i,jAnd V* i,jTriple channel carries out channel fusion, and image is rotated back into RGB color from hsv color space, obtains new RGB image I, and new images successively carry out gray processing, 3*3 median filtering, OTSU binaryzation after carrying out horizontal tilt correction, obtain pretreated license plate.The license plate preprocess method based on HSV that the present invention is obtained by using above-mentioned technology, it can effectively weaken the influence to license plate such as illumination, noise, shade, stain, and obtained bianry image is easy to carry out subsequent processing.
Description
Technical field
The present invention relates to field of intelligent transportation technology, and in particular to a kind of license plate preprocess method based on HSV, it passes through
HSV triple channel is handled, to weaken the influence to license plate binary such as illumination, noise, shade, stain.
Background technique
With the continuous development of China's transportation network, safety problem is more highlighted.License plate is the mark of vehicle, but practical
In life, due to the influence of scene or human factor, this mark is usually not easy to be identified.In wisdom traffic project
In, often first license plate is pre-processed, then in the enterprising line character segmentation of license plate binary map, the character finally most split is known
Not.Therefore, the key that tractable bianry image is automatic license plate identification system is obtained.
Common license plate pretreatment includes the following steps: that image normalization, histogram equalization, gray scale stretching, image are flat
Sliding, Slant Rectify and binaryzation.Li Zhanming (license plate image Study on pretreatment [J] science and technology in license plate number identifying system with
Engineering, 2008,8 (8): 2081-2084.), Dong Lingjiao (license plate image Study on pretreatment [J] electromechanical engineering, 2009,26 (6):
107-109.) and Chen Ruozhu (image preprocessing research [J] the industrial instrument and automation equipment based on Car license recognition, 2015
(4): 40-43. the relevant technologies) are described.But general license plate pre-treatment step is for such as uneven illumination in practical application
Even, license plate the special circumstances such as is stained and does not have robustness.
Relatively general license plate pretreatment operation, increasingly complex pre-treatment step include: the even processing of uneven illumination, are stained and repair
It is multiple etc..Such as Zhao Kun (a kind of Henan improved Car license recognition preprocess method [J] science, 2010,28 (3): 000329-332.)
After proposing that the correction of illumination airspace combines homomorphic filtering, binarization operation is carried out using local threshold, obtains ideal binary map, still
This method is only realized to license plate local light according to too strong processing, for shade.For another example Ma Chaoyu (merges multistage lighting process
License plate image Binarization methods [J] computer application, 2013,33 (a02): 200-202.) based on the obtained license plate gray scale of weighting
Figure, is finally obtained most with local threshold method with top cap algorithm smooth background illumination with the smooth character illumination of Retinex algorithm
Whole license plate bianry image.Although this method can uniform illumination, its computation complexity is high.License plate shadow problem be illumination not
One subproblem of uniformity problem, Xu Yun wait (a kind of shade Binarization of License Plate Images, CN106650728A [P] quietly
.2017 it) is realized based on bright dark line of demarcation is found to containing regular shade using the red channel image of original license plate as grayscale image
The binaryzation of license plate image, but this method can not handle irregular shade.Bu Ke etc. (a kind of preprocess method of license plate image,
CN102509095A [P] .2012.) first obtain license plate boundary up and down, then find yin-yang line of demarcation (i.e. shadow region
With the bright dark line of demarcation of nonshaded area) license plate is divide into upper part and lower part, two-part gray threshold up and down is calculated separately, finally
Gray scale supplement is carried out to the pixel of top half.The license plate that this method requires positioning to obtain has specific side up and down
Boundary, and regular shade can only be handled.It is adjacent to being based at stain on the basis of the reparation of license plate stain refers to assurance license plate globality
Domain picture element interpolation is directly substituted with neighborhood territory pixel, and the computation complexity of such method is all very high.
In conclusion deficiency existing for current license plate pretreatment operation include: 1) general pre-treatment step it is simple, efficiency
Height, but the even license plate of uneven illumination can not be handled and be stained license plate;2) to the even license plate of uneven illumination, regular shade can only be handled by existing
With the too time-consuming problem of algorithm;3) it is stained the pretreatment for repairing that algorithm complexity is excessively high, can not temporarily identify applied to Real-time Vehicle License Plate
Link.
Summary of the invention
For the above-mentioned problems in the prior art, the purpose of the present invention is to provide a kind of license plate based on HSV is pre-
Processing method, it weakens illumination, noise, shade, stain etc. to the shadow of license plate binary by handling HSV triple channel
It rings, overcomes the deficiency in general license plate image preprocess method, obtain the bianry image for being easy to carry out subsequent processing.
A kind of license plate preprocess method based on HSV, it is characterised in that include the following steps:
Step 1: obtaining license plate image IRGB, wherein the height of image is h, and width w, unit is pixel;
Step 2: license plate image being converted into hsv color space from RGB color, obtains IHSV, by IHSVTone, full
H is remembered respectively with degree and brightness triple channeli,j, Si,jAnd Vi,j, wherein i, j respectively indicate the abscissa of image pixel, ordinate, and 1
≤ i≤h, 1≤j≤w;
Step 3: to the brightness V in step 2)i,j, the horizontal tilt angle α of image is determined with Hough straight-line detection method;
Step 4: to the saturation degree S in step 2)i,j, according to formula (1)~(4), with Sauvola local threshold binaryzation
Method realizes binaryzation, specific as follows: to acquire adaptive threshold T of each pixel (i, j) in its c*c contiguous range first
(i, j) then realizes binaryzation by formula (4), obtains S* i,j;
Wherein, c indicates neighborhood of pixels range, and m (i, j) indicates Si,jMean value in c*c neighborhood, σ (i, j) indicate Si,j?
Mean square deviation in c*c neighborhood, k1Indicate the weight factor of mean square deviation, R1Indicate that mean square deviation changes floating range;
Step 5: to the brightness V in step 2)i,j, according to formula (5)~(8), with Sauvola local threshold binaryzation side
Method realizes binaryzation, specific as follows: to acquire adaptive threshold T of each pixel (i, j) in its c*c contiguous range first*
(i, j) then realizes binaryzation by formula (8), obtains V* i,j;
Wherein, m*(i, j) indicates Vi,jMean value in c*c neighborhood, σ*(i, j) indicates Vi,jIt is square in c*c neighborhood
Difference, k2Indicate the weight factor of mean square deviation, R2Indicate that mean square deviation changes floating range;
Step 6: by Hi,j、S* i,jAnd V* i,jTriple channel carries out channel fusion, and image is rotated back into from hsv color space
RGB color obtains new RGB image I;
Step 7: to the RGB image I in step 6), image being subjected to horizontal tilt using the α being calculated in step 3)
Correction, obtains image M;
Step 8: the image M obtained to step 7) successively carries out gray processing, 3*3 median filtering, OTSU binaryzation, obtains
Pre-processed results G.
The invention has the advantages that the present invention can effectively weaken illumination, noise, shade, stain etc. by using above-mentioned technology
Influence to license plate, obtained bianry image are easy to carry out subsequent processing.
Detailed description of the invention
Fig. 1 is five license plate image discoloration effect pictures that the embodiment of the present invention is chosen;
Fig. 2 is process step 7 of the invention treated five license plate image discoloration effect pictures;
Fig. 3 is process step 8 of the invention treated five license plate images.
Specific embodiment
The specific embodiment party of the license plate preprocess method of the invention based on HSV is elaborated below with reference to embodiment
Formula.
As shown, the license plate preprocess method of the invention based on HSV, includes the following steps:
Step 1: obtaining license plate image IRGB, as shown in Figure 1, wherein the height of image is h, width w, unit is pixel;
Step 2: license plate image being converted into hsv color space from RGB color, obtains IHSV, by IHSVTone, full
H is remembered respectively with degree and brightness triple channeli,j, Si,jAnd Vi,j, wherein i, j respectively indicate the cross of image pixel, ordinate, and 1≤i
≤ h, 1≤j≤w;
Step 3: to the brightness V in step 2)i,j, the horizontal tilt angle α of image is determined with Hough straight-line detection method;
Step 4: to the saturation degree S in step 2)i,j, according to formula (1)~(4), with Sauvola local threshold binaryzation
Method realizes binaryzation, specific as follows: to acquire adaptive threshold T of each pixel (i, j) in its c*c contiguous range first
(i, j) then realizes binaryzation by formula (4), obtains S* i,j;
Wherein, c indicates neighborhood of pixels range, and m (i, j) indicates Si,jMean value in c*c neighborhood, σ (i, j) indicate Si,j?
Mean square deviation in c*c neighborhood, k1Indicate the weight factor of mean square deviation, R1Indicate that mean square deviation changes floating range;In this example, c
=15, k=0.5, R=128;
Step 5: to the brightness V in step 2)i,j, according to formula (5)~(8), with Sauvola local threshold binaryzation side
Method realizes binaryzation, specific as follows: to acquire adaptive threshold T of each pixel (i, j) in its c*c contiguous range first*
(i, j) then realizes binaryzation by formula (8), obtains V* i,j;
Wherein, m*(i, j) indicates Vi,jMean value in c*c neighborhood, σ*(i, j) indicates Vi,jIt is square in c*c neighborhood
Difference, k2Indicate the weight factor of mean square deviation, R2Indicate that mean square deviation changes floating range;In this example, k2=0.5, R2=128;
Step 6: by Hi,j、S* i,jAnd V* i,jTriple channel carries out channel fusion, and image is rotated back into from hsv color space
RGB color obtains new RGB image I;
Step 7: to the RGB image I in step 6, being rectified image progress horizontal tilt using the α being calculated in step 3
Just, image M is obtained, as shown in Figure 2;
Step 8: to the image M of step 7, successively carrying out gray processing, 3*3 median filtering, OTSU binaryzation, pre-processed
As a result G, as shown in Figure 3.
Content described in this specification embodiment is only enumerating to the way of realization of inventive concept, protection of the invention
Range should not be construed as being limited to the specific forms stated in the embodiments, and protection scope of the present invention is also and in this field skill
Art personnel conceive according to the present invention it is conceivable that equivalent technologies mean.
Claims (1)
1. a kind of license plate preprocess method based on HSV, it is characterised in that include the following steps:
Step 1: obtaining license plate image IRGB, wherein the height of image is h, and width w, unit is pixel;
Step 2: license plate image being converted into hsv color space from RGB color, obtains IHSV, by IHSVTone, saturation degree
H is remembered respectively with brightness triple channeli,j, Si,jAnd Vi,j, wherein i, j respectively indicate the abscissa of image pixel, ordinate, and 1≤i
≤ h, 1≤j≤w;
Step 3: to the brightness V in step 2)i,j, the horizontal tilt angle α of image is determined with Hough straight-line detection method;
Step 4: to the saturation degree S in step 2)i,j, according to formula (1)~(4), with Sauvola local threshold binarization method
Realize binaryzation, it is specific as follows: acquire first each pixel (i, j) in its c*c contiguous range adaptive threshold T (i,
J), binaryzation then is realized by formula (4), obtain S* i,j;
Wherein, c indicates neighborhood of pixels range, and m (i, j) indicates Si,jMean value in c*c neighborhood, σ (i, j) indicate Si,jIn c*c
Mean square deviation in neighborhood, k1Indicate the weight factor of mean square deviation, R1Indicate that mean square deviation changes floating range;
Step 5: to the brightness V in step 2)i,j, real with Sauvola local threshold binarization method according to formula (5)~(8)
Existing binaryzation, it is specific as follows: to acquire adaptive threshold T of each pixel (i, j) in its c*c contiguous range first*(i,
J), binaryzation then is realized by formula (8), obtain V* i,j;
Wherein, m*(i, j) indicates Vi,jMean value in c*c neighborhood, σ*(i, j) indicates Vi,jMean square deviation in c*c neighborhood, k2
Indicate the weight factor of mean square deviation, R2Indicate that mean square deviation changes floating range;
Step 6: by Hi,j、S* i,jAnd V* i,jTriple channel carries out channel fusion, and image is rotated back into RGB face from hsv color space
The colour space obtains new RGB image I;
Step 7: to the RGB image I in step 6), image is subjected to horizontal tilt correction using the α being calculated in step 3),
Obtain image M;
Step 8: the image M obtained to step 7) successively carries out gray processing, 3*3 median filtering, OTSU binaryzation, obtains pre- place
Manage result G.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810764379.1A CN108960259A (en) | 2018-07-12 | 2018-07-12 | A kind of license plate preprocess method based on HSV |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810764379.1A CN108960259A (en) | 2018-07-12 | 2018-07-12 | A kind of license plate preprocess method based on HSV |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108960259A true CN108960259A (en) | 2018-12-07 |
Family
ID=64483818
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810764379.1A Pending CN108960259A (en) | 2018-07-12 | 2018-07-12 | A kind of license plate preprocess method based on HSV |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108960259A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110060222A (en) * | 2019-04-29 | 2019-07-26 | 重庆金山医疗器械有限公司 | A kind of method for correcting image, device and endoscopic system |
CN110992387A (en) * | 2019-11-08 | 2020-04-10 | 浪潮电子信息产业股份有限公司 | Image processing method and device, electronic equipment and storage medium |
CN111582046A (en) * | 2020-04-15 | 2020-08-25 | 浙江大华技术股份有限公司 | License plate image processing method and device |
CN112489042A (en) * | 2020-12-21 | 2021-03-12 | 大连工业大学 | Metal product printing defect and surface damage detection method based on super-resolution reconstruction |
CN113538602A (en) * | 2021-08-09 | 2021-10-22 | 宁波华高信息科技有限公司 | Document image processing method and system based on HSV color space |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101334836A (en) * | 2008-07-30 | 2008-12-31 | 电子科技大学 | License plate positioning method incorporating color, size and texture characteristic |
CN102375982A (en) * | 2011-10-18 | 2012-03-14 | 华中科技大学 | Multi-character characteristic fused license plate positioning method |
US20160203379A1 (en) * | 2015-01-12 | 2016-07-14 | TigerIT Americas, LLC | Systems, methods and devices for the automated verification and quality control and assurance of vehicle identification plates |
CN106845480A (en) * | 2017-01-13 | 2017-06-13 | 河海大学 | A kind of method that car plate is recognized from picture |
-
2018
- 2018-07-12 CN CN201810764379.1A patent/CN108960259A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101334836A (en) * | 2008-07-30 | 2008-12-31 | 电子科技大学 | License plate positioning method incorporating color, size and texture characteristic |
CN102375982A (en) * | 2011-10-18 | 2012-03-14 | 华中科技大学 | Multi-character characteristic fused license plate positioning method |
US20160203379A1 (en) * | 2015-01-12 | 2016-07-14 | TigerIT Americas, LLC | Systems, methods and devices for the automated verification and quality control and assurance of vehicle identification plates |
CN106845480A (en) * | 2017-01-13 | 2017-06-13 | 河海大学 | A kind of method that car plate is recognized from picture |
Non-Patent Citations (2)
Title |
---|
张晶: "《多媒体信息与通信》", 31 December 2017, 西安电子科技大学出版社 * |
胡德文,陈芳林: "《生物特征识别技术与方法》", 31 August 2013, 国防工业出版社 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110060222A (en) * | 2019-04-29 | 2019-07-26 | 重庆金山医疗器械有限公司 | A kind of method for correcting image, device and endoscopic system |
CN110060222B (en) * | 2019-04-29 | 2022-05-06 | 重庆金山医疗技术研究院有限公司 | Image correction method and device and endoscope system |
CN110992387A (en) * | 2019-11-08 | 2020-04-10 | 浪潮电子信息产业股份有限公司 | Image processing method and device, electronic equipment and storage medium |
CN111582046A (en) * | 2020-04-15 | 2020-08-25 | 浙江大华技术股份有限公司 | License plate image processing method and device |
CN111582046B (en) * | 2020-04-15 | 2023-09-05 | 浙江大华技术股份有限公司 | License plate image processing method and device |
CN112489042A (en) * | 2020-12-21 | 2021-03-12 | 大连工业大学 | Metal product printing defect and surface damage detection method based on super-resolution reconstruction |
CN113538602A (en) * | 2021-08-09 | 2021-10-22 | 宁波华高信息科技有限公司 | Document image processing method and system based on HSV color space |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108960259A (en) | A kind of license plate preprocess method based on HSV | |
CN109886896B (en) | Blue license plate segmentation and correction method | |
US9811746B2 (en) | Method and system for detecting traffic lights | |
CN104715239B (en) | A kind of vehicle color identification method based on defogging processing and weight piecemeal | |
Shen et al. | Improving OCR performance with background image elimination | |
CN109145915A (en) | License plate rapid distortion antidote under a kind of complex scene | |
CN105374015A (en) | Binary method for low-quality document image based on local contract and estimation of stroke width | |
CN107767379B (en) | PCB label printing quality detection method | |
CN110309806B (en) | Gesture recognition system and method based on video image processing | |
CN104504722B (en) | Method for correcting image colors through gray points | |
CN106650728B (en) | A kind of shade Binarization of License Plate Images | |
Prabhakar et al. | A novel design for vehicle license plate detection and recognition | |
CN105447489B (en) | A kind of character of picture OCR identifying system and background adhesion noise cancellation method | |
CN111401364B (en) | License plate positioning algorithm based on combination of color features and template matching | |
CN105701487A (en) | Vehicle logo positioning method | |
CN108711160B (en) | Target segmentation method based on HSI (high speed input/output) enhanced model | |
CN108335294A (en) | The power distribution room abnormality image-recognizing method of complex condition | |
CN104112133A (en) | Face detection preprocessing method under complex illumination | |
CN111915509A (en) | Protection pressing plate state identification method based on image processing shadow removal optimization | |
CN108563976A (en) | Multidirectional vehicle color identification method based on vehicle window position | |
CN105654140B (en) | The positioning of rail tank car license number and recognition methods towards complex industrial environment | |
Lee et al. | Research on face detection under different lighting | |
CN105721738B (en) | A kind of chromoscan file and picture preprocess method | |
CN109657544B (en) | Face detection method and device | |
CN110930358A (en) | Solar panel image processing method based on self-adaptive algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181207 |
|
RJ01 | Rejection of invention patent application after publication |