CN107480683A - A kind of image processing method and device - Google Patents

A kind of image processing method and device Download PDF

Info

Publication number
CN107480683A
CN107480683A CN201710736362.0A CN201710736362A CN107480683A CN 107480683 A CN107480683 A CN 107480683A CN 201710736362 A CN201710736362 A CN 201710736362A CN 107480683 A CN107480683 A CN 107480683A
Authority
CN
China
Prior art keywords
gray
pixel
image
character picture
connected region
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
Application number
CN201710736362.0A
Other languages
Chinese (zh)
Inventor
孙伟源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710736362.0A priority Critical patent/CN107480683A/en
Publication of CN107480683A publication Critical patent/CN107480683A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]

Abstract

The invention discloses a kind of image processing method and device, including:According to the gray value of pixel in the character picture of gray color, gray threshold is calculated;Binary conversion treatment is carried out to the character picture of gray color using the gray threshold calculated.From the embodiment of the present invention, gray threshold is calculated according to the gray value of pixel in character picture to carry out binary conversion treatment, and the gray threshold that not according to is fixed carries out binary conversion treatment, character is realized clearly to come out in binary image saliency, even if gray level image is of low quality, character is identified based on the binary image, can also identify the character in gray level image exactly.

Description

A kind of image processing method and device
Technical field
The present invention relates to data processing technique, espespecially a kind of image processing method and device.
Background technology
Automobile has been indispensable a kind of vehicles in people's daily life, with the rapidly increasing of user vehicle Adding, highway, urban road and parking lot are more and more, and control of traffic and road and parking lot management become more and more troublesome, Control to traffic and safety management requirement also increasingly improve, these all inevitable requirement have one it is more efficient, more convenient, simpler Way to manage manage traffic.Intelligent transportation system (Intelligent Traffic System, ITS) has become currently The Main way of traffic administration development, the vehicle license plate as the important means for realizing automatic traffic management identify (License Plate Recognition, LPR) technology just gives birth to therefrom, and its task is that automobile monitoring image is analyzed and handled, so The license plate number that automobile monitoring image includes is automatically identified afterwards, and carries out Relational database management.LPR systems can be extensive Applied to the various occasions for needing Car license recognition, such as electronic charging station, parking lot vehicle management.
The general electronic eyes or parking lot all in freeway toll station, city of collection of automobile monitoring image comes in and goes out Mouthful, due to the unstability of outdoor environment, influenceed by many factors, automobile monitoring image is in imaging process, picture quality It can decline, the process of this image quality decrease is referred to as the degeneration of image, and image degradation disturbs the extraction of license plate number, serious shadow The positioning and identification of license plate number are rung.
The content of the invention
In order to solve the above-mentioned technical problem, the invention provides a kind of image processing method, realize character is apparent Ground comes out in character picture saliency, improves the accuracy rate of character in identification character picture.
In order to reach the object of the invention, the invention provides a kind of image processing method, including:
According to the gray value of pixel in the character picture of gray color, gray threshold is calculated;
Binary conversion treatment is carried out to the character picture of gray color using the gray threshold calculated.
Further, after the progress binary conversion treatment, in addition to:
The parameter of connected region in the binary image obtained according to the binary conversion treatment, filter out parameter and meet to make a reservation for The connected region of condition.
Further, the parameter of the connected region includes one below or any a variety of combination:The connected region The number of middle pixel, the connected region minimum enclosed rectangle in the number of pixel, the minimum external square of the connected region The length and width of shape, angle of inclination in the horizontal direction.
Further, the predetermined condition includes:
S≥50、S/N≥20、L/W<5.0 and L<60;Or
S≥50、S/N≥20、L/W≥5.0、L<60 and 0 °≤angle≤5 °;Or
S≥50、S/N≥20、L/W≥5.0、L<60 and 85 °≤angle≤90 °;
Wherein, S represents the number of pixel in the minimum enclosed rectangle of the connected region, and N is represented in the connected region The number of pixel, L represent the length of the minimum enclosed rectangle of the connected region, and W represents the minimum external square of the connected region The width of shape, angle represent the angle of inclination of the minimum enclosed rectangle of the connected region in the horizontal direction.
Further, in the character picture according to gray color pixel gray value, calculate gray threshold before, also Including:
The character picture that the gray color is extracted in gray level image is handled using morphological images.
It is further, described that the character picture that the gray color is extracted in gray level image is handled using morphological images, Including:
Opening operation is carried out to the gray level image using the structural element pre-set;
The gray level image is subtracted into the image that opening operation obtains, obtains the character picture of the gray color.
Further, it is described handled using morphological images extract in gray level image the gray color character picture it Before, in addition to:
For each pixel in coloured image to be identified, the component of three primary colours of the pixel is updated to following In formula:
Y=R × 0.2989+G × 0.5870+B × 0.1141,
Wherein, R, G and B represent the component of three primary colours of the pixel respectively, and Y represents the brightness value of the pixel;
The brightness value that the gray value of the pixel is arranged to calculate, coloured image to be identified is converted into described Gray level image.
Further, in the character picture according to gray color pixel gray value, calculate gray threshold, including:
Compare the gray value of pixel and the step-length k pre-set in the character picture of the gray color, by the gray color Character picture in gray value be more than or equal to the step-length k pixel pre-set and be divided into first kind pixel, by the gray color Character picture in pixel of the gray value less than step-length k be divided into the second class pixel, calculate the gray value and second of first kind pixel Variance between the gray value of class pixel;
Incremental steps k, return and perform described the step of comparing, until in the character picture that step-length k is more than the gray color Untill during the maximum gradation value of pixel, wherein k initial value is 0;
The variance that the gray threshold is arranged to calculate for the last time.
Further, the character picture of the gray color is license plate image, bill images or file and picture.
The invention provides a kind of image processing apparatus, including:
First computing module, for the gray value of pixel in the character picture according to gray color, calculate gray threshold;
First processing module, for being carried out using the gray threshold calculated to the character picture of gray color at binaryzation Reason.
The present invention comprises at least the gray value of pixel in the character picture according to gray color, calculates gray threshold;Utilize meter The gray threshold calculated carries out binary conversion treatment to the character picture of gray color.From the embodiment of the present invention, according to character figure The gray value of pixel calculates gray threshold to carry out binary conversion treatment as in, and the gray threshold that not according to is fixed carries out binaryzation Processing, realize character and clearly come out in binary image saliency, even if gray level image is of low quality, based on this two Value image recognition character, the character in gray level image can be also identified exactly.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by specification, rights Specifically noted structure is realized and obtained in claim and accompanying drawing.
Brief description of the drawings
Accompanying drawing is used for providing further understanding technical solution of the present invention, and a part for constitution instruction, with this The embodiment of application is used to explain technical scheme together, does not form the limitation to technical solution of the present invention.
Fig. 1 is a kind of schematic flow sheet of image processing method provided in an embodiment of the present invention;
Fig. 2 is the schematic flow sheet of another image processing method provided in an embodiment of the present invention;
Fig. 3 is a kind of structural representation of image processing apparatus provided in an embodiment of the present invention;
Fig. 4 is the structural representation of another image processing apparatus provided in an embodiment of the present invention.
Embodiment
For the object, technical solutions and advantages of the present invention are more clearly understood, below in conjunction with accompanying drawing to the present invention Embodiment be described in detail.It should be noted that in the case where not conflicting, in the embodiment and embodiment in the application Feature can mutually be combined.
Can be in the computer system of such as one group computer executable instructions the flow of accompanying drawing illustrates the step of Perform.Also, although logical order is shown in flow charts, in some cases, can be with suitable different from herein Sequence performs shown or described step.
The embodiment of the present invention provides a kind of image processing method, as shown in figure 1, this method includes:
Step 101, the gray value according to pixel in the character picture of gray color, calculate gray threshold.
Gray color just refers to pure white, black and a series of intermediate colors from black to white in both, in real life It is just definite that black-and-white photograph and black-and-white television should be referred to as gray scale pictures, gray scale TV.Any form and aspect are not included in gray color, i.e., not In the presence of color as red, yellow.
Because the character picture of gray color extracts from gray level image, therefore, the character picture of gray color is fallen within Gray level image.The gray value of each pixel on gray level image is different, and different degrees of grey is presented in pixel, and the scope of gray value is From 0 to 255, white is 255, and black 0, the gray value of gray level image is the build-in attribute of gray level image.
Step 102, the character picture progress binary conversion treatment using the gray threshold calculated to gray color.
Specifically, for each pixel in the character picture of gray color, judge whether the gray value of pixel is more than or waits In the gray threshold calculated, if so, the gray value for then setting the pixel is 255, if it is not, the gray value for then setting the pixel is 0.Image binaryzation is exactly that the gray value of pixel in the character picture by gray color is arranged to 0 or 255, obtains binary image, Binary image is exactly the image that the whole image that will be extracted shows obvious black and white effect, and binary image can highlight Go out the entirety and local feature of the character picture of gray color.Because the character picture of gray color is the image of character region, The feature highlighted is exactly the character in image, therefore, gray color can be more accurately identified according to the binary image Character picture character.
Further, on the basis of Fig. 1 corresponds to embodiment, after step 102, in addition to:
The parameter of connected region in the binary image obtained according to binary conversion treatment, filters out parameter and meets predetermined condition Connected region.
Specifically, all connected regions in binary image are obtained, that is to say, that get rid of non-interconnected region, at this The connected region that parameter meets predetermined condition is filtered out in all connected regions, the connected region where non-character is removed Fall, realize the denoising of binary image.Now the connected region filtered out is basically the region where character, character Clearly shown in the connected region filtered out, character can be identified exactly by carrying out positioning to character.
Illustrated below for connected region, for the pixel in an image, the pixel to communicate with each other forms one Individual region, and disconnected pixel forms different regions, the set of such a all pixel compositions that communicate with each other, claims For a connected region.
Further, the parameter of connected region includes one below or any a variety of combination:Pixel in connected region Number, connected region minimum enclosed rectangle in the number of pixel, connected region minimum enclosed rectangle length and width, in level Angle of inclination on direction.
Minimum enclosed rectangle (Minimum Bounding Rectangle, MBR), also there is referred to as minimum boundary rectangle, most It is small to include rectangle or minimum outsourcing rectangle.Some two-dimensional shapes that minimum enclosed rectangle refers to represent with two-dimensional coordinate (such as Point, straight line, polygon or irregular shape) maximum magnitude, i.e., with the maximum horizontal seat in given each summit of two-dimensional shapes Mark, minimum abscissa, maximum ordinate, minimum ordinate fix the rectangle on border.Minimum enclosed rectangle is minimum external frame The two dimensional form of (Minimum Bounding Box).Minimum enclosed rectangle is not necessarily parallel to horizontal direction, acceptable and water Square to there is certain angle.
Further, predetermined condition includes:
S≥50、S/N≥20、L/W<5.0 and L<60;Or
S≥50、S/N≥20、L/W≥5.0、L<60 and 0 °≤angle≤5 °;Or
S≥50、S/N≥20、L/W≥5.0、L<60 and 85 °≤angle≤90 °;
Wherein, S represent connected region minimum enclosed rectangle in pixel number, N represent connected region in pixel Number, L represent the length of the minimum enclosed rectangle of connected region, and W represents the width of the minimum enclosed rectangle of connected region, and angle is represented The angle of inclination of the minimum enclosed rectangle of connected region in the horizontal direction.
Further, on the basis of Fig. 1 corresponds to embodiment, before step 101, in addition to:
The character picture that gray color is extracted in gray level image is handled using morphological images.
Morphological images processing is in order to extract the character picture in gray level image, because gray level image is gray color in itself , therefore the character picture extracted in gray level image is also gray color.The character picture is one and eliminated to filtering not Sensitive region and the image for showing high-frequency region.For example, the image of a gray color, have in the images part vehicle body and Whole car plate, the image for extracting whole car plate region in the images, i.e. character picture are handled using morphological images. Gray level image can be done and once filtered before character picture is extracted in gray level image using morphological images processing, with Noise abatement is carried out to gray level image, the character picture effect of the gray color so extracted is more preferable.
Further, the character picture that gray color is extracted in gray level image is handled using morphological images, including:
Opening operation is carried out to gray level image using the structural element pre-set;Gray level image is subtracted what opening operation obtained Image, obtain the character picture of gray color.
Specifically, opening operation is carried out to gray level image by below equation:
A represents the image that opening operation obtains, and B represents the structural element pre-set, and I represents gray level image, and Θ represents profit Gray level image is corroded with the structural element pre-set,Expression expands to the image after corrosion.
Corrosion is a kind of elimination boundary point, and the process for making border internally shrink can be small and insignificant for eliminating Object.Expansion is that all background dots contacted with object are merged into the object, makes border to the process of outside expansion, can be with For filling up the cavity in object.First corrode the process expanded afterwards and be referred to as opening operation, the result of opening operation is to delete completely not It can include the subject area of structural element, the smooth profile of object, be disconnected narrow connection, eliminate tiny protuberance Point, and unobvious change its area.
Structural element is a concept in morphology, be for being expanded to image, one of etching operation it is basic Unit, corrosion is carried out to gray level image using structural element and represents to detect gray level image with the structural element, is found out The inside of gray level image can put down the region of the structural element.
Further, before handling the character picture that gray color is extracted in gray level image using morphological images, also wrap Include:
For each pixel in coloured image to be identified, the component of three primary colours of pixel is updated to below equation In:
Y=R × 0.2989+G × 0.5870+B × 0.1141,
Wherein, R, G and B represent the component of three primary colours of pixel respectively, and Y represents the brightness value of pixel;By the ash of pixel Angle value is arranged to the brightness value calculated, and coloured image to be identified is converted into gray level image.
After being shot to object to be identified, the image after shooting is coloured image, and coloured image has R (red), G (green) and three primary colours of B (indigo plant).If the coloured image is 24 RGBs, three primary colours respectively account for a byte, by by each The component of three primary colours of pixel is updated in above-mentioned formula, is converted into the relatively good gray level image of effect, be ensure that and is being carried out The character in coloured image can be more accurately identified after image procossing afterwards.R, G and B three coefficients 0.2989, 0.5870 and 0.1141 is the data obtained by lot of experiment validation, the effect of the gray level image obtained using these three coefficients Most preferably.
Further, on the basis of Fig. 1 corresponds to embodiment, step 101 includes:
Compare the gray value of pixel and the step-length k pre-set in the character picture of gray color, by the character figure of gray color Gray value is divided into first kind pixel more than or equal to the step-length k pre-set pixel as in, by the character picture of gray color Pixel of the gray value less than step-length k is divided into the second class pixel, calculates the gray value of first kind pixel and the gray scale of the second class pixel Variance between value;Incremental steps k, the step of execution is compared is returned to, until pixel in the character picture that step-length k is more than gray color Maximum gradation value when untill, wherein k initial value be 0;The variance that gray threshold is arranged to calculate for the last time.
Specifically, step-length k initial value is arranged to 0, compare in the character picture of gray color the gray value of pixel with it is pre- The step-length k first set, gray value in the character picture of gray color is more than or equal to the step-length k pixel pre-set and is divided into the A kind of pixel, pixel of the gray value in the character picture of gray color less than step-length k is divided into the second class pixel, calculates first kind picture The number W of element1, first kind pixel gray value average value M1, the second class pixel number W2, the second class pixel gray value Average value M2, by W1、M1、W2And M2It is updated in below equation, obtains the gray value and the second class pixel of first kind pixel Variance between gray value
Wherein, MrRepresent the average value of the gray value of all pixels in the character picture of gray color.
After having calculated variance, incremental steps k, such as k=k+1 is performed, return to the step of comparing more than performing, Zhi Daobu Long k be more than gray color character picture in pixel maximum gradation value when untill.Using the variance calculated for the last time as ash Threshold value is spent, binary conversion treatment is carried out to the character picture of gray color according to the gray threshold, binary image is obtained, ensure that two The best results of value image.The obtained binary image of scheme more than, character be readily apparent that in binary picture As highlighting, excellent basis has been laid for character is recognized accurately in binary image.
Further, the character picture of gray color is license plate image, bill images or file and picture.
Image processing method in the present invention can be used for character recognition in Car license recognition, bill (such as paper invoice), Character recognition in document.Particularly influenceed by each factor (for example, weather, light), the picture quality shot is not high In the case of, the accuracy rate for identifying character can be effectively improved using the present invention.
The image processing method that the embodiment of the present invention is provided, according to the gray value of pixel in the character picture of gray color, Calculate gray threshold;Binary conversion treatment is carried out to the character picture of gray color using the gray threshold calculated.It is real from the present invention Apply that example is visible, gray threshold is calculated to carry out binary conversion treatment according to the gray value of pixel in character picture, and not according to is fixed Gray threshold carry out binary conversion treatment, realize character and clearly come out in binary image saliency, even if gray-scale map Picture it is of low quality, based on the binary image identify character, can also identify the character in gray level image exactly.
The embodiment of the present invention provides another image processing method, as shown in Fig. 2 this method includes:
Step 201, input color image.
Step 202, color image into gray level image.
Specifically, for each pixel in coloured image, the component of three primary colours of pixel is updated to below equation In:
Y=R × 0.2989+G × 0.5870+B × 0.1141,
Wherein, R, G and B represent the component of three primary colours of pixel respectively, and Y represents the brightness value of pixel.
The brightness value that the gray value of pixel is arranged to calculate, to color image into gray level image.
Step 203, using morphological images handle character picture is extracted in gray level image.
Specifically, opening operation is carried out to gray level image using the structural element pre-set, the image that opening operation obtains is just It is the image that character region is removed in gray level image;Gray level image is subtracted into the image that opening operation obtains, obtains character figure The image of character region in picture, i.e. gray level image.
Step 204, the character picture to gray color carry out binary conversion treatment.
Specifically, the gray value of pixel and the step-length k pre-set in the character picture of gray color are compared, by gray color Gray value is divided into first kind pixel more than or equal to the step-length k pre-set pixel in character picture, by the character of gray color Pixel of the gray value less than step-length k is divided into the second class pixel in image, calculates the gray value and the second class pixel of first kind pixel Gray value between variance;Incremental steps k, the step of execution is compared is returned to, until step-length k is more than the character picture of gray color Untill during the maximum gradation value of middle pixel, wherein k initial value is 0;The side that gray threshold is arranged to calculate for the last time Difference.After gray threshold is set up, for each pixel in the character picture of gray color, judge whether the gray value of pixel is big In or equal to the gray threshold that calculates, if so, the gray value for then setting the pixel is 255, if it is not, then setting the ash of the pixel Angle value is 0.Image binaryzation is exactly that the gray value of pixel in the character picture by gray color is arranged to 0 or 255, obtains binaryzation Image.
Step 205, the binary image obtained to binary conversion treatment carry out denoising.
Specifically, all connected regions in binary image are obtained, filtering out parameter in all connected regions expires The connected region of sufficient predetermined condition, realize the denoising of binary image.
Predetermined condition includes:
S≥50、S/N≥20、L/W<5.0 and L<60;Or
S≥50、S/N≥20、L/W≥5.0、L<60 and 0 °≤angle≤5 °;Or
S≥50、S/N≥20、L/W≥5.0、L<60 and 85 °≤angle≤90 °;
Wherein, S represent connected region minimum enclosed rectangle in pixel number, N represent connected region in pixel Number, L represent the length of the minimum enclosed rectangle of connected region, and W represents the width of the minimum enclosed rectangle of connected region, and angle is represented The angle of inclination of the minimum enclosed rectangle of connected region in the horizontal direction.
Character in step 206, positioning binary image.
Step 207, output positioning result.
The embodiment of the present invention provides a kind of image processing apparatus, as shown in figure 3, the image processing apparatus 3 includes:
First computing module 31, for the gray value of pixel in the character picture according to gray color, calculate gray threshold.
First processing module 32, for being carried out using the gray threshold calculated to the character picture of gray color at binaryzation Reason.
Further, on the basis of Fig. 3 corresponds to embodiment, the present invention provides another image processing apparatus, such as Fig. 4 institutes Show, the image processing apparatus 3 also includes:
Screening module 33, for the parameter of connected region in the binary image that is obtained according to binary conversion treatment, filter out Parameter meets the connected region of predetermined condition.
Further, the parameter of connected region includes one below or any a variety of combination:Pixel in connected region Number, connected region minimum enclosed rectangle in the number of pixel, connected region minimum enclosed rectangle length and width, in level Angle of inclination on direction.
Further, predetermined condition includes:
S≥50、S/N≥20、L/W<5.0 and L<60;Or
S≥50、S/N≥20、L/W≥5.0、L<60 and 0 °≤angle≤5 °;Or
S≥50、S/N≥20、L/W≥5.0、L<60 and 85 °≤angle≤90 °;
Wherein, S represent connected region minimum enclosed rectangle in pixel number, N represent connected region in pixel Number, L represent the length of the minimum enclosed rectangle of connected region, and W represents the width of the minimum enclosed rectangle of connected region, and angle is represented The angle of inclination of the minimum enclosed rectangle of connected region in the horizontal direction.
Further, as shown in figure 4, image processing apparatus 3 also includes:
Second processing module 34, for extracting the character figure of gray color in gray level image using morphological images processing Picture.
Further, Second processing module 34 is specifically used for:
Opening operation is carried out to gray level image using the structural element pre-set;Gray level image is subtracted what opening operation obtained Image, obtain the character picture of gray color.
Further, as shown in figure 4, image processing apparatus 3 also includes:
Second computing module 35, for for each pixel in coloured image to be identified, by three primary colours of pixel Component be updated in below equation:
Y=R × 0.2989+G × 0.5870+B × 0.1141,
Wherein, R, G and B represent the component of three primary colours of pixel respectively, and Y represents the brightness value of pixel;
Setup module 36, for the brightness value for being arranged to calculate by the gray value of pixel, by cromogram to be identified As being converted into gray level image.
Further, as shown in figure 4, the first computing module 31 in image processing apparatus 3 includes:
Processing unit 311, the gray value of pixel and the step-length k pre-set in the character picture for comparing gray color, The pixel that gray value in the character picture of gray color is more than or equal to the step-length k pre-set is divided into first kind pixel, by ash Spend pixel of the gray value less than step-length k in the character picture of color and be divided into the second class pixel, calculate first kind pixel gray value and Variance between the gray value of second class pixel;Incremental steps k, the step of execution is compared is returned to, until step-length k is more than gray color Character picture in pixel maximum gradation value when untill, wherein k initial value be 0.
Setting unit 312, for the variance for being arranged to calculate for the last time by gray threshold.
Further, the character picture of gray color is license plate image, bill images or file and picture.
In actual applications, the first computing module 31, first processing module 32, screening module 33, Second processing module 34, Second computing module 35 and setup module 36 can be by the CPU in image processing apparatus 3, microprocessor (Micro Processor Unit, MPU), digital signal processor (Digital Signal Processor, DSP) or field programmable gate array (Field Programmable Gate Array, FPGA) etc. is realized.
The image processing apparatus that the embodiment of the present invention is provided, according to the gray value of pixel in the character picture of gray color, Calculate gray threshold;Binary conversion treatment is carried out to the character picture of gray color using the gray threshold calculated.It is real from the present invention Apply that example is visible, gray threshold is calculated to carry out binary conversion treatment according to the gray value of pixel in character picture, and not according to is fixed Gray threshold carry out binary conversion treatment, realize character and clearly come out in binary image saliency, even if gray-scale map Picture it is of low quality, based on the binary image identify character, can also identify the character in gray level image exactly.
The embodiment of the present invention provides another image processing apparatus, the image processing apparatus include memory, processor with The step realized and storage is on a memory and the computer program that can run on a processor, during computing device computer program Suddenly include:
According to the gray value of pixel in the character picture of gray color, gray threshold is calculated;
Binary conversion treatment is carried out to the character picture of gray color using the gray threshold calculated.
Further, the step of being realized during above-mentioned computing device computer program also includes:
The parameter of connected region in the binary image obtained according to the binary conversion treatment, filter out parameter and meet to make a reservation for The connected region of condition.
Further, the parameter of the connected region includes one below or any a variety of combination:The connected region The number of middle pixel, the connected region minimum enclosed rectangle in the number of pixel, the minimum external square of the connected region The length and width of shape, angle of inclination in the horizontal direction.
Further, the predetermined condition includes:
S≥50、S/N≥20、L/W<5.0 and L<60;Or
S≥50、S/N≥20、L/W≥5.0、L<60 and 0 °≤angle≤5 °;Or
S≥50、S/N≥20、L/W≥5.0、L<60 and 85 °≤angle≤90 °;
Wherein, S represents the number of pixel in the minimum enclosed rectangle of the connected region, and N is represented in the connected region The number of pixel, L represent the length of the minimum enclosed rectangle of the connected region, and W represents the minimum external square of the connected region The width of shape, angle represent the angle of inclination of the minimum enclosed rectangle of the connected region in the horizontal direction.
Further, the step of being realized during above-mentioned computing device computer program also includes:
The character picture that the gray color is extracted in gray level image is handled using morphological images.
Further, the step of being realized during above-mentioned computing device computer program specifically includes:
Opening operation is carried out to the gray level image using the structural element pre-set;
The gray level image is subtracted into the image that opening operation obtains, obtains the character picture of the gray color.
Further, the step of being realized during above-mentioned computing device computer program also includes:
For each pixel in coloured image to be identified, the component of three primary colours of the pixel is updated to following In formula:
Y=R × 0.2989+G × 0.5870+B × 0.1141,
Wherein, R, G and B represent the component of three primary colours of the pixel respectively, and Y represents the brightness value of the pixel;
The brightness value that the gray value of the pixel is arranged to calculate, coloured image to be identified is converted into described Gray level image.
Further, the step of being realized during above-mentioned computing device computer program specifically includes:
Compare the gray value of pixel and the step-length k pre-set in the character picture of the gray color, by the gray color Character picture in gray value be more than or equal to the step-length k pixel pre-set and be divided into first kind pixel, by the gray color Character picture in pixel of the gray value less than step-length k be divided into the second class pixel, calculate the gray value and second of first kind pixel Variance between the gray value of class pixel;
Incremental steps k, return and perform described the step of comparing, until in the character picture that step-length k is more than the gray color Untill during the maximum gradation value of pixel, wherein k initial value is 0;
The variance that the gray threshold is arranged to calculate for the last time.
Further, the character picture of the gray color is license plate image, bill images or file and picture.
Although disclosed herein embodiment as above, described content be only readily appreciate the present invention and use Embodiment, it is not limited to the present invention.Technical staff in any art of the present invention, taken off not departing from the present invention On the premise of the spirit and scope of dew, any modification and change, but the present invention can be carried out in the form and details of implementation Scope of patent protection, still should be subject to the scope of the claims as defined in the appended claims.

Claims (10)

  1. A kind of 1. image processing method, it is characterised in that including:
    According to the gray value of pixel in the character picture of gray color, gray threshold is calculated;
    Binary conversion treatment is carried out to the character picture of gray color using the gray threshold calculated.
  2. 2. image processing method according to claim 1, it is characterised in that after the progress binary conversion treatment, also wrap Include:
    The parameter of connected region in the binary image obtained according to the binary conversion treatment, filters out parameter and meets predetermined condition Connected region.
  3. 3. image processing method according to claim 2, it is characterised in that the parameter of the connected region include it is following it One or any a variety of combination:Pixel in the minimum enclosed rectangle of the number of pixel, the connected region in the connected region Number, the length and width of minimum enclosed rectangle of the connected region, angle of inclination in the horizontal direction.
  4. 4. image processing method according to claim 3, it is characterised in that the predetermined condition includes:
    S≥50、S/N≥20、L/W<5.0 and L<60;Or
    S≥50、S/N≥20、L/W≥5.0、L<60 and 0 °≤angle≤5 °;Or
    S≥50、S/N≥20、L/W≥5.0、L<60 and 85 °≤angle≤90 °;
    Wherein, S represents the number of pixel in the minimum enclosed rectangle of the connected region, and N represents pixel in the connected region Number, L represents the length of the minimum enclosed rectangle of the connected region, and W represents the minimum enclosed rectangle of the connected region Width, angle represent the angle of inclination of the minimum enclosed rectangle of the connected region in the horizontal direction.
  5. 5. image processing method according to claim 1, it is characterised in that in the character picture according to gray color The gray value of pixel, before calculating gray threshold, in addition to:
    The character picture that the gray color is extracted in gray level image is handled using morphological images.
  6. 6. image processing method according to claim 5, it is characterised in that described to be handled using morphological images in gray scale The character picture of the gray color is extracted in image, including:
    Opening operation is carried out to the gray level image using the structural element pre-set;
    The gray level image is subtracted into the image that opening operation obtains, obtains the character picture of the gray color.
  7. 7. image processing method according to claim 5, it is characterised in that described to be handled using morphological images in gray scale Before the character picture that the gray color is extracted in image, in addition to:
    For each pixel in coloured image to be identified, the component of three primary colours of the pixel is updated to below equation In:
    Y=R × 0.2989+G × 0.5870+B × 0.1141,
    Wherein, R, G and B represent the component of three primary colours of the pixel respectively, and Y represents the brightness value of the pixel;
    The brightness value that the gray value of the pixel is arranged to calculate, coloured image to be identified is converted into the gray scale Image.
  8. 8. according to the image processing method described in claim 1,2,5 or 7, it is characterised in that the character according to gray color The gray value of pixel in image, gray threshold is calculated, including:
    Compare the gray value of pixel and the step-length k pre-set in the character picture of the gray color, by the word of the gray color Gray value is divided into first kind pixel more than or equal to the step-length k pre-set pixel in symbol image, by the word of the gray color Pixel of the gray value less than step-length k is divided into the second class pixel in symbol image, calculates the gray value and the second class picture of first kind pixel Variance between the gray value of element;
    Incremental steps k, return and perform described the step of comparing, until pixel in the character picture that step-length k is more than the gray color Maximum gradation value when untill, wherein k initial value be 0;
    The variance that the gray threshold is arranged to calculate for the last time.
  9. 9. image processing method according to claim 1, it is characterised in that the character picture of the gray color is car plate figure Picture, bill images or file and picture.
  10. A kind of 10. image processing apparatus, it is characterised in that including:
    First computing module, for the gray value of pixel in the character picture according to gray color, calculate gray threshold;
    First processing module, for carrying out binary conversion treatment to the character picture of gray color using the gray threshold calculated.
CN201710736362.0A 2017-08-24 2017-08-24 A kind of image processing method and device Pending CN107480683A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710736362.0A CN107480683A (en) 2017-08-24 2017-08-24 A kind of image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710736362.0A CN107480683A (en) 2017-08-24 2017-08-24 A kind of image processing method and device

Publications (1)

Publication Number Publication Date
CN107480683A true CN107480683A (en) 2017-12-15

Family

ID=60601534

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710736362.0A Pending CN107480683A (en) 2017-08-24 2017-08-24 A kind of image processing method and device

Country Status (1)

Country Link
CN (1) CN107480683A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110089260A (en) * 2019-04-15 2019-08-06 江苏大学 A kind of the cereal flow monitoring method and monitoring system of the defeated grain of scraper-type
CN110648284A (en) * 2019-08-02 2020-01-03 中山市奥珀金属制品有限公司 Image processing method and device for uneven illumination
CN115984863A (en) * 2023-03-17 2023-04-18 中化现代农业有限公司 Image processing method, device, equipment and storage medium
CN111462035B (en) * 2020-01-21 2024-03-08 北京明略软件系统有限公司 Picture detection method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706875A (en) * 2009-11-17 2010-05-12 北京航空航天大学 Hand-held laser code-jetting character recognizer under complex background
CN103472858A (en) * 2013-09-17 2013-12-25 赖中安 High-precision full-automatic solar tracking controller
CN106203436A (en) * 2016-07-22 2016-12-07 北京小米移动软件有限公司 Image binaryzation method and device
CN106951811A (en) * 2017-03-20 2017-07-14 深圳市金立通信设备有限公司 A kind of image processing method and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706875A (en) * 2009-11-17 2010-05-12 北京航空航天大学 Hand-held laser code-jetting character recognizer under complex background
CN103472858A (en) * 2013-09-17 2013-12-25 赖中安 High-precision full-automatic solar tracking controller
CN106203436A (en) * 2016-07-22 2016-12-07 北京小米移动软件有限公司 Image binaryzation method and device
CN106951811A (en) * 2017-03-20 2017-07-14 深圳市金立通信设备有限公司 A kind of image processing method and terminal

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110089260A (en) * 2019-04-15 2019-08-06 江苏大学 A kind of the cereal flow monitoring method and monitoring system of the defeated grain of scraper-type
CN110648284A (en) * 2019-08-02 2020-01-03 中山市奥珀金属制品有限公司 Image processing method and device for uneven illumination
CN110648284B (en) * 2019-08-02 2023-01-24 张杰辉 Image processing method and device with uneven illumination
CN111462035B (en) * 2020-01-21 2024-03-08 北京明略软件系统有限公司 Picture detection method and device
CN115984863A (en) * 2023-03-17 2023-04-18 中化现代农业有限公司 Image processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US10429193B2 (en) Method and apparatus for generating high precision map
CN105678285B (en) A kind of adaptive road birds-eye view transform method and road track detection method
CN110969160B (en) License plate image correction and recognition method and system based on deep learning
CN103605977B (en) Extracting method of lane line and device thereof
CN109657632B (en) Lane line detection and identification method
CN107480683A (en) A kind of image processing method and device
CN104732227A (en) Rapid license-plate positioning method based on definition and luminance evaluation
CN106971185B (en) License plate positioning method and device based on full convolution network
CN108416784B (en) Method and device for rapidly extracting boundary of urban built-up area and terminal equipment
CN104537615A (en) Local Retinex enhancement algorithm based on HSV color spaces
KR101246120B1 (en) A system for recognizing license plate using both images taken from front and back faces of vehicle
CN103824081A (en) Method for detecting rapid robustness traffic signs on outdoor bad illumination condition
CN102867418A (en) Method and device for judging license plate identification accuracy
CN103530608A (en) Vehicle type judgment method and vehicle type judgment device
CN112287912A (en) Deep learning-based lane line detection method and device
CN111539303B (en) Monocular vision-based vehicle driving deviation early warning method
CN112488046A (en) Lane line extraction method based on high-resolution images of unmanned aerial vehicle
CN112329881A (en) License plate recognition model training method, license plate recognition method and device
CN111695615A (en) Vehicle damage assessment method and device based on artificial intelligence, electronic equipment and medium
CN111652033A (en) Lane line detection method based on OpenCV
CN116883868A (en) Unmanned aerial vehicle intelligent cruising detection method based on adaptive image defogging
CN115294486B (en) Method for identifying and judging illegal garbage based on unmanned aerial vehicle and artificial intelligence
JP6126849B2 (en) Lane identification device and lane identification method
CN112070081B (en) Intelligent license plate recognition method based on high-definition video
CN113449647A (en) Method, system, device and computer-readable storage medium for fitting curved lane line

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20171215