WO2019201184A1 - 一种车牌增强方法、装置及电子设备 - Google Patents

一种车牌增强方法、装置及电子设备 Download PDF

Info

Publication number
WO2019201184A1
WO2019201184A1 PCT/CN2019/082542 CN2019082542W WO2019201184A1 WO 2019201184 A1 WO2019201184 A1 WO 2019201184A1 CN 2019082542 W CN2019082542 W CN 2019082542W WO 2019201184 A1 WO2019201184 A1 WO 2019201184A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
license plate
brightness
value
binarized
Prior art date
Application number
PCT/CN2019/082542
Other languages
English (en)
French (fr)
Inventor
张彩红
Original Assignee
杭州海康威视数字技术股份有限公司
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 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Publication of WO2019201184A1 publication Critical patent/WO2019201184A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20004Adaptive image processing
    • G06T2207/20012Locally adaptive
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Definitions

  • the embodiments of the present invention relate to the technical field of license plate recognition, and in particular, to a license plate enhancement method, device, and electronic device.
  • the license plate enhancement method in the related art is to perform an overall effect on the license plate image.
  • the method can enhance the font and the card bottom contrast in the license plate image to some extent, the method has the following problems:
  • the noise of the license plate image is also enhanced.
  • the font and the bottom edge of the card will be equally blurred.
  • the fuzzy font will undoubtedly affect the accuracy and reliability of the license plate recognition, making the license plate enhancement effect is not good.
  • the embodiment of the present application provides a license plate enhancement method, device, and electronic device to reduce the card bottom noise while ensuring the definition of the font while ensuring the license plate font and the card bottom contrast requirement.
  • an embodiment of the present application provides a license plate enhancement method, including:
  • the first type of pixel associated with the card bottom and the second type of pixel associated with the font are determined in the binarized image. a point, and determining, from the target brightness image, a third type of pixel point corresponding to the first type of pixel point position and a fourth type of pixel point corresponding to the second type of pixel point position, according to the third
  • the denoising intensity of the pixel-like point is higher than the denoising rule of the denoising intensity of the fourth type of pixel, and the target brightness image is denoised;
  • the license plate image after the license plate is enhanced is generated based on the enhanced brightness image of the license plate.
  • an embodiment of the present application provides a license plate augmentation apparatus, including:
  • An image obtaining unit configured to obtain a license plate image to be processed
  • a contrast enhancement unit configured to perform contrast enhancement processing on the brightness image corresponding to the to-be-processed license plate image to obtain a target brightness image
  • An image segmentation unit configured to generate a plurality of binarized images corresponding to the target brightness image; wherein different binarized images correspond to different brightness domain value intervals;
  • a denoising unit configured to determine, according to a brightness relationship between a card base and a font in the to-be-processed license plate image, a first type of pixel point and font associated with the bottom of the card in the binary image for each binarized image Corresponding second type of pixel points, and determining, from the target brightness image, a third type of pixel point corresponding to the first type of pixel point position and a fourth type of pixel point corresponding to the second type of pixel point position And denoising the target brightness image according to a denoising rule that the denoising intensity of the third type of pixel is higher than the denoising intensity of the fourth type of pixel;
  • An image enhancement result generating unit configured to generate a license plate enhanced brightness image based on each denoised target brightness image
  • the license plate enhancement result generating unit is configured to generate the license plate image after the license plate is enhanced based on the brightness image after the license plate is enhanced.
  • an embodiment of the present application provides an electronic device, where the electronic device includes: an internal bus, a memory, a processor, and a communication interface; wherein the processor, the communication interface, and the memory pass the The internal bus completes communication with each other; wherein the memory is configured to store a machine feasible instruction corresponding to the license plate enhancement method;
  • the processor is configured to read the machine readable instructions on the memory, and execute the license plate enhancement method provided by the first aspect of the embodiment of the present application.
  • the license plate enhancement method In the license plate enhancement method provided by the embodiment of the present application, after the contrast enhancement processing is performed on the luminance image corresponding to the license plate image to obtain the target luminance image, a plurality of binarized images corresponding to the target luminance image are generated, and for each Binarized image, based on the brightness relationship between the card base and the font in the image of the license plate to be processed, determining the first type of pixel points related to the card bottom and the second type of pixel points related to the font in the binarized image, and from the target Determining, in the luminance image, a third type of pixel point corresponding to the first type of pixel point position and a fourth type of pixel point corresponding to the second type of pixel point position, and the denoising intensity according to the third type of pixel point is higher than the fourth type of pixel
  • the denoising rule of the denoising intensity of the point is used to denoise the target brightness image; and then based on the denoised target brightness image, the license plate
  • License plate image It can be seen that the scheme can distinguish the card bottom and the font with different brightness, and make the denoising intensity of the font lower than the denoising intensity of the bottom of the card. Therefore, under the premise of ensuring the license plate font and the card bottom contrast requirement, the solution is reduced. The purpose of the card bottom noise while ensuring the clarity of the font.
  • FIG. 1 is a flowchart of a method for enhancing a license plate according to an embodiment of the present application
  • FIG. 2 is another flowchart of a method for enhancing a license plate according to an embodiment of the present application
  • 3(a) and 3(b) are schematic diagrams showing the segmentation values in the luminance normalized histogram in the embodiment of the present application.
  • FIG. 4(a) is a schematic diagram of a license plate image to be processed
  • FIG. 4(b) is a schematic diagram of a license plate image obtained by using a method provided by an embodiment of the present application to enhance a license plate;
  • FIG. 5 is a schematic structural diagram of a license plate augmenting device according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • first, second, third, etc. may be used to describe various information in this application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information without departing from the scope of the present application.
  • second information may also be referred to as the first information.
  • word "if” as used herein may be interpreted as "when” or “when” or “in response to a determination.”
  • the embodiment of the present application provides a license plate enhancement method, device and electronic device.
  • a method for enhancing the license plate provided by the embodiment of the present application is first introduced.
  • the execution body of the license plate enhancement method provided by the embodiment of the present application may be a license plate enhancement device.
  • the license plate augmentation device can be operated in a terminal device or a server, and the specific running carrier is determined according to actual needs.
  • the license plate image has two main body pixels of the card bottom and the font, and in the same lighting environment, the brightness of the bottom of the same license plate is different from the brightness of the font of the license plate.
  • the license plate involved in the embodiment of the present application may include: blue card, yellow card, white card and the like, wherein blue, yellow, white and other colors refer to The color of the bottom of the license plate. Among them, for the blue card and the yellow card, the brightness of the bottom of the license plate image is lower than the brightness of the font; and for the white card, the brightness of the bottom of the license plate image is higher than the brightness of the font.
  • a license plate enhancement method provided by an embodiment of the present application may include the following steps:
  • the to-be-processed license plate image is an image that can be converted to the YUV color mode.
  • the color mode of the acquired license plate image may be an RGB color mode, a CMYK color mode, an HSB color mode, or the like.
  • the color mode of the license plate image after the license plate is enhanced is the same as the color mode of the license plate image to be processed.
  • RGB is the English abbreviation of red, green, blue, namely red, green and blue.
  • CMYK is a color mode based on printing. It is a color mode that relies on reflection.
  • C is the English abbreviation of cyan, ie cyan
  • M is the abbreviation of Magenta, ie magenta
  • Y is the English abbreviation of Yellow
  • ie yellow K is The English abbreviation for black, that is, black.
  • HSB also known as HSV, represents a color mode.
  • H is the abbreviation of hues, which means hue
  • S is the abbreviation of saturation, which means saturation
  • B is the abbreviation of brightness, which means brightness.
  • the medium corresponding to the HSB color mode is the human eye.
  • YUV is a color coding method adopted by European television systems, where Y represents brightness (Luminance or Luma), that is, gray scale value; and U and V represent chroma (Chrominance or Chroma), It describes the color and saturation of the image and is used to specify the color of the pixel.
  • S102 performing contrast enhancement processing on the brightness image of the license plate image to be processed to obtain a target brightness image
  • the license plate augmentation device can obtain the license plate image after the image is to be processed.
  • the to-be-processed license plate image is converted from the original color mode to the YUV color mode, thereby obtaining an image corresponding to the Y-space in the YUV color mode of the to-be-processed license plate image as the brightness image of the to-be-processed license plate image. Further, contrast enhancement processing is performed on the luminance image to obtain a target luminance image.
  • the step of performing contrast enhancement processing on the brightness image of the license plate image to be processed to obtain the target brightness image may include the following steps A1-A2:
  • Step A1 generating a gamma correction curve by using a luminance histogram of the luminance image of the license plate image to be processed;
  • Step A2 The brightness image is adjusted according to the gamma correction curve to obtain a target brightness image.
  • the gamma correction (ie, gamma correction) method is used to perform contrast enhancement processing on the luminance image of the license plate image to obtain the target luminance image.
  • the so-called gamma correction method is: a method of editing a gamma curve of an image to perform nonlinear tone editing on the image, specifically, detecting a dark portion and a light portion in the image signal, and making the ratio of the two Increase to increase the image contrast effect.
  • the luminance histogram represents the luminance distribution of the luminance image of the license plate image to be processed in the form of a distribution map.
  • the horizontal axis of the luminance histogram represents the brightness of the image
  • the vertical axis represents the number of pixels, that is, the relative number of pixels within a certain brightness range, wherein the relative quantity is: the pixel in a certain brightness range is in the license plate image
  • the left end of the luminance histogram indicates the darkest brightness, and the right end indicates the brightest, that is, the horizontal axis from left to right indicates that the image brightness gradually transitions from the darkest to the brightest.
  • the relative number of pixels in the brightness range in the brightness image can be determined, and further, the brightness histogram of the brightness image is obtained. Then, the obtained luminance histogram can be used to generate a gamma correction curve.
  • the generated gamma correction curve since the gamma correction curve is generated using the luminance histogram of the luminance image of the license plate image to be processed, the generated gamma correction curve has a unique correspondence with the luminance image of the license plate image to be processed.
  • hist(min_val:max_val) is a matrix of 1*n
  • n max_val-min_val+1
  • the first element in hist(min_val:max_val) is min_val
  • the second element is min_val+1
  • third The elements are min_val+2, and so on, until the nth element is max_val.
  • the ratio of the pixels whose luminances are in the range of min_val and max_val in all the pixels of the luminance image of the license plate image is calculated.
  • the brightness image may be adjusted according to the gamma correction curve to obtain a target brightness image.
  • different binarized images correspond to different luminance domain value intervals.
  • S104 For each binarized image, determining, according to the brightness relationship between the card base and the font in the to-be-processed license plate image, determining the first type of pixel points related to the card bottom and the second type related to the font in the binarized image. a pixel point, and determining, from the target brightness image, a third type of pixel point corresponding to the first type of pixel point position and a fourth type of pixel point corresponding to the second type of pixel point position, according to the third type of pixel point
  • the denoising intensity is higher than the denoising rule of the denoising intensity of the fourth type of pixel, and the target brightness image is denoised;
  • the contrast enhancement processing is performed on the brightness image corresponding to the image to be processed, new noise is introduced. Therefore, in the license plate enhancement process, after the contrast enhancement processing is performed on the luminance image of the license plate image to be processed, denoising processing is required to To some extent, the original noise and the newly introduced noise are removed, so as to achieve a better license plate enhancement effect.
  • the card bottom and the font with different brightness can be distinguished and denoised, and the denoising intensity of the font is lower than the bottom of the card.
  • Denoising intensity may be generated after obtaining the target brightness image, the license plate augmentation device may generate a plurality of binarized images of the target brightness image, and further denoise the target brightness image for each binarized image to obtain more A target brightness image after denoising. In this way, it is possible to achieve the effect of distinguishing and denoising the fonts and the bottoms of different brightnesses.
  • the brightness relationship between the card bottom and the font in the license plate image may be determined according to the card bottom color of the license plate. That is to say, in the license plate image to be processed, there is a magnitude relationship between the brightness of the pixel point associated with the card bottom and the brightness of the pixel point associated with the font, and the relationship is based on the card bottom color of the license plate image in the license plate image to be processed. definite. Further, it can be determined that there is a magnitude relationship between the brightness of the pixel point associated with the card base and the brightness of the pixel point associated with the font in the target brightness image of the license plate image to be processed.
  • each pixel in each binarized image has only two types of values, and each pixel has a value based on the brightness of each point in the target brightness image and the brightness corresponding to the binarized image.
  • the field value interval is determined. That is, in the target luminance image, the pixel points whose luminance belongs to the luminance domain value interval have the same value in the pixel corresponding to the position in the binary image, and the luminance does not belong to the pixel of the luminance domain value interval at the binary value.
  • the pixels corresponding to the positions in the image have the same other value.
  • the pixel points having the same value in the binarized image are pixel points associated with the same object, and the object can be a card base or a font.
  • the first type of pixel related to the card bottom in the binarized image can be determined according to the data of each pixel in the binarized image and the brightness relationship between the card base and the font in the license plate image to be processed.
  • the second type of pixel associated with the font can be determined according to the data of each pixel in the binarized image and the brightness relationship between the card base and the font in the license plate image to be processed.
  • the method for generating the binary image 1 corresponding to the image of the to-be-processed license plate is: setting the gradation value of the pixel whose brightness is lower than the value A in the target brightness image to 255, and the brightness of the pixel not lower than the value A
  • the gray value is set to 0.
  • the pixel whose brightness is lower than the value A in the target brightness image can be regarded as the card in the image of the license plate to be processed.
  • the pixel associated with the bottom is considered to be a pixel point whose luminance is not lower than the value A as a pixel associated with the font in the license plate image to be processed. That is, it can be determined that in the binarized image 1, a pixel having a gray value of 255 is a first type of pixel associated with the bottom of the card, and a pixel having a gray value of 0 is a second associated with the font. Class pixel points.
  • each of the first type of pixel points and each of the second type of pixels may be determined.
  • the coordinate position of the point in the binarized image For each of the first type of pixel points, the same pixel position as the position of the first type of pixel point can be determined in the target luminance image as the third type of pixel point.
  • the same pixel position as the second type of pixel can be determined in the target luminance image as the fourth type of pixel.
  • the first type of pixel is the pixel associated with the bottom of the card in the binarized image
  • the second type of pixel is the pixel associated with the font in the binarized image.
  • the third type of pixel point is a pixel point related to the bottom of the target brightness image
  • the fourth type of pixel point is a pixel point related to the font in the target brightness image.
  • the denoising strength of the font can be made lower than the denoising intensity of the bottom of the card.
  • the third type of pixel point is a pixel point related to the card bottom in the target brightness image
  • the fourth type of pixel point is a pixel point related to the font in the target brightness image. Therefore, in order to ensure that the denoising strength of the font is lower than the denoising intensity of the bottom of the card, when the target luminance image is denoised, the denoising intensity of the third type of pixel can be higher than the denoising intensity of the fourth type of pixel.
  • the denoising rule denoises each pixel in the target luminance image. That is, when denoising the target luminance image for each binarized image, the denoising intensity relationship of each pixel in the target luminance image satisfies: the denoising intensity of the pixel associated with the bottom of the card is higher than the pixel associated with the font. Denoising intensity.
  • the denoising intensity of the pixel associated with the card bottom is higher than the denoising intensity of the pixel associated with the font, and the target brightness for each binarized image.
  • the specific performance of the denoising intensity relationship of each pixel in the image is as follows:
  • the higher the denoising intensity corresponding to the binarized image with the lower luminance region value interval the higher the corresponding binarized image corresponding to the luminance region value interval.
  • the lower the noise intensity that is, for any two binarized images A and B, if the luminance field value interval corresponding to the binarized image A is lower than the luminance domain value interval corresponding to the binarized image B, then the binary value The denoising intensity corresponding to the image A is higher than the denoising intensity corresponding to the binarized image B.
  • the denoising intensity corresponding to each binarized image may be the same. That is, the same denoising parameter is used; the difference may be different, that is, the lower the denoising intensity corresponding to the binarized image corresponding to the lower range of the brightness region value, the higher the corresponding binarized image corresponding to the binning image range. The lower the noise intensity.
  • the lower the denoising intensity corresponding to the binarized image with the lower luminance region value interval the higher the corresponding binarized image corresponding to the luminance region value interval.
  • the higher the noise intensity that is, for any two binarized images C and D, if the luminance field value interval corresponding to the binarized image C is lower than the luminance domain value interval corresponding to the binarized image D, then the binary value
  • the denoising intensity corresponding to the image C is lower than the denoising intensity corresponding to the binarized image D.
  • the denoising intensity corresponding to each binarized image may be the same. That is, the same denoising parameter is used; or the denoising intensity corresponding to the binarized image with the lower luminance region value interval is lower, and the binarized image corresponding to the higher luminance region value interval corresponds to The higher the noise level.
  • the method for denoising the target luminance image for each binarized image may be: separately filtering each pixel point in the target luminance image, wherein the filtering parameter is a factor affecting the denoising intensity.
  • the denoising algorithm used in the embodiments of the present application may include, but is not limited to, a Gaussian denoising algorithm. Among them, the function expression of the Gaussian denoising algorithm is as follows:
  • binaryH i is a binarized image i
  • G(w i , ⁇ i ) is a Gaussian convolution kernel corresponding to the binarized image i and belongs to a constant value
  • x and y are image coordinate positions corresponding to the pixel points
  • Y ( x, y) is the brightness of the pixel point whose image coordinate position is (x, y) in the target luminance image.
  • the w i corresponding to different binarized images i may be the same, and the corresponding ⁇ i may be different, and the value of ⁇ i may be: ⁇ i ⁇ [0.4,1.0], specific:
  • S105 generate a license plate enhanced brightness image based on each denoised target brightness image
  • S106 Generate a license plate image after the license plate is enhanced based on the brightness image after the license plate is enhanced.
  • the license plate enhanced brightness image may be generated based on each denoised target brightness image, and then determining the waiting based on the license plate enhanced brightness image.
  • the image of the license plate enhanced by the license plate corresponding to the image is processed.
  • the license plate enhanced license plate image may be generated based on the license plate enhanced brightness image and the image of the UV space corresponding to the license plate image to be processed.
  • the color mode of the license plate image after the license plate is enhanced is the same as the color mode of the license plate image to be processed.
  • the respective denoised target brightness images may be directly accumulated.
  • the accumulated result is normalized to obtain the enhanced image of the license plate.
  • the denoised target luminance images can be weighted and fused, and the weighted fusion is performed.
  • the subsequent results are normalized to obtain a luminance image after the license plate is enhanced.
  • the weighted fusion fusion weights may include, but are not limited to, empirical values.
  • the license plate enhancement method In the license plate enhancement method provided by the embodiment of the present application, after the contrast enhancement processing is performed on the luminance image corresponding to the license plate image to obtain the target luminance image, a plurality of binarized images corresponding to the target luminance image are generated, and for each Binarized image, based on the brightness relationship between the card base and the font in the image of the license plate to be processed, determining the first type of pixel points related to the card bottom and the second type of pixel points related to the font in the binarized image, and from the target Determining, in the luminance image, a third type of pixel point corresponding to the first type of pixel point position and a fourth type of pixel point corresponding to the second type of pixel point position, and the denoising intensity according to the third type of pixel point is higher than the fourth type of pixel
  • the denoising rule of the denoising intensity of the point is used to denoise the target brightness image; and then based on the denoised target brightness image, a license
  • the license plate image visible, this scheme can distinguish the card base and font with different brightness, and make the denoising strength of the font lower than the denoising of the bottom of the card. Degree, therefore, the purpose of ensuring the clarity of the card while ensuring the clarity of the font while realizing the requirement of the license plate font and the card bottom contrast.
  • a license plate enhancement method provided by an embodiment of the present application may include the following steps:
  • S201-S202 is the same as S101-S102 in the foregoing embodiment, and details are not described herein.
  • S203-S204 is a specific implementation manner of generating a plurality of binarized images corresponding to the target brightness image in the above embodiment S103.
  • the license plate enhancement device takes into account the difference between the card base and the font brightness after obtaining the target brightness image, and therefore, the histogram can be first normalized from the brightness of the target brightness image.
  • a plurality of segmentation values for binarized image generation are determined, and then a plurality of binarized images are generated based on the plurality of segmentation values.
  • a segmentation value is a gray value.
  • FIGS. 3(a) and (b) respectively show schematic diagrams of the segmentation values in the luminance normalized histogram, and the vertical line of the vertical abscissa indicates the position where the segmentation value is located, that is, the histogram segmentation boundary.
  • the step of determining a plurality of segmentation values for binarized image generation from the plurality of grayscale values of the luminance normalized histogram of the target luminance image can be included:
  • Step B1 determining a plurality of segmentation values for binarized image generation from the plurality of grayscale values of the luminance normalized histogram of the target luminance image by big data analysis.
  • the plurality of segmentation values determined based on the empirical value that is, the determined plurality of segmentation values are determined empirical values, so that each time the target luminance image is obtained, A plurality of segmentation values for binarized image generation are determined directly from a plurality of grayscale values of the luminance normalized histogram of the target luminance image.
  • the determined values of the plurality of segmentation values may be different.
  • the step of determining a plurality of segmentation values for binarized image generation from the plurality of grayscale values of the luminance normalized histogram of the target luminance image can be included:
  • Step C1 Perform secondary derivation on the brightness normalized histogram of the target brightness image
  • Step C2 using a minimum value point obtained by the second derivative as a single-peak valley candidate point corresponding to the brightness normalized histogram of the target brightness image;
  • Step C3 Obtain a plurality of segmentation values for binarized image generation from the determined unimodal trough candidate points.
  • the brightness enhancement image corresponding to the to-be-processed license plate image is subjected to contrast enhancement processing, and after the target brightness image is obtained, a brightness normalized histogram of the target brightness image may be generated. Furthermore, the luminance normalized histogram can be secondarily derived, and the minimum value obtained by the second derivative is used as the single peak trough candidate point corresponding to the luminance normalized histogram of the target luminance image. . And further, from the determined single-peak trough candidate points, a plurality of segmentation values for binarized image generation are obtained.
  • the result obtained by second deriving the brightness normalized histogram of the target brightness image is the inflection point of the brightness normalized histogram curve, that is, the obtained single peak trough candidate point is the brightness normalization
  • the inflection point of the histogram curve indicates the concavity and convexity of the luminance distribution of each pixel in the expressed target luminance image. Since the luminance normalized histogram curve is not absolutely smooth or can be expressed by a certain function, when the second derivative of the luminance normalized histogram of the target luminance image is secondarily derived, the second derivative is 0. The results may not all be used to generate a binarized image and, therefore, can only be used as a single peak trough candidate.
  • the unimodal trough candidate points include points corresponding to the concave distribution in the luminance distribution of each pixel in the target luminance image, and in the embodiment of the present application, the determined gradation value corresponding to the gradation value is selected The point may be only a point corresponding to the convex distribution in the luminance distribution of each pixel in the target luminance image. Based on this, a specific implementation of how to obtain a plurality of segmentation values for binarized image generation from the determined unimodal trough candidate points can be provided subsequently.
  • some single-peak trough candidate points may be selected from the single-peak trough candidate points in a random manner.
  • the step of obtaining a plurality of segmentation values for binarized image generation from the determined single-peak trough candidate points may include the following steps D1-D3:
  • Step D1 constructing a set containing the determined unimodal trough candidate points
  • Step D2 Fitting at least one type of distribution curve between the pair of unimodal trough candidate points for each pair of adjacent unimodal trough candidate points in the set, and calculating the at least one type of distribution curve and the pair of unimodal troughs The similarity of the histogram curves between the alternative points.
  • the histogram curve between the candidate points of the pair of single-peak troughs is: a normalized histogram curve corresponding to the brightness of the pair of single-peak troughs in the normalized histogram of the brightness of the target brightness image. Further, when the maximum value of the calculated similarities is greater than a predetermined similarity threshold, the pair of single-peak trough candidate points is determined as a segmentation value of the binarized image used to generate the target luminance image, otherwise, A single-peak trough candidate point having a larger value in the unimodal trough candidate point is removed from the target set;
  • Step D3 returning to perform a step of fitting at least one type of distribution curve between the pair of adjacent single-peak valleys for each pair of adjacent single-peak valleys in the set until all the single-peak waves in the set are prepared The selected points are used as the split values for binarized image generation.
  • the number of candidate points of the single-peak trough is L
  • the candidate point of each single-peak trough is h j
  • the values of the individual unimodal trough candidate points gradually increase.
  • h 1 and h 2 can be used as a pair of adjacent single-peak troughs
  • h 2 and h 3 can be used as one
  • each pair of adjacent unimodal trough candidate points in the set can be determined.
  • At least one type of distribution curve between the pair of unimodal trough alternative points can be fitted. specific:
  • a fitting parameter of the at least one type of distribution curve between the pair of unimodal trough candidate points is determined, and at least one type of distribution curve is obtained based on the fitting parameter.
  • the manner of determining each of the fitting parameters may include, but is not limited to, a maximum likelihood method.
  • the similarity between the at least one type of distribution curve and the histogram curve between the pair of single-peak valley candidate points can be calculated.
  • the manner of calculating the similarity between the at least one type of distribution curve and the histogram curve between the pair of single-peak valley candidate points may include, but is not limited to, a correlation coefficient method.
  • the pair of unimodal trough candidate points is determined whether the maximum value of the calculated similarities is greater than a predetermined similarity threshold, and when the determination result is YES, determining the pair of unimodal trough candidate points as a binarized image for generating a target luminance image The segmentation value; otherwise, the single-peak valley candidate point having a larger value in the single-peak valley candidate point is removed from the above set. Further, the above process is performed for the next pair of adjacent unimodal trough candidate points.
  • At least one type of distribution curve between the pair of unimodal trough candidate points obtained by fitting to any pair of adjacent unimodal trough candidate points remaining in the above set The maximum values of the plurality of similarities of the histogram curves between the pair of unimodal troughs are larger than the predetermined similarity threshold, that is, all the unimodal trough candidate points remaining in the set may be used as the target brightness image.
  • the segmentation value of the binarized image may be used as the target brightness image.
  • each single peak in a luminance normalized histogram is fitted by a unimodal distribution function, and each single peak is used as a boundary of a layer, and the actual brightness is returned.
  • each single peak is not necessarily symmetrical, so at least one type of distribution function, that is, a distribution set, may be employed in determining the segmentation value of the binarized image used to generate the target luminance image.
  • the Gaussian distribution curve, the Cauchy distribution curve and the Weber distribution curve can cover the waveform of the brightness normalized histogram of a large number of license plate brightness images, and therefore, the fitting the pair
  • the step of at least one type of distribution curve between the candidate points of the peak wave valley may include: fitting at least one of a Gaussian distribution curve, a Cauchy distribution curve, and a Weber distribution curve between the pair of single peak trough candidate points.
  • the function expressions for the three types of distribution curves are as follows:
  • x is the abscissa in the luminance normalized histogram of the target luminance image
  • the value range is the abscissa range corresponding to the fitting segment
  • is the abscissa corresponding to the maximum value in the fitting segment
  • ⁇ ⁇ is the fitting parameter of the Gaussian distribution
  • is the fitting parameter of the Cauchy distribution
  • k is the fitting parameter of the Weber distribution.
  • h j and h j+1 can be used as a fitting segment, and the abscissa range of the fitting segment is [h j , h j+1 ], and the fitting parameters of each distribution curve are estimated by the maximum likelihood method, thereby obtaining Three types of distribution curves: Then, calculate a histogram curve between each distribution curve and the candidate point of the pair of single-peak valleys The degree of similarity; when the maximum value of the calculated similarities is greater than the predetermined similarity threshold, the pair of single-peak trough candidate points h j and h j+1 are determined as binarized images for generating the target luminance image
  • the segmentation value otherwise, the single-peak valley candidate point h j+1 having a larger value in the candidate point of the single-peak wave is removed from the set, and at this time, h j and h j+2 in the set are Two adjacent single-peak valleys, that is, h j and h j+2 can be used as a fitting segment.
  • the specific implementation manner of determining the plurality of segmentation values for the binarized image generation is merely an example. It should not be construed as limiting the embodiment of the present application. In a specific application, other methods may be used to determine the binarized image generation from the plurality of gray values of the luminance normalized histogram of the target luminance image. Multiple split values.
  • a plurality of binarized images corresponding to the target luminance image may be generated based on the plurality of luminance segmentation points.
  • the step of generating a plurality of binarized images corresponding to the target brightness image based on the plurality of segmentation values may include the following step E1:
  • Step E1 For each segmentation value, the segmentation value is used as a brightness threshold required for the binarization process, and the target luminance image is binarized to obtain a binarized image.
  • the repetition frequency of the pixel associated with the card bottom is higher than the repetition frequency of the pixel associated with the font.
  • binarization For example: suppose the partition value is 50, 100, 150, 200, and the brightness of the font is higher than the brightness of the bottom of the card.
  • binarization The image is generated by selecting a pixel with a gray value of not more than 50 in the target brightness image to generate a binarized image, and selecting a pixel with a gray value of not more than 100 in the target brightness image to generate a binarized image, and selecting a target.
  • a binarized image is generated from a pixel having a gray value of not more than 150 in the luminance image, and a binarized image is generated by selecting a pixel having a gray value of not more than 200 in the target luminance image.
  • the process of generating the binarized image may be:
  • the gray value of the pixel with the gray value of not more than 50 in the target brightness image to 255, and set the gray value of other pixels to 0 to obtain a binarized image with only black and white visual effects;
  • the gray value of the pixel whose gray value is not greater than 100 is set to 255, and the gray value of the other pixel is set to 0, and another binary image with only black and white visual effects is obtained; the target brightness is obtained.
  • the gray value of the pixel with the gray value of not more than 150 in the image is set to 255, and the gray value of other pixels is set to 0, and a binarized image with only black and white visual effects is obtained; the target brightness image is obtained.
  • the gray value of the pixel with the medium gray value of not more than 200 is set to 255, and the gray value of the other pixel points is set to 0, and a binarized image with only black and white visual effects is obtained.
  • the process of generating the binary image may be for:
  • the logical value of the pixel with the gray value not greater than 100 is set to 1, and the logical value of the other pixel is set to 0, resulting in another binarized image with only black and white visual effects;
  • the logical value of the pixel whose value is not greater than 150 is set to 1, and the logical value of the other pixel is set to 0, and a binarized image with only black and white visual effects is obtained;
  • the gray value of the target luminance image is not greater than
  • the logical value of the pixel of 200 is set to 1, and the logical value of the other pixel is set to 0, and a binarized image with only black and white visual effects is obtained.
  • the binarized image The process of generating is: selecting a pixel with a gray value greater than 50 in the target brightness image to generate a binarized image, and selecting a pixel with a gray value greater than 100 in the target brightness image to generate a binarized image, and selecting a target brightness image.
  • a pixel with a gray value greater than 150 generates a binarized image
  • a pixel with a gray value greater than 200 in the target luminance image is selected to generate a binarized image.
  • the process of generating the binarized image may be:
  • the gray value of the pixel with the gray value greater than 50 in the target brightness image to 255, and set the gray value of other pixels to 0 to obtain a binarized image with only black and white visual effects;
  • the gray value of the pixel with the gray value greater than 100 in the image is set to 255, and the gray value of the other pixel is set to 0, and another binary image with only black and white visual effects is obtained;
  • the gray value of the pixel with the gray value greater than 150 is set to 255, and the gray value of the other pixel is set to 0, and a binarized image with only black and white visual effects is obtained; the gray of the target brightness image is obtained.
  • the gray value of the pixel whose value is greater than 200 is set to 255, and the gray value of the other pixel is set to 0, and another image template binarized image with only black and white visual effects is obtained.
  • the process of generating the binary image may be for:
  • the step of generating a plurality of binarized images corresponding to the target brightness image based on the plurality of segmentation values may include the following step F1:
  • Step F1 determining, for each luminance segmentation point, a first interval between the segmentation value and a first neighboring segmentation value corresponding to the segmentation value, and using the first segment as a luminance domain value interval required for binarization processing,
  • the target brightness image is binarized to obtain a binarized image
  • the first neighboring partition value is: a segmentation value having the largest value among the segmentation values smaller than the segmentation value;
  • the process of generating the binarized image is: determining that each of the first intervals is: (0, 50), (50, 100], (100, 150), and (150, 200). Selecting the gray value in the target brightness image to generate a binarized image at the pixel of the range (0, 50), and selecting the gray value in the target brightness image to generate a binarized image at the pixel of the range (50, 100), and selecting the target The gray value in the luminance image generates a binarized image at the pixel of the range (100, 150), and the gray value in the target luminance image is selected to construct a binarized image at the pixel of the range (150, 200).
  • the process of generating the binarized image may be:
  • the process of generating the binary image may be for:
  • the logical value of the pixel value in the target luminance image is set to 1 in the range (0, 50), and the logical value of the other pixel is set to 0, to obtain a binarized image with only black and white visual effects;
  • Set the logical value of the grayscale value in the target luminance image to 1 in the range (50, 100), and set the logical value of the other pixel to 0 to obtain another binarized image with only black and white visual effects;
  • the logical value of the pixel value in the range (100, 150) is set to 1, and the logical value of the other pixel is set to 0, and a binarized image with only black and white visual effects is obtained;
  • the logical value of the pixel value in the range (150, 200) is set to 1, and the logical value of the other pixel is set to 0, and a binarized image with only black and white visual effects is obtained.
  • the step of generating a plurality of binarized images corresponding to the target brightness image based on the plurality of segmentation values may include the following step G1:
  • Step G1 determining, for each luminance segmentation point, a second interval between the segmentation value and a second neighboring segmentation value corresponding to the segmentation value, and using the second segment as a luminance domain value interval required for binarization processing,
  • the target brightness image is binarized to obtain a binarized image
  • the second neighboring partition value is: a segmentation value having the smallest value among the plurality of segmentation values greater than the segmentation value.
  • the process of generating the binarized image is: determining that each of the second intervals is: [50, 100), [100, 150), [150, 200), and [200, 255). Then, a pixel image of the target brightness image is selected to generate a binarized image at a pixel of the range [50, 100), and a pixel image of the target brightness image is selected to generate a binarized image at a pixel of the range [100, 150), and the target brightness is selected.
  • the gray value in the image generates a binarized image at the pixel of the range [150, 200), and the pixel of the target luminance image with the gray value in the range [200, 255) is selected as a binarized image.
  • the process of generating the binarized image may be:
  • the gray value of the pixel in the target brightness image in the range [50, 100) is set to 255, and the gray value of the other pixels is set to 0, to obtain a binarized image with only black and white visual effects;
  • the gray value of the pixel in the target brightness image in the range [200, 255) is set to 255, and the gray value of the other pixels is set to 0, and another binarization of only black and white visual effects is obtained. image.
  • the process of generating the binary image may be for:
  • the logical value of the pixel in the target luminance image to the range of [50, 100) to 1 and the logical value of the other pixel to 0 to obtain a binary image with only black and white visual effects;
  • the logical value of the pixel with the gray value in the range [100, 150) is set to 1, and the logical value of the other pixel is set to 0, and another binary image with only black and white visual effects is obtained; the target brightness is obtained.
  • the logical value of the pixel whose gray value is in the range [150, 200) is set to 1, and the logical value of the other pixel is set to 0, and a binary image with only black and white visual effects is obtained; the target brightness image is obtained.
  • the logical value of the pixel with the medium gray value in the range [200, 255) is set to 1, and the logical value of the other pixel is set to 0, resulting in a binarized image with only black and white visual effects.
  • S205 Determine, according to the brightness relationship between the card base and the font in the image of the to-be-processed license plate, for each binarized image, determining a first type of pixel point related to the card bottom and a second class related to the font in the binarized image. a pixel point, and determining, from the target brightness image, a third type of pixel point corresponding to the first type of pixel point position and a fourth type of pixel point corresponding to the second type of pixel point position, according to the third type of pixel point
  • the denoising intensity is higher than the denoising rule of the denoising intensity of the fourth type of pixel, and the target brightness image is denoised;
  • the implementation of the denoising of the target luminance image is the same for each binarized image in S104 in the embodiment and is not described herein.
  • the license plate enhanced brightness image may be generated based on each denoised target brightness image, and then determined based on the license plate enhanced brightness image.
  • the respective denoised target luminance images may be directly accumulated, and the accumulated result is normalized, thereby Obtaining a brightness image after the license plate is enhanced;
  • the denoised target luminance images may be weighted and fused, and the weighted and fused results are normalized. Thereby, the brightness image after the license plate is enhanced is obtained.
  • the weighted fusion fusion weights may include, but are not limited to, empirical values.
  • weighting and merging the denoised target luminance images may be performed to obtain a license plate enhanced brightness.
  • the respective brightness values corresponding to the image are: the brightness values in the luminance field value interval corresponding to the binarized image corresponding to the de-noised target brightness image.
  • the merged result can also be normalized to obtain the license plate.
  • Enhanced brightness image In order to ensure that the gray level of the brightness image after the license plate is enhanced is located at [0, 255], after the weighted fusion of the respective de-noised target brightness images, the merged result can also be normalized to obtain the license plate. Enhanced brightness image.
  • the fusion weight For example, for a license plate whose brightness is higher than the brightness of the bottom of the card (for example, the license plate type is blue), the fusion weight
  • V i is the fusion weight of the denoised target luminance image corresponding to the binarized image i
  • k is the abscissa of the luminance normalized histogram
  • hist(k) is the horizontal coordinate k of the luminance normalized histogram
  • m is the segmentation value corresponding to the binarized image i;
  • the weighted fusion result FI i is the denoising result of the denoised target luminance image corresponding to the binarized image i.
  • the fusion weight is the fusion weight of the denoised target luminance image corresponding to the binarized image i
  • k is the abscissa of the luminance normalized histogram
  • hist(k) is the horizontal coordinate k of the luminance normalized histogram
  • m is the segmentation value corresponding to the binarized image i
  • the weighted fusion result FI i is the denoised target luminance image denoising result corresponding to the binarized image i.
  • the license plate enhanced license plate image can be generated based on the license plate enhanced brightness image and the image of the UV space corresponding to the license plate image to be processed.
  • the color mode of the license plate image after the license plate is enhanced is the same as the color mode of the license plate image to be processed.
  • FIG. 4 is given, wherein FIG. 4( a ) is a license plate image to be processed, and FIG. 4( b ) is a license plate provided by using the method provided by the embodiment of the present application.
  • the enhanced license plate image can be seen that the method provided by the present application can realize the reduction of the card bottom noise while ensuring the definition of the font while ensuring the license plate font and the card bottom contrast requirement.
  • the scheme can distinguish the card bottom and the font with different brightness, and make the denoising intensity of the font lower than the denoising intensity of the bottom of the card. Therefore, under the premise of ensuring the license plate font and the card bottom contrast requirement, the solution is reduced. The purpose of the card bottom noise while ensuring the clarity of the font.
  • the embodiment of the present application further provides a license plate augmenting device.
  • the license plate augmenting device may include:
  • An image obtaining unit 510 configured to obtain a license plate image to be processed
  • a contrast enhancement unit 520 configured to perform contrast enhancement processing on the brightness image corresponding to the to-be-processed license plate image to obtain a target brightness image
  • the image segmentation unit 530 is configured to generate a plurality of binarized images corresponding to the target brightness image; wherein the different binarized images correspond to different brightness domain value intervals;
  • the denoising unit 540 is configured to determine, according to the brightness relationship between the card base and the font in the to-be-processed license plate image for each binarized image, the first type of pixel points and the related to the card bottom in the binarized image. a second type of pixel associated with the font, and determining, from the target brightness image, a third type of pixel corresponding to the first type of pixel position and a fourth type of pixel corresponding to the second type of pixel position Pointing, denoising the target brightness image according to a denoising rule that the denoising intensity of the third type of pixel is higher than the denoising intensity of the fourth type of pixel;
  • the image enhancement result generating unit 550 is configured to generate a license plate enhanced brightness image based on each denoised target brightness image.
  • the license plate enhancement result generating unit 560 is configured to generate a license plate enhanced license plate image based on the license plate enhanced brightness image.
  • the license plate enhancement device performs contrast enhancement processing on the brightness image corresponding to the license plate image to obtain a target brightness image, and generates a plurality of binarized images corresponding to the target brightness image, and for each of the two
  • the valued image is determined based on the brightness relationship between the bottom of the card and the font in the image of the license plate to be processed, and the first type of pixel associated with the bottom of the binary image and the second type of pixel associated with the font are determined from the target brightness.
  • a third type of pixel point corresponding to the position of the first type of pixel point and a fourth type of pixel point corresponding to the position of the second type of pixel point are determined in the image, and the denoising intensity according to the third type of pixel point is higher than the fourth type of pixel point Denoising rule of denoising intensity, denoising the target brightness image; generating a license plate enhanced brightness image based on each denoised target brightness image, and generating a license plate enhanced image based on the license plate enhanced brightness image License plate image. It can be seen that the scheme can distinguish the card bottom and the font with different brightness, and make the denoising intensity of the font lower than the denoising intensity of the bottom of the card. Therefore, under the premise of ensuring the license plate font and the card bottom contrast requirement, the solution is reduced. The purpose of the card bottom noise while ensuring the clarity of the font.
  • the image dividing unit 530 may include:
  • a segmentation value determining subunit configured to determine a plurality of segmentation values for binarized image generation from a plurality of grayscale values of a luminance normalized histogram of the target luminance image
  • the segmentation value determining subunit is specifically configured to:
  • the minimum value obtained by the second derivation is used as the unimodal trough candidate point corresponding to the luminance normalized histogram of the target luminance image;
  • the segmentation value determining subunit determines a plurality of segmentation values used for binarized image generation from the plurality of grayscale values of the luminance normalized histogram of the target luminance image, specifically:
  • Points are used as the segmentation values for binarized image generation.
  • segmentation subunit is specifically configured to:
  • the segmentation value For each segmentation value, the segmentation value is used as a brightness threshold required for the binarization process, and the target luminance image is binarized to obtain a binarized image.
  • segmentation subunit is specifically configured to:
  • the first neighboring segmentation value is: a segmentation value having a largest value among the segmentation values smaller than the segmentation value;
  • the image is binarized to obtain a binarized image; wherein the second neighboring segmentation value is: a segmentation value having the smallest value among the segmentation values greater than the segmentation value.
  • the image enhancement result generating unit 550 is specifically configured to:
  • each brightness value corresponding to the de-noised target brightness image is: corresponding to the binarized image corresponding to the de-noized target brightness image The luminance value in the interval of the luminance field value.
  • the embodiment of the present application further provides an electronic device; as shown in FIG. 6, the electronic device includes: an internal bus 610, a memory 620, a processor 630, and a communication interface. (Communications Interface) 640; wherein the processor 630, the communication interface 640, and the memory 620 complete communication with each other through the internal bus 610;
  • Communication Interface Communication Interface
  • the memory 620 is configured to store a machine feasible instruction corresponding to the license plate enhancement method
  • the processor 630 is configured to read the machine readable instructions on the memory 620 and execute the instructions to implement a license plate enhancement method provided by the present application.
  • a license plate enhancement method includes:
  • the first type of pixel associated with the card bottom and the second type of pixel associated with the font are determined in the binarized image. a point, and determining, from the target brightness image, a third type of pixel point corresponding to the first type of pixel point position and a fourth type of pixel point corresponding to the second type of pixel point position, according to the third
  • the denoising intensity of the pixel-like point is higher than the denoising rule of the denoising intensity of the fourth type of pixel, and the target brightness image is denoised;
  • the license plate image after the license plate is enhanced is generated based on the enhanced brightness image of the license plate.
  • the device embodiment since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the present application. Those of ordinary skill in the art can understand and implement without any creative effort.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Processing (AREA)

Abstract

一种车牌增强方法、装置及电子设备。该方法包括:获得待处理车牌图像;对待处理车牌图像对应的亮度图像进行对比度增强处理,得到目标亮度图像;生成目标亮度图像对应的多个二值化图像;其中,不同二值化图像对应不同的亮度域值区间;针对每一二值化图像,基于待处理车牌图像中牌底与字体的亮度关系,按照第三类像素点的去噪强度高于第四类像素点的去噪强度的去噪规则,对目标亮度图像进行去噪;基于各个去噪后的目标亮度图像,生成车牌增强后的亮度图像;基于车牌增强后的亮度图像,生成车牌增强后的车牌图像。通过本方法,可以在保证车牌字体和牌底对比度要求的前提下,降低牌底噪声的同时保证字体的清晰度。

Description

一种车牌增强方法、装置及电子设备
本申请要求于2018年4月20日提交中国专利局、申请号为201810362070.X发明名称为“一种车牌增强方法、装置及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及车牌识别技术领域,尤其是涉及一种车牌增强方法、装置及电子设备。
背景技术
相关技术中的车牌增强方法是对车牌图像进行整体作用,然而,该方法虽然可以在一定程度上增强车牌图像中字体和牌底对比度,但是,该方法存在如下问题:
在增强车牌图像中字体和牌底对比度的同时,车牌图像的噪声也被加强,针对于被加强的噪声,由于需要采用全局去噪方式,因此将导致字体和牌底边缘均出现同等程度的模糊,而字体模糊无疑将影响到车牌识别的准确性和可靠性,使得车牌增强效果不好。
发明内容
有鉴于此,本申请实施例提供一种车牌增强方法、装置及电子设备,以在保证车牌字体和牌底对比度要求的前提下,降低牌底噪声的同时保证字体的清晰度。
具体地,本申请实施例是通过如下技术方案实现的:
第一方面,本申请实施例提供了一种车牌增强方法,包括:
获得待处理车牌图像;
对所述待处理车牌图像对应的亮度图像进行对比度增强处理,得到目标亮度图像;
生成所述目标亮度图像对应的多个二值化图像;其中,不同二值化图像对应不同的亮度域值区间;
针对每一二值化图像,基于所述待处理车牌图像中牌底与字体的亮度关系,确定该二值化图像中与牌底相关的第一类像素点和与字体相关的第二类像素点,并从所述目标亮度图像中确定与所述第一类像 素点位置对应的第三类像素点和与所述第二类像素点位置对应的第四类像素点,按照所述第三类像素点的去噪强度高于所述第四类像素点的去噪强度的去噪规则,对所述目标亮度图像进行去噪;
基于各个去噪后的目标亮度图像,生成车牌增强后的亮度图像;
基于车牌增强后的亮度图像,生成车牌增强后的车牌图像。
第二方面,本申请实施例提供了一种车牌增强装置,包括:
图像获得单元,用于获得待处理车牌图像;
对比度增强单元,用于对所述待处理车牌图像对应的亮度图像进行对比度增强处理,得到目标亮度图像;
图像分割单元,用于生成所述目标亮度图像对应的多个二值化图像;其中,不同二值化图像对应不同的亮度域值区间;
去噪单元,用于针对每一二值化图像,基于所述待处理车牌图像中牌底与字体的亮度关系,确定该二值化图像中与牌底相关的第一类像素点和与字体相关的第二类像素点,并从所述目标亮度图像中确定与所述第一类像素点位置对应的第三类像素点和与所述第二类像素点位置对应的第四类像素点,按照所述第三类像素点的去噪强度高于所述第四类像素点的去噪强度的去噪规则,对所述目标亮度图像进行去噪;
图像增强结果生成单元,用于基于各个去噪后的目标亮度图像,生成车牌增强后的亮度图像;
车牌增强结果生成单元,用于基于车牌增强后的亮度图像,生成车牌增强后的车牌图像。
第三方面,本申请实施例提供了一种电子设备,所述电子设备包括:内部总线、存储器、处理器和通信接口;其中,所述处理器、所述通信接口、所述存储器通过所述内部总线完成相互间的通信;其中,所述存储器,用于存储车牌增强方法对应的机器可行指令;
所述处理器,用于读取所述存储器上的所述机器可读指令,并执行本申请实施例第一方面所提供的车牌增强方法。
本申请实施例所提供的车牌增强方法中,在对待处理车牌图像对 应的亮度图像进行对比度增强处理从而得到目标亮度图像后,生成该目标亮度图像对应的多个二值化图像,并针对每一二值化图像,基于待处理车牌图像中牌底与字体的亮度关系,确定该二值化图像中与牌底相关的第一类像素点和与字体相关的第二类像素点,并从目标亮度图像中确定与第一类像素点位置对应的第三类像素点和与第二类像素点位置对应的第四类像素点,按照第三类像素点的去噪强度高于第四类像素点的去噪强度的去噪规则,对目标亮度图像进行去噪;进而基于各个去噪后的目标亮度图像,生成车牌增强后的亮度图像,并基于车牌增强后的亮度图像,生成车牌增强后的车牌图像。可见,本方案可以对亮度不同的牌底和字体进行区分,并使字体的去噪强度低于牌底的去噪强度,因此,实现了在保证车牌字体和牌底对比度要求的前提下,降低牌底噪声的同时保证字体的清晰度的目的。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例所提供的一种车牌增强方法的流程图;
图2为本申请实施例所提供的一种车牌增强方法的另一流程图;
图3(a)和图3(b)分别为本申请实施例中关于亮度归一化直方图中的分割值的示意图;
图4(a)为待处理车牌图像的示意图,图4(b)为利用本申请实施例所提供方法进行车牌增强所得的车牌图像的示意图;
图5为本申请实施例所提供的一种车牌增强装置的结构示意图;
图6为本申请实施例所提供的一种电子设备的结构示意图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。 下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。
在本申请使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本申请可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
为了在保证车牌字体和牌底对比度要求的前提下,降低牌底噪声的同时保证字体的清晰度,本申请实施例提供了一种车牌增强方法、装置及电子设备。
下面首先对本申请实施例所提供的一种车牌增强方法进行介绍。
需要说明的是,本申请实施例所提供的一种车牌增强方法的执行主体可以为一种车牌增强装置。在具体应用中,该车牌增强装置可以运行于终端设备或服务器中,具体运行载体根据实际需求确定。
可以理解的是,基于车牌的固定结构,车牌图像具有牌底和字体两层主体像素,并且,在同样的光照环境下,同一车牌的牌底的亮度不同于该车牌的字体的亮度。另外,按照车牌的牌底颜色对车牌进行区分,则本申请实施例中所涉及的车牌可以包括:蓝牌、黄牌、白牌等不同种类,其中,蓝、黄、白等颜色指代的是车牌牌底的颜色。其中,对于蓝牌和黄牌而言,车牌图像中的牌底的亮度低于字体的亮度;而对于白牌而言,车牌图像中的牌底的亮度高于字体的亮度。
如图1所示,本申请实施例所提供的一种车牌增强方法,可以包括如下步骤:
S101,获得待处理车牌图像;
由于车牌增强处理为针对车牌图像对应的亮度图像的处理,因此,本申请实施例所涉及的待处理车牌图像为能够转换到YUV色彩模式的图像。
在具体应用中,上述所获取的待处理车牌图像的色彩模式可以为RGB色彩模式、CMYK色彩模式、HSB色彩模式等。并且,车牌增强后的车牌图像的色彩模式与待处理车牌图像的色彩模式相同。
其中,RGB分别是red,green,blue的英文缩写,即红,绿,蓝三色。CMYK是基于印刷的色彩模式,是一种依靠反光的色彩模式,其中,C为cyan的英文缩写,即青色,M为Magenta的缩写,即洋红,Y为Yellow的英文缩写,即黄色,K为black的英文缩写,即黑色。HSB又称HSV,表示一种颜色模式,在HSB色彩模式中,H为hues的英文缩写,表示色相,S为saturation的英文缩写,表示饱和度,B为brightness的英文缩写,表示亮度。此外,HSB色彩模式对应的媒介是人眼。
而YUV是被欧洲电视系统所采用的一种颜色编码方法,其中Y表示明亮度(Luminance或Luma),也就是灰阶值;而U和V表示的则是色度(Chrominance或Chroma),作用是描述影像色彩及饱和度,用于指定像素的颜色。
S102,对待处理车牌图像的亮度图像进行对比度增强处理,得到目标亮度图像;
为了在保证车牌字体和牌底对比度要求的前提下,降低牌底噪声的同时保证字体的清晰度,即达到较好的车牌增强效果,该车牌增强装置在获得待处理车牌图像后,可以将该待处理车牌图像从原始的色彩模式转换到YUV色彩模式下,从而得到该待处理车牌图像在YUV色彩模式中的Y空间内对应的图像,作为该待处理车牌图像的亮度图像。进而,对该亮度图像进行对比度增强处理,得到目标亮度图像。
其中,可以存在多种对待处理车牌图像的亮度图像进行对比度增强处理的方式存在多种。
可选地,一种具体实现方式中,所述对待处理车牌图像的亮度图像进行对比度增强处理,得到目标亮度图像的步骤,可以包括如下步骤A1-A2:
步骤A1:利用待处理车牌图像的亮度图像的亮度直方图,生成gamma校正曲线;
步骤A2:按照该gamma校正曲线调整该亮度图像,得到目标亮度图像。
该本具体实现方式中,是采用gamma校正(即伽玛校正)方法对待处理车牌图像的亮度图像进行对比度增强处理,得到目标亮度图像的。其中,所谓gamma校正方法为:对图像的伽玛曲线进行编辑,以对图像进行非线性色调编辑的方法,具体的,检测出图像信号中的深色部分和浅色部分,并使两者比例增大,从而提高图像对比度效果。
其中,亮度直方图以分布图的形式来表征待处理车牌图像的亮度图像的亮度分布。具体的,亮度直方图的横轴表示图像亮度,纵轴表示像素数,即处于某个亮度范围内的像素的相对数量,其中,所谓相对数量为:处于某个亮度范围内的像素在车牌图像的亮度图像的全部像素中所占的比例。亮度直方图的左端表示亮度最暗,右端表示最亮,即横轴由左向右表示图像亮度从最暗逐渐过渡到最亮。这样,通过待处理车牌图像的亮度图像的亮度直方图,便可以对上述亮度图像的明暗程度、亮度分布等有一个较为准确的了解。
这样,在本具体实现方式中,在得到待处理车牌图像的亮度图像后,便可以确定该亮度图像中处于各个亮度范围内的像素的相对数量,进而,得到该亮度图像的亮度直方图。然后,便可以利用所得到的亮度直方图,生成gamma校正曲线。
其中,由于gamma校正曲线是利用待处理车牌图像的亮度图像的亮度直方图应生成的,因此,所生成的gamma校正曲线与待处理车牌图像的亮度图像具有唯一对应性。
具体的,所生成的gamma校正曲线的函数表达式为:
G(x)=255*(x/255) h(x)
其中,G(x)=255*(x/255) h(x),f1(x)=acos(πx/2x m),x为灰度级,G(x)为gamma校正曲线,x m为图像亮度均值,a=∑hist(min_val:max_val),hist是亮度直方图,其中min_val,max_val为经验值,在具体应用中,min_val∈[10,70],max_val∈[180,240]。
其中,hist(min_val:max_val)为一个1*n的矩阵,n=max_val-min_val+1,hist(min_val:max_val)中的第一个元素为min_val,第二个元素为min_val+1,第三个元素为min_val+2,以此类推,直至第n个元素为max_val。进一步的,a=∑hist(min_val:max_val)计算得到的结果为根据亮度直方图计算得到的,车牌图像的亮度图像中处于矩阵hist(min_val:max_val)包括的各个亮度的像素的相对数量之和。
也就是说,在确定min_val和max_val后,根据亮度直方图,计算亮度在min_val和max_val范围内的像素在车牌图像的亮度图像的全部像素中所在的比例。
进一步的,在生成gamma校正曲线后,便可以按照该gamma校正曲线调整该亮度图像,得到目标亮度图像。
需要说明的是,上述所给出的对待处理车牌图像对应的亮度图像进行对比度增强处理的具体实现方式仅仅作为示例,并不应该构成对本申请实施例的限定,在具体应用中,还可以采用其他方式来提高待处理车牌图像对应的亮度图像的对比度。
S103,生成该目标亮度图像对应的多个二值化图像;
其中,不同二值化图像对应不同的亮度域值区间。
S104:针对每一二值化图像,基于该待处理车牌图像中牌底与字体的亮度关系,确定该二值化图像中与牌底相关的第一类像素点和与字体相关的第二类像素点,并从该目标亮度图像中确定与该第一类像素点位置对应的第三类像素点和与该第二类像素点位置对应的第四类像素点,按照该第三类像素点的去噪强度高于该第四类像素点的去 噪强度的去噪规则,对该目标亮度图像进行去噪;
由于在对待处理图像对应的亮度图像进行对比度增强处理时,会引进新的噪声,因此,车牌增强过程中,在对待处理车牌图像的亮度图像进行对比度增强处理之后,需要进行去噪处理,以在一定程度上去除原有噪声和新引进的噪声,从而达到较好的车牌增强效果。
本申请实施例中,为了在降低牌底噪声的同时保证字体的清晰度,在去噪时,可以对亮度不同的牌底和字体进行区分去噪,并使字体的去噪强度低于牌底的去噪强度。具体的,在获得目标亮度图像后,该车牌增强装置可以生成将该目标亮度图像的多个二值化图像,进而,针对每一二值化图像,对该目标亮度图像进行去噪,得到多个去噪后的目标亮度图像。这样,可以达到对不同亮度的字体和牌底进行区分去噪的效果。
其中,在不同牌底颜色的车牌图像中,可以根据车牌的牌底颜色确定该车牌图像中牌底和字体的亮度关系。也就是说,在待处理车牌图像中,与牌底相关的像素点的亮度和与字体相关的像素点的亮度之间存在大小关系,且该关系是根据待处理车牌图像中车牌的牌底颜色确定的。进而,可以确定在待处理车牌图像的目标亮度图像中,与牌底相关的像素点的亮度和与字体相关的像素点的亮度之间存在大小关系。
进一步的,由于每一二值化图像中各个像素点所具有的数值只有两类,且每个像素点所具有的数值是基于目标亮度图像中各个点的亮度与该二值化图像对应的亮度域值区间确定的。即在目标亮度图像中,亮度属于该亮度域值区间的像素点在该二值化图像中位置对应的像素点具有相同的一数值,亮度不属于该亮度域值区间的像素点在该二值化图像中位置对应的像素点具有相同的另一数值。因此,从统计学角度考虑,针对每一二值化图像,可以认为该二值化图像中具有相同数值的像素点是与同一对象相关的像素点,而该对象可以为牌底或者字体。基于此,便可以根据该二值化图像中各个像素点所具有的数据以及待处理车牌图像中牌底与字体的亮度关系,确定该二值化图像中 与牌底相关的第一类像素点和与字体相关的第二类像素点。
例如,假设:待处理车牌图像中牌底颜色为蓝色,则在该待处理车牌图像中牌底的亮度低于字体的亮度。生成该待处理车牌图像所对应的二值化图像1的生成方式是:将目标亮度图像中亮度低于数值A的像素点的灰度值设置为255,亮度不低于数值A的像素点的灰度值设置为0。显然,由于在该待处理车牌图像中牌底的亮度低于字体的亮度,则从统计学角度考虑,可以将目标亮度图像中亮度低于数值A的像素点认为是与待处理车牌图像中牌底相关的像素点,将亮度不低于数值A的像素点认为是与待处理车牌图像中字体相关的像素点。也就是说,可以确定在该二值化图像1中,灰度值为255的像素点为与牌底相关的第一类像素点,灰度值为0的像素点为与字体相关的第二类像素点。
进一步的,在确定该二值化图像中与牌底相关的第一类像素点和与字体相关的第二类像素点后,便可以确定每个第一类像素点和每个第二类像素点在该二值化图像中的坐标位置。进而,针对每个第一类像素点,便可以在目标亮度图像中确定与该第一类像素点的位置相同的像素点,作为第三类像素点。同样的,针对每个第二类像素点,便可以在目标亮度图像中确定与该第二类像素点的位置相同的像素点,作为第四类像素点。
显然,由于第一类像素点是二值化图像中与牌底相关的像素点,第二类像素点是二值化图像中与字体相关的像素点。则第三类像素点是目标亮度图像中与牌底相关的像素点,第四类像素点是目标亮度图像中与字体相关的像素点。
进一步的,由于为了在降低牌底噪声的同时保证字体的清晰度,在对目标亮度图像进行去噪时,可以使字体的去噪强度低于牌底的去噪强度。并且,第三类像素点是目标亮度图像中与牌底相关的像素点,第四类像素点是目标亮度图像中与字体相关的像素点。因此,为了保证字体的去噪强度低于牌底的去噪强度,在对目标亮度图像去噪时,便可以按照第三类像素点的去噪强度高于第四类像素点的去噪强度 的去噪规则,对目标亮度图像中的各个像素点进行去噪。即在针对每一二值化图像,对目标亮度图像进行去噪时,目标亮度图像中各个像素点的去噪强度关系满足:与牌底相关像素点的去噪强度高于与字体相关像素点的去噪强度。
其中,为了保证目标亮度图像中各个像素点的去噪强度关系满足:与牌底相关像素点的去噪强度高于与字体相关像素点的去噪强度,针对每一二值化图像,目标亮度图像中的各个像素点的去噪强度关系的具体表现如下:
当待处理车牌图像中,牌底的亮度低于字体亮度时:
如果各个二值化图像中不存在重复像素,则所对应亮度域值区间越低的二值化图像对应的去噪强度越高,所对应亮度域值区间越高的二值化图像对应的去噪强度越低,即对于任意两个二值化图像A和B,如果二值化图像A所对应的亮度域值区间低于二值化图像B所对应的亮度域值区间,那么,二值化图像A对应的去噪强度高于二值化图像B对应的去噪强度。而如果各个二值化图像中存在重复像素,且与牌底相关的像素点的重复频率高于与字体相关的像素点的重复频率,则各个二值化图像所对应的去噪强度可以相同,即采用相同的去噪参数;也可以不同,即所对应亮度域值区间越低的二值化图像对应的去噪强度越高,所对应亮度域值区间越高的二值化图像对应的去噪强度越低。
当待处理车牌图像中,牌底的亮度高于字体亮度时:
如果各个二值化图像中不存在重复像素,则所对应亮度域值区间越低的二值化图像对应的去噪强度越低,所对应亮度域值区间越高的二值化图像对应的去噪强度越高,即对于任意两个二值化图像C和D,如果二值化图像C所对应的亮度域值区间低于二值化图像D所对应的亮度域值区间,那么,二值化图像C对应的去噪强度低于二值化图像D对应的去噪强度。而如果各个二值化图像中存在重复像素,且与牌底相关的像素点的重复频率高于与字体相关的像素点的重复频率,则各个二值化图像所对应的去噪强度可以相同,即采用相同的 去噪参数;也可以不同,即所对应亮度域值区间越低的二值化图像对应的去噪强度越低,所对应亮度域值区间越高的二值化图像对应的去噪强度越高。
可以理解的是,对于各个二值化图像中存在重复像素,且与牌底相关的像素点的重复频率高于与字体相关的像素点的重复频率,在针对每一二值化图像对目标亮度图像进行去噪时,由于与牌底相关的像素点出现的频率较高,因此,对与牌底相关的像素点的去噪次数高于对与字体相关的像素点的去噪次数。这样,即使各个二值化图像中所对应的去噪强度可以相同,也可以保证与牌底相关像素点的去噪强度高于与字体相关像素点的去噪强度。
另外,需要强调的是,针对每一二值化图像对目标亮度图像进行去噪的方式可以为:对目标亮度图像中的各个像素点分别进行滤波,其中,滤波参数是影响去噪强度的因素。并且,本申请实施例所采用的去噪算法可以包括但不局限于高斯去噪算法。其中,高斯去噪算法的函数表达式如下:
Figure PCTCN2019082542-appb-000001
其中,binaryH i为二值化图像i,G(w ii)为二值化图像i对应的高斯卷积核且属于常数值,x和y为像素点对应的图像坐标位置,Y(x,y)为图像坐标位置为(x,y)的像素点在目标亮度图像中的亮度。
需要说明的是,对于不同图像模板的滤波程度不同时,不同二值化图像i所对应的w i可以相同,而所对应的σ i可以不同,σ i的取值可以范围可以为:σ i∈[0.4,1.0],具体的:
在待处理车牌图像中,牌底的亮度低于字体的亮度时:如果随着i的增大二值化图像所对应的亮度域值区间越高,则σ i随着i的增大逐渐降低;而待处理车牌图像中,牌底的亮度高于字体的亮度时,如果随着i的增大二值化图像所对应的亮度域值区间越高,则σ i随着i的增大逐渐升高。
为了方案清晰及布局清楚,后续结合具体实施例介绍生成该目标 亮度图像对应的多个二值化图像的具体实现方式。
S105:基于各个去噪后的目标亮度图像,生成车牌增强后的亮度图像,
S106:基于车牌增强后的亮度图像,生成车牌增强后的车牌图像。
其中,在针对各个二值化图像,对目标亮度图像进行去噪后,可以基于各个去噪后的目标亮度图像来生成车牌增强后的亮度图像,进而基于车牌增强后的亮度图像,确定该待处理图像所对应的车牌增强后的车牌图像。
具体的,在获得车牌增强后的亮度图像后,可以基于该车牌增强后的亮度图像、待处理车牌图像对应的UV空间的图像,生成车牌增强后的车牌图像。其中,该车牌增强后的车牌图像的色彩模式与待处理车牌图像的色彩模式相同。
其中,在基于各个去噪后的目标亮度图像来生成车牌增强后的亮度图像时:如果各个二值化图像中不存在重复像素,那么可以直接将该各个去噪后的目标亮度图像进行累加,并对累加结果进行归一化处理,从而得到车牌增强后的亮度图像;而如果各个二值化图像中存在重复像素,那么可以将各个去噪后的目标亮度图像进行加权融合,并对加权融合后的结果进行归一化处理,从而得到车牌增强后的亮度图像。其中,加权融合的融合权重可以包括但不局限于经验值。
本申请实施例所提供的车牌增强方法中,在对待处理车牌图像对应的亮度图像进行对比度增强处理从而得到目标亮度图像后,生成该目标亮度图像对应的多个二值化图像,并针对每一二值化图像,基于待处理车牌图像中牌底与字体的亮度关系,确定该二值化图像中与牌底相关的第一类像素点和与字体相关的第二类像素点,并从目标亮度图像中确定与第一类像素点位置对应的第三类像素点和与第二类像素点位置对应的第四类像素点,按照第三类像素点的去噪强度高于第四类像素点的去噪强度的去噪规则,对目标亮度图像进行去噪;进而基于各个去噪后的目标亮度图像,生成车牌增强后的亮度图像,并基于车票增强后的亮度图像,生成车牌增强后的车牌图像;可见,本方 案可以对亮度不同的牌底和字体进行区分,并使字体的去噪强度低于牌底的去噪强度,因此,实现了在保证车牌字体和牌底对比度要求的前提下,降低牌底噪声的同时保证字体的清晰度的目的。
下面结合具体实施例,对本申请实施例所提供的一种车牌增强方法进行介绍。
如图2所示,本申请实施例所提供的一种车牌增强方法,可以包括如下步骤:
S201,获得待处理车牌图像;
S202,对该待处理车牌图像对应的亮度图像进行对比度增强处理,得到目标亮度图像;
本实施例中,S201-S202与上述实施例中的S101-S102相同,在此不做赘述。
S203,从该目标亮度图像的亮度归一化直方图的多个灰度值中,确定用于二值化图像生成的多个分割值;
本实施例中,S203-S204是上述实施例S103中生成该目标亮度图像对应的多个二值化图像的具体实现方式。
为了生成该目标亮度图像的多个二值化图像,该车牌增强装置在获得目标亮度图像后,考虑到牌底和字体亮度不同,因此,可以首先从该目标亮度图像的亮度归一化直方图的多个灰度值中,确定用于二值化图像生成的多个分割值,进而后续基于该多个分割值来生成多个二值化图像。其中,一个分割值即为一个灰度值。
为了方便理解方案,图3(a)和(b)分别给出了亮度归一化直方图中的分割值的示意图,垂直横坐标的竖线表示分割值所在的位置,即直方图分割边界。
其中,可以存在多种从该目标亮度图像的亮度归一化直方图的多个灰度值中,确定用于二值化图像生成的多个分割值的方式。
可选地,在一种具体实现方式中,所述从该目标亮度图像的亮度归一化直方图的多个灰度值中,确定用于二值化图像生成的多个分割 值的步骤,可以包括如下步骤B1:
步骤B1:通过大数据分析从该目标亮度图像的亮度归一化直方图的多个灰度值中,确定用于二值化图像生成的多个分割值。
显然,在本具体实现方式中,是基于经验值确定的上述多个分割值,也就是说,所确定的多个分割值是确定的经验值,这样,在每次得到目标亮度图像后,可以直接从该目标亮度图像的亮度归一化直方图的多个灰度值中,确定用于二值化图像生成的的多个分割值。其中,针对不同种类的车牌,所确定的多个分割值的取值可以不同。
可选地,在一种具体实现方式中,所述从该目标亮度图像的亮度归一化直方图的多个灰度值中,确定用于二值化图像生成的多个分割值的步骤,可以包括如下步骤C1-C3:
步骤C1:对该目标亮度图像的亮度归一化直方图进行二次求导;
步骤C2:将二次求导所得的极小值点,作为该目标亮度图像的亮度归一化直方图所对应的单峰波谷备选点;
步骤C3:从所确定的单峰波谷备选点中,获得用于二值化图像生成的多个分割值。
在本具体实现方式中,在对该待处理车牌图像对应的亮度图像进行对比度增强处理,得到目标亮度图像后,便可以生成该目标亮度图像的亮度归一化直方图。进而,便可以对该亮度归一化直方图进行二次求导,并将二次求导所得的极小值作为该目标亮度图像的亮度归一化直方图所对应的单峰波谷备选点。并进一步的,从所确定的单峰波谷备选点中,获得用于二值化图像生成的多个分割值。
其中,对目标亮度图像的亮度归一化直方图进行二次求导所得到的结果为该亮度归一化直方图曲线的拐点,即所得到的单峰波谷备选点是该亮度归一化直方图曲线的拐点,其所表示的是表述的目标亮度图像中各个像素点的亮度分布的凹凸性。由于亮度归一化直方图曲线不是绝对平滑或者能用某个函数表达的,因此,在对目标亮度图像的亮度归一化直方图进行二次求导时,二阶导数为0时所得到的结果并不一定全部可以用于生成二值化图像,因此,只能作为单峰波谷备选 点。并且,这些单峰波谷备选点中包含了目标亮度图像中各个像素点的亮度分布中凹形分布对应的点,而在本申请实施例中,所确定的分割值对应的单峰波谷备选点可以只是目标亮度图像中各个像素点的亮度分布中凸形分布对应的点。基于此,可以在后续提供如何从所确定的单峰波谷备选点中,获得用于二值化图像生成的多个分割值的具体实现方式。
具体的,在获得多个单峰波谷备选点后,可以存在多种选取规律,用于按照某种特定的选取规律,从所确定的单峰波谷备选点中,获得用于二值化图像生成的多个分割值。
其中,在一种具体实现方式,可以通过随机方式从单峰波谷备选点中选取某些单峰波谷备选点。
其中,在另一种具体实现方式中,所述从所确定的单峰波谷备选点中,获得用于二值化图像生成的多个分割值的步骤,可以包括如下步骤D1-D3:
步骤D1:构建包含所确定的单峰波谷备选点的集合;
步骤D2:针对该集合中每对相邻的单峰波谷备选点,拟合该对单峰波谷备选点间的至少一类分布曲线,计算该至少一类分布曲线与该对单峰波谷备选点间的直方图曲线的相似度。
其中,该对单峰波谷备选点间的直方图曲线为:目标亮度图像的亮度归一化直方图中,该对单峰波谷备选点间所对应的亮度归一化直方图曲线。进一步的,当所计算出的相似度中的最大值大于预定相似度阈值时,将该对单峰波谷备选点确定为用于生成目标亮度图像的二值化图像的分割值,否则,将该对单峰波谷备选点中的值较大的单峰波谷备选点从该目标集合中去除;
步骤D3:返回执行针对该集合中每对相邻的单峰波谷备选点,拟合该对单峰波谷备选点间的至少一类分布曲线的步骤,直至该集合中所有单峰波谷备选点均作为用于二值化图像生成的分割值。
其中,记单峰波谷备选点的数量为L,每个单峰波谷备选点为h j,其中,1≤j≤L,则单峰波谷备选点的集合为peakP={h 1,…,h L}。在该 集合中,各个单峰波谷备选点的数值逐渐增大。其中,假设h 1、h 2、h 3、…、h L的数值逐渐增大,则h 1和h 2可以作为一对相邻的单峰波谷备选点,h 2和h 3可以作为一对相邻的单峰波谷备选点,以此类推,可以确定该集合中每对相邻的单峰波谷备选点。
这样,针对上述集合中的每对相邻的单峰波谷备选点,便可以拟合该对单峰波谷备选点间的至少一类分布曲线。具体的:
确定该对单峰波谷备选点备选间的至少一类分布曲线的拟合参数,基于拟合参数得到至少一类分布曲线。其中,确定各个拟合参数的方式可以包括但不局限于最大似然方法。
而在得到上述至少一类分布曲线后,便可以计算该至少一类分布曲线与该对单峰波谷备选点备选间的直方图曲线的相似度。其中,计算至少一类分布曲线与该对单峰波谷备选点间的直方图曲线的相似度的方式可以包括但不局限于相关系数法。
进而,判断所计算出的相似度中的最大值是否大于预定相似度阈值,并在判断结果为是时,将该对单峰波谷备选点确定为用于生成目标亮度图像的二值化图像的分割值;否则,便将该对单峰波谷备选点中的值较大的单峰波谷备选点从上述集合中去除。进而,针对下一对相邻的单峰波谷备选点执行上述过程。直至针对上述集合中所剩余的所有单峰波谷备选点中的任一对相邻的单峰波谷备选点,拟合得到的该对单峰波谷备选点间的至少一类分布曲线与该对单峰波谷备选点间的直方图曲线的多个相似度的最大值大于预定相似度阈值,即上述集合中所剩余的所有单峰波谷备选点均可以作为用于生成目标亮度图像的二值化图像的分割值。
需要说明的是,本具体实现方式中,是以单峰分布函数拟合亮度归一化直方图中的单峰,将每个单峰作为一层的判定边界的,而由于在实际的亮度归一化直方图中,每个单峰并不一定是对称的,因此在确定用于生成目标亮度图像的二值化图像的分割值时可以采用至少一类分布函数,即采用分布集合。并且,经发明人分析得知,高斯分布曲线、柯西分布曲线和韦伯分布曲线三类曲线可以涵盖大量车牌亮 度图像的亮度归一化直方图的波形曲线,因此,所述拟合该对单峰波谷备选点间的至少一类分布曲线的步骤,可以包括:拟合该对单峰波谷备选点间的高斯分布曲线、柯西分布曲线和韦伯分布曲线中的至少一类曲线。关于三类分布曲线的函数表达式如下:
高斯分布:
Figure PCTCN2019082542-appb-000002
柯西分布:
Figure PCTCN2019082542-appb-000003
韦伯分布:W(x)=kx k-1exp(-(x) k)。
其中,x为该目标亮度图像的亮度归一化直方图中的横坐标,取值范围为拟合区段所对应的横坐标范围,μ为拟合区段内最大值对应的横坐标;σ、μ为高斯分布的拟合参数,γ为柯西分布的拟合参数,k为韦伯分布的拟合参数。
为了方便理解,以相邻的两个单峰波谷备选点h j和h j+1为例介绍下该种具体实现方式:
h j和h j+1可以作为一个拟合区段,拟合区段的横坐标范围为[h j,h j+1],利用最大似然方法估计各个分布曲线的拟合参数,从而得到三类分布曲线:
Figure PCTCN2019082542-appb-000004
然后,计算各个分布曲线与该对单峰波谷备选点间的直方图曲线
Figure PCTCN2019082542-appb-000005
的相似度;当所计算出的相似度中的最大值大于预定相似度阈值时,将该对单峰波谷备选点h j和h j+1确定为用于生成目标亮度图像的二值化图像的分割值,否则,将该对单峰波备选点中的值较大的单峰波谷备选点h j+1从该集合中去除,此时,集合中h j和h j+2为相邻两个单峰波谷,即后续可以将h j和h j+2可以作为一个拟合区段。
需要说明的是,上述所给出的从目标亮度图像的亮度归一化直方图的多个灰度值中,确定用于二值化图像生成的多个分割值的具体实现方式仅仅作为示例,并不应该构成对本申请实施例的限定,在具体 应用中,还可以采用其他方式来从目标亮度图像的亮度归一化直方图的多个灰度值中,确定用于二值化图像生成的多个分割值。
S204,基于该多个分割值,生成该目标亮度图像对应的多个二值化图像;
在确定出多个分割值后,可以基于该多个亮度分割点,生成该目标亮度图像对应的多个二值化图像。
其中,可以存在多种生成该目标亮度图像对应的多个二值化图像的方式。
可选地,在一种具体实现方式中,所述基于该多个分割值,生成该目标亮度图像对应的多个二值化图像的步骤,可以包括如下步骤E1:
步骤E1:针对每一分割值,以该分割值作为二值化处理所需的亮度阈值,对该目标亮度图像进行二值化处理,得到二值化图像。
其中,通过上述步骤E1得到的多个二值化图像中,与牌底相关像素点的重复频率高于与字体相关像素点的重复频率。
举例而言:假设分割值为50,100,150,200,且字体的亮度高于牌底的亮度,对于以分割值作为二值化处理所需的亮度阈值的选取方式而言,二值化图像的生成过程为:选取目标亮度图像中灰度值不大于50的像素点生成一个二值化图像,选取目标亮度图像中灰度值不大于100的像素点生成一个二值化图像,选取目标亮度图像中灰度值不大于150的像素点生成一个二值化图像,选取目标亮度图像中灰度值不大于200的像素点生成一个二值化图像。
具体的,该二值化图像的生成过程可以为:
将目标亮度图像中灰度值不大于50的像素点的灰度值设置为255,其他像素点的灰度值设置为0,得到一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值不大于100的像素点的灰度值设置为255,其他像素点的灰度值设置为0,得到另一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值不大于150的像素点的灰度值设置为255,其他像素点的灰度值设置为0,得到 再一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值不大于200的像素点的灰度值设置为255,其他像素点的灰度值设置为0,得到再一个只有黑和白的视觉效果的二值化图像。
或者,预设当像素点的逻辑值为1时,像素点的视觉效果为黑,当像素点的逻辑主线为0时,像素点的视觉效果为白;则该二值化图像的生成过程可以为:
将目标亮度图像中灰度值不大于50的像素点的逻辑值设置为1,其他像素点的逻辑值设置为0,得到一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值不大于100的像素点的逻辑值设置为1,其他像素点的逻辑值设置为0,得到另一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值不大于150的像素点的逻辑值设置为1,其他像素点的逻辑值设置为0,得到再一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值不大于200的像素点的逻辑值设置为1,其他像素点的逻辑值设置为0,得到再一个只有黑和白的视觉效果的二值化图像。
又如:假设分割值为50,100,150,200,且字体的亮度低于牌底的亮度,对于以分割值作为二值化处理所需的亮度阈值的选取方式而言,二值化图像的生成过程为:选取目标亮度图像中灰度值大于50的像素点生成一个二值化图像,选取目标亮度图像中灰度值大于100的像素点生成一个二值化图像,选取目标亮度图像中灰度值大于150的像素点生成一个二值化图像,选取目标亮度图像中灰度值大于200的像素点生成一个二值化图像。
具体的,该二值化图像的生成过程可以为:
将目标亮度图像中灰度值大于50的像素点的灰度值设置为255,其他像素点的灰度值设置为0,得到一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值大于100的像素点的灰度值设置为255,其他像素点的灰度值设置为0,得到另一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值大于150的像素点的灰度值设置为255,其他像素点的灰度值设置为0,得到再一个只有 黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值大于200的像素点的灰度值设置为255,其他像素点的灰度值设置为0,得到再一个只有黑和白的视觉效果的图像模板二值化图像。
或者,预设当像素点的逻辑值为1时,像素点的视觉效果为黑,当像素点的逻辑主线为0时,像素点的视觉效果为白;则该二值化图像的生成过程可以为:
将目标亮度图像中灰度值大于50的像素点的逻辑值设置为1,其他像素点的逻辑值设置为0,得到一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值大于100的像素点的逻辑值设置为1,其他像素点的逻辑值设置为0,得到另一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值大于150的像素点的逻辑值设置为1,其他像素点的逻辑值设置为0,得到再一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值大于200的像素点的逻辑值设置为1,其他像素点的逻辑值设置为0,得到再一个只有黑和白的视觉效果的二值化图像。
可选地,在一种具体实现方式中,所述基于该多个分割值,生成该目标亮度图像对应的多个二值化图像的步骤,可以包括如下步骤F1:
步骤F1:针对每一亮度分割点,确定该分割值和该分割值对应的第一邻近分割值之间的第一区间,以第一区间作为二值化处理所需的亮度域值区间,对该目标亮度图像进行二值化处理,得到二值化图像;
其中,第一邻近分割值为:小于该分割值的各个分割值中数值最大的分割值;
例如:假设分割值为50,100,150,200,二值化图像的生成过程为:确定各个第一区间分别为:(0,50],(50,100],(100,150]和(150,200]。则选取目标亮度图像中灰度值在范围(0,50]的像素点生成一个二值化图像,选取目标亮度图像中灰度值在范围(50,100]的像素点生成一个二值化图像,选取目标亮度图像中灰度值在范围 (100,150]的像素点生成一个二值化图像,选取目标亮度图像中灰度值在范围(150,200]的像素点构建一个生成一个二值化图像。
具体的,该二值化图像的生成过程可以为:
将目标亮度图像中灰度值在范围(0,50]的像素点的灰度值设置为255,其他像素点的灰度值设置为0,得到一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值在范围(50,100]的像素点的灰度值设置为255,其他像素点的灰度值设置为0,得到另一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值在范围(100,150]的像素点的灰度值设置为255,其他像素点的灰度值设置为0,得到一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值在范围(150,200]的像素点的灰度值设置为255,其他像素点的灰度值设置为0,得到再一个只有黑和白的视觉效果的二值化图像。
或者,预设当像素点的逻辑值为1时,像素点的视觉效果为黑,当像素点的逻辑主线为0时,像素点的视觉效果为白;则该二值化图像的生成过程可以为:
将目标亮度图像中灰度值在范围(0,50]的像素点的逻辑值设置为1,其他像素点的逻辑值设置为0,得到一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值在范围(50,100]的像素点的逻辑值设置为1,其他像素点的逻辑值设置为0,得到另一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值在范围(100,150]的像素点的逻辑值设置为1,其他像素点的逻辑值设置为0,得到再一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值在范围(150,200]的像素点的逻辑值设置为1,其他像素点的逻辑值设置为0,得到再一个只有黑和白的视觉效果的二值化图像。
可选地,在一种具体实现方式,所述基基于该多个分割值,生成该目标亮度图像对应的多个二值化图像的步骤,可以包括如下步骤G1:
步骤G1:针对每一亮度分割点,确定该分割值和该分割值对应 的第二邻近分割值之间的第二区间,以第二区间作为二值化处理所需的亮度域值区间,对该目标亮度图像进行二值化处理,得到二值化图像;
其中,第二邻近分割值为:大于该分割值的各个分割值中数值最小的分割值。
例如:假设分割值为50,100,150,200,二值化图像的生成过程为:确定各个第二区间分别为:[50,100),[100,150),[150,200)和[200,255)。则选取目标亮度图像中灰度值在范围[50,100)的像素点生成一个二值化图像,选取目标亮度图像中灰度值在范围[100,150)的像素点生成一个二值化图像,选取目标亮度图像中灰度值在范围[150,200)的像素点生成一个二值化图像,选取目标亮度图像中灰度值在范围[200,255)的像素点成一个二值化图像。
具体的,该二值化图像的生成过程可以为:
将目标亮度图像中灰度值在范围[50,100)的像素点的灰度值设置为255,其他像素点的灰度值设置为0,得到一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值在范围[100,150)的像素点的灰度值设置为255,其他像素点的灰度值设置为0,得到另一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值在范围[150,200)的像素点的灰度值设置为255,其他像素点的灰度值设置为0,得到一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值在范围[200,255)的像素点的灰度值设置为255,其他像素点的灰度值设置为0,得到再一个只有黑和白的视觉效果的二值化图像。
或者,预设当像素点的逻辑值为1时,像素点的视觉效果为黑,当像素点的逻辑主线为0时,像素点的视觉效果为白;则该二值化图像的生成过程可以为:
将目标亮度图像中灰度值在范围[50,100)的像素点的逻辑值设置为1,其他像素点的逻辑值设置为0,得到一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值在范围[100,150)的像素点 的逻辑值设置为1,其他像素点的逻辑值设置为0,得到另一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值在范围[150,200)的像素点的逻辑值设置为1,其他像素点的逻辑值设置为0,得到再一个只有黑和白的视觉效果的二值化图像;将目标亮度图像中灰度值在范围[200,255)的像素点的逻辑值设置为1,其他像素点的逻辑值设置为0,得到再一个只有黑和白的视觉效果的二值化图像。
需要强调的是,上述的基于该多个分割值,生成该目标亮度图像对应的多个二值化图像的具体实现方式仅仅作为示例,并不应该构成对本申请实施例的限定。
S205,针对每一二值化图像,基于该待处理车牌图像中牌底与字体的亮度关系,确定该二值化图像中与牌底相关的第一类像素点和与字体相关的第二类像素点,并从该目标亮度图像中确定与该第一类像素点位置对应的第三类像素点和与该第二类像素点位置对应的第四类像素点,按照该第三类像素点的去噪强度高于该第四类像素点的去噪强度的去噪规则,对该目标亮度图像进行去噪;
其中,本实施例中S205与上述实施例中S104中针对每一二值化图像,对该目标亮度图像进行去噪的实现方式相同,在此不做赘述。
S206,基于各个去噪后的目标亮度图像,生成车牌增强后的亮度图像;
S207,基于车牌增强后的亮度图像,生成车牌增强后的车牌图像。
其中,在针对每一二值化图像,对该目标亮度图像进行去噪后,可以基于各个去噪后的目标亮度图像来生成车牌增强后的亮度图像,进而基于车牌增强后的亮度图像,确定该待处理图像所对应的车牌增强后的车牌图像。
可选地,一种具体实现方式中,如果各个二值化图像中不存在重复像素,那么可以直接将该各个去噪后的目标亮度图像进行累加,并对累加结果进行归一化处理,从而得到车牌增强后的亮度图像;
可选地,一种具体实现方式中,如果各个二值化图像中存在重复像素,那么可以将各个去噪后的目标亮度图像进行加权融合,并对加 权融合后的结果进行归一化处理,从而得到车牌增强后的亮度图像。其中,加权融合的融合权重可以包括但不局限于经验值。
具体的,对于上述基于该多个分割值,生成该目标亮度图像对应的多个二值化图像的方式而言,可以对各个去噪后的目标亮度图像进行加权融合,得到车牌增强后的亮度图像;其中,任一图像模板所对应的融合权重是基于亮度归一化直方图中,该去噪后的目标亮度图像对应的各个亮度值的纵坐标所确定的,该去噪后的目标亮度图像对应的各个亮度值为:该去噪后的目标亮度图像对应的二值化图像所对应的亮度域值区间中的亮度值。当然,为了保证车牌增强后的亮度图像的灰度级位于[0,255],在对各个去噪后的目标亮度图像进行加权融合后,也可以对融合后的结果进行归一化处理,从而得到车牌增强后的亮度图像。
例如:对于字体的亮度高于牌底亮度的车牌(例如,车牌种类为蓝牌),融合权重
Figure PCTCN2019082542-appb-000006
其中,V i是二值化图像i对应的去噪后的目标亮度图像的融合权重,k是亮度归一化直方图的横坐标,hist(k)为亮度归一化直方图中横坐标k对应的纵坐标,m是二值化图像i所对应的分割值;相应的,加权融合结果
Figure PCTCN2019082542-appb-000007
FI i为二值化图像i对应的去噪后的目标亮度图像的去噪结果,i的取值从0至T,归一化结果imR=imC/∑V i,其中,imR灰度级选择[0,255]。
又例如,对于字体的亮度低于牌底亮度的车牌(例如,车牌种类为黄牌或者白牌),融合权重
Figure PCTCN2019082542-appb-000008
其中,V i是二值化图像i对应的去噪后的目标亮度图像的融合权重,k是亮度归一化直方图的横坐标,hist(k)为亮度归一化直方图中横坐标k对应的纵坐标,m是二值化图像i所对应的分割值;相应的,加权融合结果
Figure PCTCN2019082542-appb-000009
FI i为二值化图像i对应的去噪后的目标亮度图像去噪结果,i的取值从0至T,归一化结果imR=imC/∑V i,其中,imR灰度级选择[0,255]。
这样,在获得车牌增强后的亮度图像后,可以基于该车牌增强后的亮度图像、待处理车牌图像对应的UV空间的图像,生成车牌增强后的车牌图像。其中,该车牌增强后的车牌图像的色彩模式与待处理车牌图像的色彩模式相同。
为了方便理解本申请实施例所提供的方法的增强效果,给出了图4,其中,图4(a)为待处理车牌图像,图4(b)为利用本申请实施例所提供方法进行车牌增强后的车牌图像,可见,通过本申请所提供的方法可以实现在保证车牌字体和牌底对比度要求的前提下,降低牌底噪声的同时保证字体的清晰度。
可见,本方案可以对亮度不同的牌底和字体进行区分,并使字体的去噪强度低于牌底的去噪强度,因此,实现了在保证车牌字体和牌底对比度要求的前提下,降低牌底噪声的同时保证字体的清晰度的目的。
相应于上述方法实施例,本申请实施例还提供了一种车牌增强装置,如图5所示,该车牌增强装置,可以包括:
图像获得单元510,用于获得待处理车牌图像;
对比度增强单元520,用于对所述待处理车牌图像对应的亮度图像进行对比度增强处理,得到目标亮度图像;
图像分割单元530,用于生成所述目标亮度图像对应的多个二值化图像;其中,不同二值化图像对应不同的亮度域值区间;
去噪单元540,用于针对每一二值化图像,基于所述待处理车牌图像中牌底与字体的亮度关系,确定该二值化图像中与牌底相关的第一类像素点和与字体相关的第二类像素点,并从所述目标亮度图像中确定与所述第一类像素点位置对应的第三类像素点和与所述第二类像素点位置对应的第四类像素点,按照所述第三类像素点的去噪强度高于所述第四类像素点的去噪强度的去噪规则,对所述目标亮度图像进行去噪;
图像增强结果生成单元550,用于基于各个去噪后的目标亮度图像,生成车牌增强后的亮度图像
车牌增强结果生成单元560,用于用于基于车牌增强后的亮度图像,生成车牌增强后的车牌图像。
本申请实施例所提供的车牌增强装置,在对待处理车牌图像对应的亮度图像进行对比度增强处理从而得到目标亮度图像后,生成该目标亮度图像对应的多个二值化图像,并针对每一二值化图像,基于待处理车牌图像中牌底与字体的亮度关系,确定该二值化图像中与牌底相关的第一类像素点和与字体相关的第二类像素点,并从目标亮度图像中确定与第一类像素点位置对应的第三类像素点和与第二类像素点位置对应的第四类像素点,按照第三类像素点的去噪强度高于第四类像素点的去噪强度的去噪规则,对目标亮度图像进行去噪;进而基于各个去噪后的目标亮度图像,生成车牌增强后的亮度图像,并基于车牌增强后的亮度图像,生成车牌增强后的车牌图像。可见,本方案可以对亮度不同的牌底和字体进行区分,并使字体的去噪强度低于牌底的去噪强度,因此,实现了在保证车牌字体和牌底对比度要求的前提下,降低牌底噪声的同时保证字体的清晰度的目的。
可选地,所述图像分割单元530可以包括:
分割值确定子单元,用于从所述目标亮度图像的亮度归一化直方图的多个灰度值中,确定用于二值化图像生成的多个分割值;
分割子单元,用于基于所述多个分割值,生成所述目标亮度图像对应的多个二值化图像。
可选地,所述分割值确定子单元具体用于:
对所述目标亮度图像的亮度归一化直方图进行二次求导;
将二次求导所得的极小值点,作为所述目标亮度图像的亮度归一化直方图所对应的单峰波谷备选点;
从所确定的单峰波谷备选点中,获得用于二值化图像生成的多个分割值。
可选地,所述分割值确定子单元从所述目标亮度图像的亮度归一化直方图的多个灰度值中,确定用于二值化图像生成的多个分割值,具体为:
构建包含所确定的单峰波谷备选点的集合;
针对所述集合中每对相邻的单峰波谷备选点,拟合该对单峰波谷备选点间的至少一类分布曲线,计算所述至少一类分布曲线与该对单峰波谷备选点间的直方图曲线的相似度,当所计算出的相似度中的最大值大于预定相似度阈值时,将该对单峰波谷备选点确定为用于二值化图像生成的分割值,否则,将该对单峰波谷备选点中的值较大的单峰波谷备选点从所述目标集合中去除;
返回执行针对所述集合中每对相邻的单峰波谷备选点,拟合该对单峰波谷备选点间的至少一类分布曲线的步骤,直至所述集合中所有单峰波谷备选点均作为用于二值化图像生成的分割值。
可选地,所述分割子单元具体用于:
针对每一分割值,以该分割值作为二值化处理所需的亮度阈值,对所述目标亮度图像进行二值化处理,得到二值化图像。
可选地,所述分割子单元具体用于:
针对每一分割值,确定该分割值和该分割值对应的第一邻近分割值之间的第一区间,以第一区间作为二值化处理所需的亮度域值区间,对所述目标亮度图像进行二值化处理,得到二值化图像;其中,所述第一邻近分割值为:小于该分割值的各个分割值中数值最大的分割值;
或者,
针对每一分割值,确定该分割值和该分割值对应的第二邻近分割值之间的第二区间,以第二区间作为二值化处理所需的亮度域值区间,对所述目标亮度图像进行二值化处理,得到二值化图像;其中,所述第二邻近分割值为:大于该分割值的各个分割值中数值最小的分割值。
可选地,所述图像增强结果生成单元550具体用于:
对各个去噪后的目标亮度图像进行加权融合,得到车牌增强后的亮度图像;其中,任一去噪后的目标亮度图像所对应的融合权重是基于所述亮度归一化直方图中,该去噪后的目标亮度图像对应的各个亮度值的纵坐标所确定的,该去噪后的目标亮度图像对应的各个亮度值为:该去噪后的目标亮度图像对应的二值化图像所对应的亮度域值区 间中的亮度值。
相应于上述方法实施例,本申请实施例还提供了一种电子设备;如图6所示,所述电子设备包括:内部总线610、存储器(memory)620、处理器(processor)630和通信接口(Communications Interface)640;其中,所述处理器630、所述通信接口640、所述存储器620通过所述内部总线610完成相互间的通信;
其中,所述存储器620,用于存储车牌增强方法对应的机器可行指令;
所述处理器630,用于读取所述存储器620上的所述机器可读指令,并执行所述指令以实现本申请所提供的一种车牌增强方法。其中,一种车牌增强方法,包括:
获得待处理车牌图像;
对所述待处理车牌图像对应的亮度图像进行对比度增强处理,得到目标亮度图像;
生成所述目标亮度图像对应的多个二值化图像;其中,不同二值化图像对应不同的亮度域值区间;
针对每一二值化图像,基于所述待处理车牌图像中牌底与字体的亮度关系,确定该二值化图像中与牌底相关的第一类像素点和与字体相关的第二类像素点,并从所述目标亮度图像中确定与所述第一类像素点位置对应的第三类像素点和与所述第二类像素点位置对应的第四类像素点,按照所述第三类像素点的去噪强度高于所述第四类像素点的去噪强度的去噪规则,对所述目标亮度图像进行去噪;
基于各个去噪后的目标亮度图像,生成车牌增强后的亮度图像;
基于车牌增强后的亮度图像,生成车牌增强后的车牌图像。
本实施例中,关于车牌增强方法的具体步骤的相关描述可以参见本申请所提供方法实施例中的描述内容,在此不做赘述。
上述装置中各个单元的功能和作用的实现过程具体详见上述方 法中对应步骤的实现过程,在此不再赘述。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本申请方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (10)

  1. 一种车牌增强方法,其特征在于,包括:
    获得待处理车牌图像;
    对所述待处理车牌图像对应的亮度图像进行对比度增强处理,得到目标亮度图像;
    生成所述目标亮度图像对应的多个二值化图像;其中,不同二值化图像对应不同的亮度域值区间;
    针对每一二值化图像,基于所述待处理车牌图像中牌底与字体的亮度关系,确定该二值化图像中与牌底相关的第一类像素点和与字体相关的第二类像素点,并从所述目标亮度图像中确定与所述第一类像素点位置对应的第三类像素点和与所述第二类像素点位置对应的第四类像素点,按照所述第三类像素点的去噪强度高于所述第四类像素点的去噪强度的去噪规则,对所述目标亮度图像进行去噪;
    基于各个去噪后的目标亮度图像,生成车牌增强后的亮度图像;
    基于车牌增强后的亮度图像,生成车牌增强后的车牌图像。
  2. 根据权利要求1所述的方法,其特征在于,所述生成所述目标亮度图像对应的多个二值化图像的步骤,包括:
    从所述目标亮度图像的亮度归一化直方图的多个灰度值中,确定用于二值化图像生成的多个分割值;
    基于所述多个分割值,生成所述目标亮度图像对应的多个二值化图像。
  3. 根据权利要求2所述的方法,其特征在于,所述从所述目标亮度图像的亮度归一化直方图的多个灰度值中,确定用于二值化图像生成的多个分割值的步骤,包括:
    对所述目标亮度图像的亮度归一化直方图进行二次求导;
    将二次求导所得的极小值点,作为所述目标亮度图像的亮度归一化直方图所对应的单峰波谷备选点;
    从所确定的单峰波谷备选点中,获得用于二值化图像生成的多个分割值。
  4. 根据权利要求3所述的方法,其特征在于,所确定的单峰波谷备选点的数量为多个;所述从所确定的单峰波谷备选点中,获得用于二值化图像生成的多个分割值的步骤,包括:
    构建包含所确定的单峰波谷备选点的集合;
    针对所述集合中每对相邻的单峰波谷备选点,拟合该对单峰波谷备选点间的至少一类分布曲线,计算所述至少一类分布曲线与该对单峰波谷备选点间的直方图曲线的相似度,当所计算出的相似度中的最大值大于预定相似度阈值时,将该对单峰波谷备选点确定为用于二值化图像生成的分割值,否则,将该对单峰波谷备选点中的值较大的单峰波谷备选点从所述目标集合中去除;
    返回执行针对所述集合中每对相邻的单峰波谷备选点,拟合该对单峰波谷备选点间的至少一类分布曲线的步骤,直至所述集合中所有单峰波谷备选点均作为用于二值化图像生成的分割值。
  5. 根据权利要求4所述的方法,其特征在于,所述拟合该对单峰波谷备选点间的至少一类分布曲线的步骤,包括:
    拟合该对单峰波谷备选点间的高斯分布曲线、柯西分布曲线和韦伯分布曲线中的至少一类曲线。
  6. 根据权利要求2所述的方法,其特征在于,所述基于所述多个分割值,生成所述目标亮度图像对应的多个二值化图像的步骤,包括:
    针对每一分割值,以该分割值作为二值化处理所需的亮度阈值,对所述目标亮度图像进行二值化处理,得到二值化图像。
  7. 根据权利要求2所述的方法,其特征在于,所述基于所述多个分割值,生成所述目标亮度图像对应的多个二值化图像的步骤,包括:
    针对每一分割值,确定该分割值和该分割值对应的第一邻近分割值之间的第一区间,以第一区间作为二值化处理所需的亮度域值区间,对所述目标亮度图像进行二值化处理,得到二值化图像;其中,所述第一邻近分割值为:小于该分割值的各个分割值中数值最大的分割值;
    或者,
    针对每一分割值,确定该分割值和该分割值对应的第二邻近分割值之间的第二区间,以第二区间作为二值化处理所需的亮度域值区间,对所述目标亮度图像进行二值化处理,得到二值化图像;其中,所述第二邻近分割值为:大于该分割值的各个分割值中数值最小的分割值。
  8. 根据权利要求6所述的方法,其特征在于,所述各个去噪后的目标亮度图像,生成车牌增强后的亮度图像的步骤,包括:
    对各个去噪后的目标亮度图像进行加权融合,得到车牌增强后的亮度图像;其中,任一去噪后的目标亮度图像所对应的融合权重是基于所述亮度归一化直方图中,该去噪后的目标亮度图像对应的各个亮度值的纵坐标所确定的,该去噪后的目标亮度图像对应的各个亮度值为:该去噪后的目标亮度图像对应的二值化图像所对应的亮度域值区间中的亮度值。
  9. 一种车牌增强装置,其特征在于,包括:
    图像获得单元,用于获得待处理车牌图像;
    对比度增强单元,用于对所述待处理车牌图像对应的亮度图像进行对比度增强处理,得到目标亮度图像;
    图像分割单元,用于生成所述目标亮度图像对应的多个二值化图像;其中,不同二值化图像对应不同的亮度域值区间;
    去噪单元,用于针对每一二值化图像,基于所述待处理车牌图像中牌底与字体的亮度关系,确定该二值化图像中与牌底相关的第一类像素点和与字体相关的第二类像素点,并从所述目标亮度图像中确定与所述第一类像素点位置对应的第三类像素点和与所述第二类像素点位置对应的第四类像素点,按照所述第三类像素点的去噪强度高于所述第四类像素点的去噪强度的去噪规则,对所述目标亮度图像进行去噪;
    图像增强结果生成单元,用于基于各个去噪后的目标亮度图像,生成车牌增强后的亮度图像;
    车牌增强结果生成单元,用于基于车牌增强后的亮度图像,生成 车牌增强后的车牌图像。
  10. 一种电子设备,其特征在于,所述电子设备包括:内部总线、存储器、处理器和通信接口;其中,所述处理器、所述通信接口、所述存储器通过所述内部总线完成相互间的通信;
    其中,所述存储器,用于存储车牌增强方法对应的机器可行指令;
    所述处理器,用于读取所述存储器上的所述机器可读指令,并执行所述指令以实现权利要求1-8任一项所述的车牌增强方法。
PCT/CN2019/082542 2018-04-20 2019-04-12 一种车牌增强方法、装置及电子设备 WO2019201184A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810362070.X 2018-04-20
CN201810362070.XA CN110390643B (zh) 2018-04-20 2018-04-20 一种车牌增强方法、装置及电子设备

Publications (1)

Publication Number Publication Date
WO2019201184A1 true WO2019201184A1 (zh) 2019-10-24

Family

ID=68240413

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/082542 WO2019201184A1 (zh) 2018-04-20 2019-04-12 一种车牌增强方法、装置及电子设备

Country Status (2)

Country Link
CN (1) CN110390643B (zh)
WO (1) WO2019201184A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111797694A (zh) * 2020-06-09 2020-10-20 浙江大华技术股份有限公司 一种车牌检测方法及装置
CN111898599A (zh) * 2020-07-10 2020-11-06 浙江大华技术股份有限公司 一种车牌图像处理方法及装置
CN112133101A (zh) * 2020-09-22 2020-12-25 杭州海康威视数字技术股份有限公司 增强车牌区域的方法、装置、摄像装置、计算设备及存储介质
CN114511770A (zh) * 2021-12-21 2022-05-17 武汉光谷卓越科技股份有限公司 道路标识标牌识别方法
CN115797351A (zh) * 2023-02-08 2023-03-14 山东第一医科大学(山东省医学科学院) 一种光伏电池板的异常检测方法
CN116977230A (zh) * 2023-09-22 2023-10-31 济宁市质量计量检验检测研究院(济宁半导体及显示产品质量监督检验中心、济宁市纤维质量监测中心) 一种扫描电子显微镜图像优化增强方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111754440B (zh) * 2020-06-29 2023-05-05 苏州科达科技股份有限公司 车牌图像增强方法、系统、设备及存储介质
CN117593192B (zh) * 2024-01-18 2024-03-26 大连云间来客科技有限公司 一种妇科宫颈图像增强分析方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1085455A2 (en) * 1999-09-15 2001-03-21 Siemens Corporate Research, Inc. License plate recognition with an intelligent camera
CN103400121A (zh) * 2013-08-06 2013-11-20 河海大学 基于彩色二值化图像的车牌定位方法
CN106815587A (zh) * 2015-11-30 2017-06-09 浙江宇视科技有限公司 图像处理方法及装置
CN106886779A (zh) * 2017-02-15 2017-06-23 厦门大学 一种荧光显微图像二值化的自适应阈值方法
CN107358795A (zh) * 2017-07-17 2017-11-17 陈剑桃 一种有效的车牌识别系统

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101291384B (zh) * 2007-04-20 2010-05-26 致伸科技股份有限公司 图文分离及文字增强方法
CN100478993C (zh) * 2007-07-13 2009-04-15 天津大学 根据边缘和亮度特征进行自适应调整的图像增强方法
CN102271254B (zh) * 2011-07-22 2013-05-15 宁波大学 一种深度图像的预处理方法
CN104182947B (zh) * 2014-09-10 2017-04-26 安科智慧城市技术(中国)有限公司 一种低照度图像增强方法和系统
CN104616259B (zh) * 2015-02-04 2017-08-25 西安理工大学 一种噪声强度自适应的非局部均值图像去噪方法
CN105005973B (zh) * 2015-06-30 2018-04-03 广东欧珀移动通信有限公司 一种图像快速去噪的方法及装置
CN106504281B (zh) * 2016-12-02 2019-01-22 中国电子科技集团公司第四十四研究所 应用于cmos图像传感器的图像画质增强和滤波方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1085455A2 (en) * 1999-09-15 2001-03-21 Siemens Corporate Research, Inc. License plate recognition with an intelligent camera
CN103400121A (zh) * 2013-08-06 2013-11-20 河海大学 基于彩色二值化图像的车牌定位方法
CN106815587A (zh) * 2015-11-30 2017-06-09 浙江宇视科技有限公司 图像处理方法及装置
CN106886779A (zh) * 2017-02-15 2017-06-23 厦门大学 一种荧光显微图像二值化的自适应阈值方法
CN107358795A (zh) * 2017-07-17 2017-11-17 陈剑桃 一种有效的车牌识别系统

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111797694A (zh) * 2020-06-09 2020-10-20 浙江大华技术股份有限公司 一种车牌检测方法及装置
CN111797694B (zh) * 2020-06-09 2024-05-28 浙江大华技术股份有限公司 一种车牌检测方法及装置
CN111898599A (zh) * 2020-07-10 2020-11-06 浙江大华技术股份有限公司 一种车牌图像处理方法及装置
CN112133101A (zh) * 2020-09-22 2020-12-25 杭州海康威视数字技术股份有限公司 增强车牌区域的方法、装置、摄像装置、计算设备及存储介质
CN114511770A (zh) * 2021-12-21 2022-05-17 武汉光谷卓越科技股份有限公司 道路标识标牌识别方法
CN115797351A (zh) * 2023-02-08 2023-03-14 山东第一医科大学(山东省医学科学院) 一种光伏电池板的异常检测方法
CN116977230A (zh) * 2023-09-22 2023-10-31 济宁市质量计量检验检测研究院(济宁半导体及显示产品质量监督检验中心、济宁市纤维质量监测中心) 一种扫描电子显微镜图像优化增强方法
CN116977230B (zh) * 2023-09-22 2024-01-02 济宁市质量计量检验检测研究院(济宁半导体及显示产品质量监督检验中心、济宁市纤维质量监测中心) 一种扫描电子显微镜图像优化增强方法

Also Published As

Publication number Publication date
CN110390643A (zh) 2019-10-29
CN110390643B (zh) 2022-04-26

Similar Documents

Publication Publication Date Title
WO2019201184A1 (zh) 一种车牌增强方法、装置及电子设备
CN111353497B (zh) 一种身份证信息的识别方法和装置
WO2017121018A1 (zh) 二维码图像处理的方法和装置、终端、存储介质
CN107209931B (zh) 颜色校正装置和方法
US20190266706A1 (en) Removal of shadows from document images while preserving fidelity of image contents
CN107784669A (zh) 一种光斑提取及其质心确定的方法
CN112819702B (zh) 图像增强方法、装置、电子设备及计算机可读存储介质
CN109871845B (zh) 证件图像提取方法及终端设备
CN107330433B (zh) 图像处理方法和装置
WO2015070723A1 (zh) 眼部图像处理方法和装置
CN109903294B (zh) 图像处理方法、装置、电子设备及可读存储介质
CN108764358A (zh) 一种太赫兹图像识别方法、装置、设备及可读存储介质
JP2008067387A (ja) デジタル画像のテキストを識別する方法およびシステム
CN113487473B (zh) 一种添加图像水印的方法、装置、电子设备及存储介质
KR101549495B1 (ko) 문자 추출 장치 및 그 방법
CN105701491A (zh) 固定格式文档图像模版的制作方法及其应用
Srinivas et al. Remote sensing image segmentation using OTSU algorithm
CN110210467B (zh) 一种文本图像的公式定位方法、图像处理装置、存储介质
CN111986176B (zh) 一种裂纹图像识别方法、系统、终端及可读存储介质
CN115564682A (zh) 一种光照不均图像增强方法及系统
Anandh et al. Visual Enhancement of Underwater Images Using Transmission Estimation and Multi-Scale Fusion.
JP2007334876A (ja) 文書イメージ処理システムおよび文書イメージ処理方法
CN114022856A (zh) 一种非结构化道路可行驶区域识别方法、电子设备及介质
CN114529570A (zh) 图像分割方法、图像识别方法、用户凭证补办方法及系统
JP4202692B2 (ja) 画像処理方法および装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19789002

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19789002

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19789002

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 03.05.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19789002

Country of ref document: EP

Kind code of ref document: A1