CN108960244B - Character projection segmentation method and device for license plate - Google Patents

Character projection segmentation method and device for license plate Download PDF

Info

Publication number
CN108960244B
CN108960244B CN201810751647.6A CN201810751647A CN108960244B CN 108960244 B CN108960244 B CN 108960244B CN 201810751647 A CN201810751647 A CN 201810751647A CN 108960244 B CN108960244 B CN 108960244B
Authority
CN
China
Prior art keywords
point
boundary
value
license plate
energy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810751647.6A
Other languages
Chinese (zh)
Other versions
CN108960244A (en
Inventor
李文杰
班华忠
李党
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Icetech Science & Technology Co ltd
Original Assignee
Beijing Icetech Science & Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Icetech Science & Technology Co ltd filed Critical Beijing Icetech Science & Technology Co ltd
Priority to CN201810751647.6A priority Critical patent/CN108960244B/en
Publication of CN108960244A publication Critical patent/CN108960244A/en
Application granted granted Critical
Publication of CN108960244B publication Critical patent/CN108960244B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/158Segmentation of character regions using character size, text spacings or pitch estimation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • G06V10/507Summing image-intensity values; Histogram projection analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/625License plates
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Character Input (AREA)

Abstract

The invention provides a character projection segmentation method of a license plate, which comprises the following steps: carrying out license plate positioning on the input image to obtain a first license plate area; license plate correction is carried out on the first license plate area, and a second license plate area is obtained; removing the frame of the second license plate region to obtain a third license plate region; extracting character blocks in the third license plate area, and selecting a reference character block; respectively calculating a gray vertical projection value and a difference value, calculating an energy vertical projection value and a difference value, obtaining a boundary combination and outputting the boundary combination; and carrying out false boundary combination filtering and over-narrow boundary combination fusion processing, and obtaining and outputting a character segmentation area. Compared with the prior art, the invention can effectively solve the problem of character adhesion and character segmentation under the condition of low contrast.

Description

Character projection segmentation method and device for license plate
Technical Field
The invention relates to image processing, video monitoring and intelligent traffic, in particular to a license plate character segmentation method and device.
Background
With the increasing modernization of cities, the conservation volume of motor vehicles continues to increase, and intelligent traffic systems play an increasingly important role. The license plate recognition technology is an important component of a modern intelligent traffic system and has very wide application. The license plate recognition technology is divided into three components of license plate positioning, character segmentation and character recognition. The character segmentation is to accurately segment a single character region in the located license plate region. The accuracy of character segmentation directly influences the accuracy of later character recognition.
The character segmentation algorithms commonly used at present are as follows: vertical projection, template matching, connected region, classifier, neural network, etc. Wherein, the vertical projection method is sensitive to inclined characters; the connected region method has poor fracture or character adhesion treatment; the classifier method and the neural network method are relatively complex in algorithm. The template matching method has higher requirements on the extraction precision of the license plate.
However, the existing license plate character segmentation method is difficult to solve the character segmentation problems under the conditions of character adhesion and low contrast.
In view of the foregoing, there is a great need for a license plate character segmentation method and device for solving the problem of character adhesion and character segmentation under low contrast.
Disclosure of Invention
Therefore, the invention mainly aims to realize license plate character segmentation and effectively solve the problems of character adhesion and character segmentation under the condition of low contrast.
In order to achieve the above object, according to a first aspect of the present invention, there is provided a character projection segmentation method for a license plate, the method comprising:
the method comprises the steps of firstly, carrying out license plate positioning on an input image to obtain a first license plate area;
the second step, license plate correction is carried out on the first license plate area, and a second license plate area is obtained;
The third step, removing the frame of the second license plate area to obtain a third license plate area;
a fourth step of extracting character blocks in the third license plate area and selecting a reference character block;
fifth, respectively calculating gray vertical projection value and difference value, calculating energy vertical projection value and difference value, obtaining boundary combination and outputting;
and sixthly, carrying out false boundary combination filtering and over-narrow boundary combination fusion processing, and obtaining and outputting a character segmentation area.
Further, the fourth step includes:
a character block extraction step, namely extracting character blocks from a third license plate area by adopting a connected area method;
a reference character block selection step, namely calculating the aspect ratio and the energy mean ratio of each character block, and screening the aspect ratio to be positioned at [ RT ] 1 ,RT 2 ]The energy mean ratio is located at [ ERT ] 1 ,ERT 2 ]Is a character block of (a); and calculating the character recognition confidence of the screened character blocks, and selecting the character block with the maximum character recognition confidence as a reference character block.
Further, the calculating the aspect ratio of each character block includes: and counting the width and the height of each character block, and calculating the ratio of the width to the height of each character block.
Further, the calculating the energy mean ratio value of each character block includes: acquiring an energy image of each character block, and calculating the ratio ER of the sum of pixel values of the energy image corresponding to each character block to the area of the character block i ER is carried out i The energy mean value of the ith character block is marked; calculating the energy mean of all character blocks
Figure BDA0001725698150000021
BNum is the number of character blocks; calculating the energy mean ratio ER of each character block i /ER ave
Further, the fifth step includes:
a gray vertical projection calculation step, namely respectively counting gray projection values in an HT height range for each column in the vertical direction of the third license plate region, and selecting the maximum value of the gray projection values in the HT height range as the gray vertical projection value of the corresponding column;
gray level vertical projection difference value calculating step of calculating WT for each column in the vertical direction of the third license plate region 1 Calculating the average value of the gray vertical projection values in the width range, and calculating the difference value between the gray vertical projection value of each column and the corresponding average value to be used as the gray vertical projection difference value of the corresponding column;
an energy vertical projection calculation step, namely acquiring an energy image of a third license plate region, respectively counting energy projection values in an HT height range for each column of the energy image of the third license plate region in the vertical direction, and selecting the maximum value of the energy projection values in the HT height range as the energy vertical projection value of the corresponding column;
an energy vertical projection difference calculation step of calculating WT for each column in the vertical direction of the energy image of the third license plate region 1 Calculating the average value of the energy vertical projection values in the width range, and calculating the difference value between the energy vertical projection value of each column and the corresponding average value as the energy vertical projection difference value of the corresponding column;
a character block energy threshold calculation step of calculating WT for a reference character block 2 Mean value of energy vertical projection values in width range, and multiplying the mean value by threshold coefficient lambda T As a character block energy threshold;
acquiring minimum value points and left and right side points, wherein for each column of the third license plate region in the vertical direction, if the energy vertical projection difference value is smaller than the negative character block energy threshold value, the corresponding column is considered as the small value point; searching continuous small value points, and taking the small value point corresponding to the minimum value of the energy vertical projection difference value as the minimum value point; continuously searching small value points to the left and right of each small value point by taking each small value point as a starting point, taking the leftmost point of the continuous small value points as the left side point of the small value, and taking the right side point of the continuous small value points as the right side point of the small value;
character boundary obtaining step of combining left and right boundaries of the reference character block as boundaries to left and right WTs, respectively 3 Searching a new boundary combination in the width range; continuing to start with the left point of the new boundary combination to the left and to the left WT 3 Searching a new combination of the next group of boundaries in the width range until the left boundary of the license plate; continuing to take the right point of the new boundary combination on the right as a starting point to the right WT 3 Searching a new combination of the next group of boundaries in the width range until the right boundary of the license plate; all boundary combinations are output.
Further, the minimum value point and the left and right side points obtaining step includes:
a small value point searching step, wherein the p-th column x=x in the vertical direction of the third license plate region p If ED p <-ET B Then consider x p Is a small value point, where ED p For p-th column x=x p Energy perpendicular projection difference, ET B A character block energy threshold;
searching minimum value points, namely searching an energy vertical projection difference value minimum value for a continuous small value point area if the continuous small value point area exists, taking a small value point corresponding to the energy vertical projection difference value minimum value as the minimum value point corresponding to the continuous small value point area, and taking an independent small value point as the minimum value point if the independent small value point exists;
a step of searching the left and right side points, namely, a minimum value point x q As a starting point, successively searching for a minimum point to the left and right, respectively, if a minimum point x q To the left of (a) has a continuous k 1 The points are small value points, and the continuous k is arranged towards the right 2 The point is a small value point, and the small value point x q X is the left point of (2) q -k 1 Right, rightThe side point is x q +k 2
Further, the character boundary obtaining step includes:
a left boundary combination searching step, namely marking the left boundary and the right boundary of the reference character block as a group of boundary combinations, taking the left boundary of the reference character block as a starting point and going to the left WT 3 Searching a left side point and a right side point in the width range, if the left side point and the right side point are unique, combining the left side point and the right side point as a new boundary, if the left side point and the right side point are not unique, respectively calculating the sum of gray vertical projection values and gray vertical projection difference values corresponding to the left side point and the right side point of each group, and combining the left side point and the right side point which are the smallest as a new boundary; continuing to take the left point of the new boundary combination as a starting point to the left WT 3 Searching a new combination of the next group of boundaries in the width range until the left boundary of the license plate;
right side edge combination searching step, taking right boundary of reference character block as starting point, and going to right WT 3 Searching a left side point and a right side point in the width range, if the left side point and the right side point are unique, combining the left side point and the right side point as a new boundary, if the left side point and the right side point are not unique, respectively calculating the sum of gray vertical projection values and gray vertical projection difference values corresponding to the left side point and the right side point of each group, and combining the left side point and the right side point which are the smallest as a new boundary; continuing to take the right point of the new boundary combination as a starting point to the right WT 3 Searching a new combination of the next group of boundaries in the width range until the right boundary of the license plate;
and outputting boundary combinations, namely outputting all the boundary combinations.
Further, the sixth step includes:
a false boundary combination filtering step, namely constructing a boundary combination region according to boundary combination, and filtering the corresponding boundary combination region if the difference value of all gray vertical projections in the boundary combination region is smaller than 0; calculating the width of the region with gray vertical projection difference greater than 0 in the boundary combined region, if the width of the region is smaller than WT 4 Filtering out the corresponding boundary combined region;
an excessively narrow boundary combining and fusing step of, for two adjacent boundary combining regions, if all gray-scale vertical projection differences between the right boundary of the left boundary combining region and the left boundary of the right boundary combining region are smaller than 0, and the sum of the widths of the two boundary combining regions is not larger than WT 5 Combining the two adjacent boundary combined areas;
and a character segmentation area output step, namely extracting an area at a corresponding position from the third license plate area as a character segmentation area according to the boundary combination area and outputting the character segmentation area.
According to another aspect of the present invention, there is provided a projected character segmentation apparatus for a license plate, the apparatus comprising:
The license plate positioning module is used for positioning the license plate of the input image and acquiring a first license plate area;
the license plate correction module is used for correcting the license plate of the first license plate area and acquiring a second license plate area;
the license plate frame removing module is used for removing frames of the second license plate area and obtaining a third license plate area;
the reference character block acquisition module is used for extracting character blocks in the third license plate area and selecting reference character blocks;
the boundary combination acquisition module is used for respectively calculating a gray vertical projection value and a difference value, calculating an energy vertical projection value and a difference value, acquiring a boundary combination and outputting;
and the false boundary filtering and over-narrow boundary fusion module is used for carrying out false boundary combination filtering and over-narrow boundary combination fusion processing, obtaining a character segmentation area and outputting the character segmentation area.
Further, the reference character block acquisition module includes:
the character block extraction module is used for extracting character blocks from the third license plate area by adopting a connected area method;
a reference character block selection module for calculating the aspect ratio and the energy mean ratio of each character block, and screening the aspect ratio to be located at [ RT ] 1 ,RT 2 ]The energy mean ratio is located at [ ERT ] 1 ,ERT 2 ]Is a word of (a)A symbol block; and calculating the character recognition confidence of the screened character blocks, and selecting the character block with the maximum character recognition confidence as a reference character block.
Further, the boundary combination acquisition module includes:
the gray vertical projection calculation module is used for respectively counting gray projection values in the HT height range for each column in the vertical direction of the third license plate region, and selecting the maximum value of the gray projection values in the HT height range as the gray vertical projection value of the corresponding column;
a gray level vertical projection difference calculation module for calculating WT for each column of the third license plate region in the vertical direction 1 Calculating the average value of the gray vertical projection values in the width range, and calculating the difference value between the gray vertical projection value of each column and the corresponding average value to be used as the gray vertical projection difference value of the corresponding column;
the energy vertical projection calculation module is used for acquiring an energy image of the third license plate region, counting energy projection values in an HT height range for each column of the energy image of the third license plate region in the vertical direction, and selecting the maximum value of the energy projection values in the HT height range as the energy vertical projection value of the corresponding column;
an energy vertical projection difference calculation module for calculating WT for each column of the vertical direction of the energy image of the third license plate region 1 Calculating the average value of the energy vertical projection values in the width range, and calculating the difference value between the energy vertical projection value of each column and the corresponding average value as the energy vertical projection difference value of the corresponding column;
A character block energy threshold calculation module for calculating WT for reference character blocks 2 Mean value of energy vertical projection values in width range, and multiplying the mean value by threshold coefficient lambda T As a character block energy threshold;
the minimum value point and the left side point and right side point acquisition modules are used for regarding each column of the vertical direction of the third license plate area, and if the energy vertical projection difference value is smaller than the negative character block energy threshold value, the corresponding column is considered to be the small value point; searching continuous small value points, and taking the small value point corresponding to the minimum value of the energy vertical projection difference value as the minimum value point; continuously searching small value points to the left and right of each small value point by taking each small value point as a starting point, taking the leftmost point of the continuous small value points as the left side point of the small value, and taking the right side point of the continuous small value points as the right side point of the small value;
character boundary acquisition module for combining left and right boundaries of the reference character block as boundaries to left and right WT 3 Searching a new boundary combination in the width range; continuing to start with the left point of the new boundary combination to the left and to the left WT 3 Searching a new combination of the next group of boundaries in the width range until the left boundary of the license plate; continuing to take the right point of the new boundary combination on the right as a starting point to the right WT 3 Searching a new combination of the next group of boundaries in the width range until the right boundary of the license plate; all boundary combinations are output.
Further, the minimum value point and the left and right side point acquisition module includes:
a small value point searching module for the p-th column x=x of the vertical direction of the third license plate region p If ED p <-ET B Then consider x p Is a small value point, where ED p For p-th column x=x p Energy perpendicular projection difference, ET B A character block energy threshold;
the minimum value point searching module is used for searching the minimum value of the energy vertical projection difference value for the continuous small value point area if the continuous small value point area exists, taking the small value point corresponding to the minimum value of the energy vertical projection difference value as the minimum value point corresponding to the continuous small value point area, and taking the single small value point as the minimum value point if the single small value point exists;
left and right side point searching module for searching minimum value point x q As a starting point, successively searching for a minimum point to the left and right, respectively, if a minimum point x q To the left of (a) has a continuous k 1 The points are small value points, and the continuous k is arranged towards the right 2 The point is a small value point, and the small value point x q X is the left point of (2) q -k 1 The right side point is x q +k 2
Further, the character boundary acquisition module includes:
A left boundary combination search module for marking the left boundary and the right boundary of the reference character block as a group of boundary combinations, taking the left boundary of the reference character block as a starting point to the left WT 3 Searching a left side point and a right side point in the width range, if the left side point and the right side point are unique, combining the left side point and the right side point as a new boundary, if the left side point and the right side point are not unique, respectively calculating the sum of gray vertical projection values and gray vertical projection difference values corresponding to the left side point and the right side point of each group, and combining the left side point and the right side point which are the smallest as a new boundary; continuing to take the left point of the new boundary combination as a starting point to the left WT 3 Searching a new combination of the next group of boundaries in the width range until the left boundary of the license plate;
a right side edge combination searching module for starting from the right boundary of the reference character block to the right WT 3 Searching a left side point and a right side point in the width range, if the left side point and the right side point are unique, combining the left side point and the right side point as a new boundary, if the left side point and the right side point are not unique, respectively calculating the sum of gray vertical projection values and gray vertical projection difference values corresponding to the left side point and the right side point of each group, and combining the left side point and the right side point which are the smallest as a new boundary; continuing to take the right point of the new boundary combination as a starting point to the right WT 3 Searching a new combination of the next group of boundaries in the width range until the right boundary of the license plate;
and the boundary combination output module is used for outputting all boundary combinations.
Further, the false boundary filtering and narrowness boundary fusing module includes:
the false boundary combination filtering module is used for constructing a boundary combination area according to boundary combination, and filtering the corresponding boundary combination area if the difference value of all gray vertical projections in the boundary combination area is smaller than 0; calculating the width of the region with gray vertical projection difference greater than 0 in the boundary combined region, if the width of the region is smaller than WT 4 Filtering out the corresponding boundary combined region;
an over-narrow boundary combination fusion module for two adjacent edgesA boundary combining region, if all gray-scale vertical projection differences between the right boundary of the boundary combining region on the left and the left boundary of the boundary combining region on the right are smaller than 0, and the sum of the widths of the two boundary combining regions is not larger than WT 5 Combining the two adjacent boundary combined areas;
and the character segmentation area output module is used for extracting an area at a corresponding position from the third license plate area as a character segmentation area according to the boundary combination area and outputting the character segmentation area.
Compared with the existing license plate character segmentation method, the character projection segmentation method and device for the license plate adopt a method combining gray level vertical projection and energy projection, and can effectively solve the problem of character segmentation under the conditions of character adhesion and low contrast in license plate recognition.
Drawings
Fig. 1 shows a flow chart of a character projection segmentation method of a license plate according to the invention.
Fig. 2 shows a frame diagram of a character projection segmentation apparatus for license plates according to the present invention.
Detailed Description
For further understanding of the structure, features and other objects of the present invention, those skilled in the art will now be able to ascertain the following detailed description of the preferred embodiments, which are given by way of illustration only and not by way of limitation.
Fig. 1 shows a flow chart of a character projection segmentation method for license plates according to the invention. As shown in fig. 1, a character projection segmentation method for license plates according to the present invention includes:
the method comprises the steps that S1, license plate positioning is conducted on an input image, and a first license plate area is obtained;
step S2, license plate correction is carried out on the first license plate area, and a second license plate area is obtained;
Step S3, removing the frame of the second license plate area to obtain a third license plate area;
step S4, extracting character blocks in the third license plate area, and selecting a reference character block;
step S5, respectively calculating a gray vertical projection value and a difference value, calculating an energy vertical projection value and a difference value, obtaining a boundary combination and outputting the boundary combination;
and step S6, false boundary combination filtering and over-narrow boundary combination fusion processing are carried out, and character segmentation areas are obtained and output.
The first step S1 may adopt an existing license plate positioning or license plate detecting method to detect the position of the license plate region from the input image, and extract the gray image of the corresponding position from the input image as the first license plate region according to the position of the license plate region.
The second step S2 may be implemented by an existing license plate correction method. Illustratively, for example, the second step S2 may include: obtaining a straight line segment of the first vehicle plate area by utilizing Hough transformation, and obtaining an inclination angle of the straight line segment; and correcting the image of the first card area according to the inclination angle and the image rotation formula, and obtaining a corrected second card area. The image rotation formula is a rotation formula adopted in the existing image rotation method.
The third step S3 may be implemented by an existing license plate frame removal processing method. Illustratively, the third step S3 is: the upper and lower frames of the second vehicle license plate area are removed by adopting a method of removing the upper and lower frames in the ' 4.2 paper of ' Nanjing university ' of technology application of license plate identification, zhou Chunxia, 2005, and the upper, lower, left and right boundaries of the characters of the second vehicle license plate area are obtained; and taking the area surrounded by the upper, lower, left and right boundaries as a third license plate area.
Further, the fourth step S4 includes:
a character block extraction step S41 of extracting character blocks from the third license plate region by adopting a connected region method;
step S42 of selecting reference character blocks, calculating the aspect ratio and the energy mean ratio of each character block, and screening the aspect ratio to be located at [ RT ] 1 ,RT 2 ]The energy mean ratio is located at [ ERT ] 1 ,ERT 2 ]Is a character block of (a); calculating the character recognition confidence of the screened character blocks, and selecting character recognition positionsThe character block with the highest confidence is used as the reference character block.
The character block extracting step S41 may obtain the marked connected region from the third license plate region as the character block by using an existing connected region method.
Further, the calculating the aspect ratio of each character block includes: and counting the width and the height of each character block, and calculating the ratio of the width to the height of each character block.
Further, the calculating the energy mean ratio value of each character block includes: acquiring an energy image of each character block, and calculating the ratio ER of the sum of pixel values of the energy image corresponding to each character block to the area of the character block i ER is carried out i The energy mean value of the ith character block is marked; calculating the energy mean of all character blocks
Figure BDA0001725698150000081
BNum is the number of character blocks; calculating the energy mean ratio ER of each character block i /ER ave
The energy image of each character block can be obtained by adopting the existing energy image obtaining method based on transformation. Illustratively, a gradient transform or a convolution transform is performed on each character block, and the transformed image serves as an energy image of the corresponding character block.
Further, the calculating the character recognition confidence coefficient of the screened character block may adopt an existing character recognition method based on a classifier or a character recognition method based on a neural network, and calculate the character recognition confidence coefficient corresponding to the screened character block.
Further, the RT 1 The value range of (1) to (1.5), RT 2 The value of ERT is 1.9-3.1 1 The range of the value of ERT is 0.5 to 0.7 2 The range of the value of (2) is 1.1-1.9.
Illustratively, the reference character block selecting step S42 includes: calculating the aspect ratio and the energy mean value ratio of each character block, and screening character blocks with the aspect ratio being [1.2,2.5] and the energy mean value ratio being [0.6,1.5 ]; and calculating the character recognition confidence coefficient of the screened character blocks by adopting a character recognition method based on an SVM classifier, and selecting the character block with the maximum character recognition confidence coefficient as a reference character block.
Further, the fifth step S5 includes:
a gray vertical projection calculation step S51, for each column in the vertical direction of the third license plate region, respectively counting gray vertical projection values in the HT height range, and selecting the maximum value of the gray vertical projection values in the HT height range as the gray vertical projection value of the corresponding column;
a gray-scale vertical projection difference calculation step S52 of calculating WT for each column of the third license plate region in the vertical direction 1 Calculating the average value of the gray vertical projection values in the width range, and calculating the difference value between the gray vertical projection value of each column and the corresponding average value to be used as the gray vertical projection difference value of the corresponding column;
an energy vertical projection calculation step S53, namely acquiring an energy image of the third license plate region, respectively counting energy projection values in an HT height range for each column of the energy image of the third license plate region in the vertical direction, and selecting the maximum value of the energy projection values in the HT height range as the energy vertical projection value of the corresponding column;
An energy vertical projection difference calculation step S54 of calculating WT for each column in the vertical direction of the energy image of the third license plate region 1 Calculating the average value of the energy vertical projection values in the width range, and calculating the difference value between the energy vertical projection value of each column and the corresponding average value as the energy vertical projection difference value of the corresponding column;
a character block energy threshold calculation step S55 of calculating WT for the reference character block 2 Mean value of energy vertical projection values in width range, and multiplying the mean value by threshold coefficient lambda T As a character block energy threshold;
a minimum value point and left and right side points obtaining step S56, wherein for each column in the vertical direction of the third license plate region, if the energy vertical projection difference value is smaller than the negative character block energy threshold value, the corresponding column is considered as the small value point; searching continuous small value points, and taking the small value point corresponding to the minimum value of the energy vertical projection difference value as the minimum value point; continuously searching small value points to the left and right of each small value point by taking each small value point as a starting point, taking the leftmost point of the continuous small value points as the left side point of the small value, and taking the right side point of the continuous small value points as the right side point of the small value;
character boundary obtaining step S57 of combining left and right boundaries of the reference character block as boundaries to left and right WT respectively 3 Searching a new boundary combination in the width range; continuing to start with the left point of the new boundary combination to the left and to the left WT 3 Searching a new combination of the next group of boundaries in the width range until the left boundary of the license plate; continuing to take the right point of the new boundary combination on the right as a starting point to the right WT 3 Searching a new combination of the next group of boundaries in the width range until the right boundary of the license plate; all boundary combinations are output.
Further, the minimum value point and left and right side points obtaining step S56 includes:
a small value point searching step S561 of, for the p-th column x=x in the vertical direction of the third license plate region p If ED p <-ET B Then consider x p Is a small value point, where ED p For p-th column x=x p Energy perpendicular projection difference, ET B A character block energy threshold;
a minimum value point searching step S562, in which if a continuous minimum value point area exists, an energy vertical projection difference value minimum value is searched for in the continuous minimum value point area, a minimum value point corresponding to the energy vertical projection difference value minimum value is used as a minimum value point corresponding to the continuous minimum value point area, and if an individual small value point exists, the individual small value point is used as a minimum value point;
a left-right side point searching step S563 of searching the minimum value point x q As a starting point, successively searching for a minimum point to the left and right, respectively, if a minimum point x q To the left of (a) has a continuous k 1 The points are small value points, and the continuous k is arranged towards the right 2 The point is a small value point, and the small value point x q X is the left point of (2) q -k 1 The right side point is x q +k 2
Further, the character boundary obtaining step S57 includes:
a left edge combination searching step S571, marking the left boundary and the right boundary of the reference character block as a group of boundary combinations, taking the left boundary of the reference character block as a starting point, and going to the left WT 3 Searching a left side point and a right side point in the width range, if the left side point and the right side point are unique, combining the left side point and the right side point as a new boundary, if the left side point and the right side point are not unique, respectively calculating the sum of gray vertical projection values and gray vertical projection difference values corresponding to the left side point and the right side point of each group, and combining the left side point and the right side point which are the smallest as a new boundary; continuing to take the left point of the new boundary combination as a starting point to the left WT 3 Searching a new combination of the next group of boundaries in the width range until the left boundary of the license plate;
a right side edge combination search step S572 of starting with the right boundary of the reference character block to the right WT 3 Searching a left side point and a right side point in the width range, if the left side point and the right side point are unique, combining the left side point and the right side point as a new boundary, if the left side point and the right side point are not unique, respectively calculating the sum of gray vertical projection values and gray vertical projection difference values corresponding to the left side point and the right side point of each group, and combining the left side point and the right side point which are the smallest as a new boundary; continuing to take the right point of the new boundary combination as a starting point to the right WT 3 Searching a new combination of the next group of boundaries in the width range until the right boundary of the license plate;
the boundary combination output step S573 outputs all boundary combinations.
Further, the HT is lambda 1 ×H B Integer, WT 1 Lambda is lambda 2 ×W B Integer, WT 2 Lambda is lambda 3 ×W B Integer, WT 3 Lambda is lambda 4 ×W B Taking the integer, wherein H B And W is B The height and width of the reference character block, lambda respectively 1 The value range of lambda is 0.1-0.3 2 The value range of (2) is 1.5-2.5, lambda 3 The value range of (2) is 1.5-2.5, lambda 4 The value range of (2) is 1-2, and the threshold coefficient lambda T The range of the value of (2) is 0.1-0.4.
The obtaining the energy image of the third license plate region may adopt an existing energy image obtaining method based on transformation, to obtain the energy image of the third license plate region. Illustratively, the third license plate region is subjected to gradient transformation or convolution transformation, and the transformed image is used as an energy image of the third license plate region.
Illustratively, the gray-scale vertical projection calculating step S51 includes: column p x=x for the vertical direction of the third license plate region p If the height of the reference character block is 20, lambda is selected 1 At 0.2, the p-th column x=x is counted separately p Gray projection values within the height range of every 4 pixels are selected, and the maximum value of the gray projection values is taken as the p-th column x=x p Gray vertical projection value G of (2) p . The energy vertical projection calculation step S53 is similar to the gray vertical projection calculation step S51, and uses the energy projection value E p Replacing gray projection value G p
Illustratively, the gray-scale vertical projection difference calculating step S52 includes: column p x=x for the vertical direction of the third license plate region p If the width of the reference character block is 24, lambda is selected 2 For 2, calculate [ x ] p -24,x p +24]Average value A of gray vertical projection values in width range p The method comprises the steps of carrying out a first treatment on the surface of the Calculate p-th column x=x p Gray vertical projection value G of (2) p And average value A p As the p-th column x=x p Gray scale vertical projection difference GD of (2) p . The energy vertical projection difference calculating step S54 is similar to the gray vertical projection difference calculating step S52, and uses an energy projection value E p Replacing gray projection value G p Energy vertical projection difference ED p Replacement gray scale vertical projection difference GD p
Illustratively, the character block energy threshold calculating step S55 includes: for a reference character block, the vertical center coordinates x=x of the reference character block are acquired B If the width of the reference character block is 24, lambda is selected 3 For 2, select threshold coefficient lambda T For 0.2, calculate [ x ] B -24,x B +24]Energy vertical throw over widthAverage value ET of shadow values B ET is carried out B X 0.2 as the character block energy threshold.
Further, the sixth step S6 includes:
a false boundary combination filtering step S61, wherein a boundary combination region is constructed according to boundary combination, and if the difference value of all gray vertical projections in the boundary combination region is smaller than 0, the corresponding boundary combination region is filtered; calculating the width of the region with gray vertical projection difference greater than 0 in the boundary combined region, if the width of the region is smaller than WT 4 Filtering out the corresponding boundary combined region;
an excessively narrow boundary combining and fusing step S62, for two adjacent boundary combining regions, if all gray-scale vertical projection differences between the right boundary of the left boundary combining region and the left boundary of the right boundary combining region are smaller than 0, and the sum of the widths of the two boundary combining regions is not larger than WT 5 Combining the two adjacent boundary combined areas;
and a character segmentation area output step S63, wherein the area at the corresponding position is extracted from the third license plate area as a character segmentation area according to the boundary combination area and is output.
Further, the WT 4 Lambda is lambda 5 ×W B Integer, WT 5 Lambda is lambda 6 ×W B Taking the integer, wherein W B As the width of the reference character block lambda 5 The value range of lambda is 0.1-0.4 6 The value range of (2) is 1-1.5.
Illustratively, the step S62 of merging the combination of the too narrow boundaries is: for two adjacent boundary combined regions, wherein the left boundary point and the right boundary point of the left boundary combined region are p 1 、p 2 The left and right boundary points of the right boundary combined area are p 3 、p 4 If at [ p ] 2 ,p 3 ]Within the width range of (1), the difference value of all gray vertical projection in the corresponding position of the third license plate region is smaller than 0, and p 4 -p 1 ≤WT 5 The left and right boundary points are p 1 、p 4 Is used as a boundary combination area and filters out two adjacent combinations corresponding to the boundary combination areaAn area.
Fig. 2 shows a frame diagram of a character projection segmentation apparatus for license plates according to the present invention. As shown in fig. 2, a character projection segmentation apparatus for a license plate according to the present invention includes:
the license plate positioning module 1 is used for positioning the license plate of the input image to obtain a first license plate area;
the license plate correction module 2 is used for correcting the license plate of the first license plate area to acquire a second license plate area;
the license plate frame removing module 3 is used for removing frames of the second license plate region to obtain a third license plate region;
the reference character block acquisition module 4 is used for extracting character blocks in the third license plate area and selecting reference character blocks;
The boundary combination acquisition module 5 is used for respectively calculating a gray vertical projection value and a difference value, calculating an energy vertical projection value and a difference value, acquiring a boundary combination and outputting;
and the false boundary filtering and narrowness boundary fusion module 6 is used for carrying out false boundary combination filtering and narrowness boundary combination fusion processing, obtaining and outputting a character segmentation area.
Further, the reference character block acquisition module 4 includes:
a character block extracting module 41, configured to extract a character block from the third license plate region by using a connected region method;
a reference character block selection module 42 for calculating the aspect ratio and the energy mean ratio of each character block, and screening the aspect ratio to be located at [ RT ] 1 ,RT 2 ]The energy mean ratio is located at [ ERT ] 1 ,ERT 2 ]Is a character block of (a); and calculating the character recognition confidence of the screened character blocks, and selecting the character block with the maximum character recognition confidence as a reference character block.
Further, the calculating the aspect ratio of each character block includes: and counting the width and the height of each character block, and calculating the ratio of the width to the height of each character block.
Further, the calculating the energy mean ratio value of each character block includes: acquiring eachEnergy image of each character block, calculating ratio ER of sum of pixel values of energy image corresponding to each character block to area of the character block i ER is carried out i The energy mean value of the ith character block is marked; calculating the energy mean of all character blocks
Figure BDA0001725698150000131
BNum is the number of character blocks; calculating the energy mean ratio ER of each character block i /ER ave
Further, the RT 1 The value range of (1) to (1.5), RT 2 The value of ERT is 1.9-3.1 1 The range of the value of ERT is 0.5 to 0.7 2 The range of the value of (2) is 1.1-1.9.
Further, the boundary combination acquisition module 5 includes:
the gray vertical projection calculation module 51 is configured to, for each column in the vertical direction of the third license plate region, respectively count gray projection values in the HT height range, and select a maximum value of the gray projection values in the HT height range as a gray vertical projection value of the corresponding column;
a gray level vertical projection difference calculation module 52 for calculating WT for each column of the third license plate region in the vertical direction 1 Calculating the average value of the gray vertical projection values in the width range, and calculating the difference value between the gray vertical projection value of each column and the corresponding average value to be used as the gray vertical projection difference value of the corresponding column;
the energy vertical projection calculation module 53 is configured to obtain an energy image of the third license plate region, respectively count, for each column in a vertical direction of the energy image of the third license plate region, energy projection values in an HT height range, and select a maximum value of the energy projection values in the HT height range as an energy vertical projection value of a corresponding column;
An energy vertical projection difference calculation module 54 for calculating WT for each column of the vertical direction of the energy image of the third license plate region 1 Calculating the average value of the energy vertical projection values in the width range, and calculating the difference value between the energy vertical projection value of each column and the corresponding average value as the energy vertical projection difference value of the corresponding column;
a character block energy threshold calculation module 55 for calculating WT for reference character blocks 2 Mean value of energy vertical projection values in width range, and multiplying the mean value by threshold coefficient lambda T As a character block energy threshold;
the minimum value point and left and right side point obtaining module 56 is configured to consider that, for each column in the vertical direction of the third license plate region, the corresponding column is a small value point if the energy vertical projection difference is smaller than the negative character block energy threshold; searching continuous small value points, and taking the small value point corresponding to the minimum value of the energy vertical projection difference value as the minimum value point; continuously searching small value points to the left and right of each small value point by taking each small value point as a starting point, taking the leftmost point of the continuous small value points as the left side point of the small value, and taking the right side point of the continuous small value points as the right side point of the small value;
character boundary acquiring module 57 for combining left and right boundaries of the reference character block as boundaries, respectively to left and right WTs 3 Searching a new boundary combination in the width range; continuing to start with the left point of the new boundary combination to the left and to the left WT 3 Searching a new combination of the next group of boundaries in the width range until the left boundary of the license plate; continuing to take the right point of the new boundary combination on the right as a starting point to the right WT 3 Searching a new combination of the next group of boundaries in the width range until the right boundary of the license plate; all boundary combinations are output.
Further, the minimum point and left and right side point acquisition module 56 includes:
a small value point searching module 561 for the p-th column x=x of the vertical direction of the third license plate region p If ED p <-ET B Then consider x p Is a small value point, where ED p For p-th column x=x p Energy perpendicular projection difference, ET B A character block energy threshold;
the minimum value point searching module 562 is configured to search for a minimum value of the energy vertical projection difference value for the continuous small value point region if the continuous small value point region exists, take a small value point corresponding to the minimum value of the energy vertical projection difference value as a minimum value point corresponding to the continuous small value point region, and take an individual small value point as a minimum value point if the individual small value point exists;
a left-right side point searching module 563 for searching the minimum value point x q As a starting point, successively searching for a minimum point to the left and right, respectively, if a minimum point x q To the left of (a) has a continuous k 1 The points are small value points, and the continuous k is arranged towards the right 2 The point is a small value point, and the small value point x q X is the left point of (2) q -k 1 The right side point is x q +k 2
Further, the character boundary obtaining module 57 includes:
a left edge combination search module 571 for marking the left and right boundaries of the reference character block as a set of boundary combinations starting from the left boundary of the reference character block to the left WT 3 Searching a left side point and a right side point in the width range, if the left side point and the right side point are unique, combining the left side point and the right side point as a new boundary, if the left side point and the right side point are not unique, respectively calculating the sum of gray vertical projection values and gray vertical projection difference values corresponding to the left side point and the right side point of each group, and combining the left side point and the right side point which are the smallest as a new boundary; continuing to take the left point of the new boundary combination as a starting point to the left WT 3 Searching a new combination of the next group of boundaries in the width range until the left boundary of the license plate;
a right edge combination lookup module 572 for starting at the right boundary of the reference character block and going to the right WT 3 Searching a left side point and a right side point in the width range, if the left side point and the right side point are unique, combining the left side point and the right side point as a new boundary, if the left side point and the right side point are not unique, respectively calculating the sum of gray vertical projection values and gray vertical projection difference values corresponding to the left side point and the right side point of each group, and combining the left side point and the right side point which are the smallest as a new boundary; continuing to take the right point of the new boundary combination as a starting point to the right WT 3 Searching a new combination of the next group of boundaries in the width range until the right boundary of the license plate;
the boundary combination output module 573 is configured to output all boundary combinations.
Further, the HT is lambda 1 ×H B Integer, WT 1 Lambda is lambda 2 ×W B Integer, WT 2 Lambda is lambda 3 ×W B Integer, WT 3 Lambda is lambda 4 ×W B Taking the integer, wherein H B And W is B The height and width of the reference character block, lambda respectively 1 The value range of lambda is 0.1-0.3 2 The value range of (2) is 1.5-2.5, lambda 3 The value range of (2) is 1.5-2.5, lambda 4 The value range of (2) is 1-2, and the threshold coefficient lambda T The range of the value of (2) is 0.1-0.4.
Further, the false boundary filtering and narrowness boundary fusion module 6 comprises:
the false boundary combination filtering module 61 is configured to construct a boundary combination region according to boundary combination, and if all gray-scale vertical projection differences in the boundary combination region are smaller than 0, filter the corresponding boundary combination region; calculating the width of the region with gray vertical projection difference greater than 0 in the boundary combined region, if the width of the region is smaller than WT 4 Filtering out the corresponding boundary combined region;
an over-narrow border combining fusion module 62 for, for two adjacent border combining areas, if all gray-scale vertical projection differences between the right border of the left border combining area and the left border of the right border combining area are smaller than 0, and the sum of the widths of the two border combining areas is not larger than WT 5 Combining the two adjacent boundary combined areas;
and the character segmentation area output module 63 is configured to extract an area corresponding to the position from the third license plate area as a character segmentation area according to the boundary combination area and output the character segmentation area.
Further, WT 4 Lambda is lambda 5 ×W B Integer, WT 5 Lambda is lambda 6 ×W B Taking the integer, wherein W B As the width of the reference character block lambda 5 The value range of lambda is 0.1-0.4 6 The value range of (2) is 1-1.5.
Compared with the existing license plate character segmentation method, the character projection segmentation method and device for the license plate adopt a method combining gray level vertical projection and energy projection, and can effectively solve the problem of character segmentation under the conditions of character adhesion and low contrast in license plate recognition.
The foregoing description of the preferred embodiments of the invention is not intended to limit the scope of the invention, and it should be understood that the invention is not limited to the embodiments described herein, but is presented for the purpose of aiding one skilled in the art in the practice of the invention. Further modifications and improvements will readily occur to those skilled in the art without departing from the spirit and scope of the invention, and therefore the invention is limited only by the spirit and scope of the appended claims, which are intended to cover all alternatives and equivalents that are included within the spirit and scope of the invention as defined by the appended claims.

Claims (12)

1. The character projection segmentation method of the license plate is characterized by comprising the following steps of:
the method comprises the steps of firstly, carrying out license plate positioning on an input image to obtain a first license plate area;
the second step, license plate correction is carried out on the first license plate area, and a second license plate area is obtained;
the third step, removing the frame of the second license plate area to obtain a third license plate area;
a fourth step of extracting character blocks in the third license plate area and selecting a reference character block;
fifth, respectively calculating gray vertical projection value and difference value, calculating energy vertical projection value and difference value, obtaining boundary combination and outputting;
sixthly, false boundary combination filtering and narrow boundary combination fusion processing are carried out, and character segmentation areas are obtained and output;
further, the fifth step includes:
a gray vertical projection calculation step, namely respectively counting gray projection values in an HT height range for each column in the vertical direction of the third license plate region, and selecting the maximum value of the gray projection values in the HT height range as the gray vertical projection value of the corresponding column;
gray level vertical projection difference value calculating step of calculating WT for each column in the vertical direction of the third license plate region 1 Calculating the average value of the gray vertical projection values in the width range, and calculating the difference value between the gray vertical projection value of each column and the corresponding average value to be used as the gray vertical projection difference value of the corresponding column;
an energy vertical projection calculation step, namely acquiring an energy image of a third license plate region, respectively counting energy projection values in an HT height range for each column of the energy image of the third license plate region in the vertical direction, and selecting the maximum value of the energy projection values in the HT height range as the energy vertical projection value of the corresponding column;
an energy vertical projection difference calculation step of calculating WT for each column in the vertical direction of the energy image of the third license plate region 1 Calculating the average value of the energy vertical projection values in the width range, and calculating the difference value between the energy vertical projection value of each column and the corresponding average value as the energy vertical projection difference value of the corresponding column;
a character block energy threshold calculation step of calculating WT for a reference character block 2 Mean value of energy vertical projection values in width range, and multiplying the mean value by threshold coefficient lambda T As a character block energy threshold;
acquiring minimum value points and left and right side points, wherein for each column of the third license plate region in the vertical direction, if the energy vertical projection difference value is smaller than the negative character block energy threshold value, the corresponding column is considered as the small value point; searching continuous small value points, and taking the small value point corresponding to the minimum value of the energy vertical projection difference value as the minimum value point; continuously searching small value points to the left and right of each small value point by taking each small value point as a starting point, taking the leftmost point of the continuous small value points as the left side point of the small value, and taking the right side point of the continuous small value points as the right side point of the small value;
Character boundary obtaining step of combining left and right boundaries of the reference character block as boundaries to left and right WTs, respectively 3 Searching a new boundary combination in the width range; continue to be combined with the new boundary on the leftThe left point is the starting point, to the left WT 3 Searching a new combination of the next group of boundaries in the width range until the left boundary of the license plate; continuing to take the right point of the new boundary combination on the right as a starting point to the right WT 3 Searching a new combination of the next group of boundaries in the width range until the right boundary of the license plate; outputting all boundary combinations;
further, the character boundary obtaining step includes:
a left boundary combination searching step, namely marking the left boundary and the right boundary of the reference character block as a group of boundary combinations, taking the left boundary of the reference character block as a starting point and going to the left WT 3 Searching a left side point and a right side point in the width range, if the left side point and the right side point are unique, combining the left side point and the right side point as a new boundary, if the left side point and the right side point are not unique, respectively calculating the sum of gray vertical projection values and gray vertical projection difference values corresponding to the left side point and the right side point of each group, and combining the left side point and the right side point which are the smallest as a new boundary; continuing to take the left point of the new boundary combination as a starting point to the left WT 3 Searching a new combination of the next group of boundaries in the width range until the left boundary of the license plate;
right side edge combination searching step, taking right boundary of reference character block as starting point, and going to right WT 3 Searching a left side point and a right side point in the width range, if the left side point and the right side point are unique, combining the left side point and the right side point as a new boundary, if the left side point and the right side point are not unique, respectively calculating the sum of gray vertical projection values and gray vertical projection difference values corresponding to the left side point and the right side point of each group, and combining the left side point and the right side point which are the smallest as a new boundary; continuing to take the right point of the new boundary combination as a starting point to the right WT 3 Searching a new combination of the next group of boundaries in the width range until the right boundary of the license plate;
and outputting boundary combinations, namely outputting all the boundary combinations.
2. The method of claim 1, wherein the fourth step comprises:
a character block extraction step, namely extracting character blocks from a third license plate area by adopting a connected area method;
a reference character block selection step, namely calculating the aspect ratio and the energy mean ratio of each character block, and screening the aspect ratio to be positioned at [ RT ] 1 ,RT 2 ]The energy mean ratio is located at [ ERT ] 1 ,ERT 2 ]Is a character block of (a); and calculating the character recognition confidence of the screened character blocks, and selecting the character block with the maximum character recognition confidence as a reference character block.
3. The method of claim 2, wherein calculating the energy mean ratio value for each character block comprises: acquiring an energy image of each character block, and calculating the ratio ER of the sum of pixel values of the energy image corresponding to each character block to the area of the character block i ER is carried out i The energy mean value of the ith character block is marked; calculating the energy mean of all character blocks
Figure FDA0003974816780000031
BNum is the number of character blocks; calculating the energy mean ratio ER of each character block i /ER ave
4. The method of claim 2, the RT 1 The value range of (1) to (1.5), RT 2 The value of ERT is 1.9-3.1 1 The range of the value of ERT is 0.5 to 0.7 2 The range of the value of (2) is 1.1-1.9.
5. The method of claim 1, wherein the minimum point and left and right side point obtaining step includes:
a small value point searching step, wherein the p-th column x=x in the vertical direction of the third license plate region p If ED p <-ET B Then consider x p Is a small value point, where ED p For p-th column x=x p Energy perpendicular projection difference, ET B A character block energy threshold;
a minimum value point searching step, if there is a continuous minimum value point region, for continuous minimum valuesSearching an energy vertical projection difference value minimum value in the point area, taking a small value point corresponding to the energy vertical projection difference value minimum value as a minimum value point corresponding to the continuous small value point area, and taking the single small value point as the minimum value point if the single small value point exists; a step of searching the left and right side points, namely, a minimum value point x q As a starting point, successively searching for a minimum point to the left and right, respectively, if a minimum point x q To the left of (a) has a continuous k 1 The points are small value points, and the continuous k is arranged towards the right 2 The point is a small value point, and the small value point x q X is the left point of (2) q -k 1 The right side point is x q +k 2
6. The method of claim 1, wherein the HT is λ 1 ×H B Integer, WT 1 Lambda is lambda 2 ×W B Integer, WT 2 Lambda is lambda 3 ×W B Integer, WT 3 Lambda is lambda 4 ×W B Taking the integer, wherein H B And W is B The height and width of the reference character block, lambda respectively 1 The value range of lambda is 0.1-0.3 2 The value range of (2) is 1.5-2.5, lambda 3 The value range of (2) is 1.5-2.5, lambda 4 The value range of (2) is 1-2, and the threshold coefficient lambda T The range of the value of (2) is 0.1-0.4.
7. The method of claim 1, wherein the sixth step comprises:
a false boundary combination filtering step, namely constructing a boundary combination region according to boundary combination, and filtering the corresponding boundary combination region if the difference value of all gray vertical projections in the boundary combination region is smaller than 0; calculating the width of the region with gray vertical projection difference greater than 0 in the boundary combined region, if the width of the region is smaller than WT 4 Filtering out the corresponding boundary combined region;
an excessively narrow boundary combination fusion step of, for two adjacent boundary combination regions, if all gray-scale vertical projection differences between the right boundary of the left boundary combination region and the left boundary of the right boundary combination region are equal Less than 0, and the sum of the widths of the two boundary combined regions is not greater than WT 5 Combining the two adjacent boundary combined areas;
and a character segmentation area output step, namely extracting an area at a corresponding position from the third license plate area as a character segmentation area according to the boundary combination area and outputting the character segmentation area.
8. The method of claim 7, the WT 4 Lambda is lambda 5 ×W B Integer, WT 5 Lambda is lambda 6 ×W B Taking the integer, wherein W B As the width of the reference character block lambda 5 The value range of lambda is 0.1-0.4 6 The value range of (2) is 1-1.5.
9. A character projection segmentation apparatus for a license plate, the apparatus comprising:
the license plate positioning module is used for positioning the license plate of the input image and acquiring a first license plate area;
the license plate correction module is used for correcting the license plate of the first license plate area and acquiring a second license plate area;
the license plate frame removing module is used for removing frames of the second license plate area and obtaining a third license plate area;
the reference character block acquisition module is used for extracting character blocks in the third license plate area and selecting reference character blocks;
the boundary combination acquisition module is used for respectively calculating a gray vertical projection value and a difference value, calculating an energy vertical projection value and a difference value, acquiring a boundary combination and outputting;
The false boundary filtering and narrowness boundary fusion module is used for carrying out false boundary combination filtering and narrowness boundary combination fusion processing, obtaining a character segmentation area and outputting the character segmentation area;
further, the boundary combination acquisition module includes:
the gray vertical projection calculation module is used for respectively counting gray projection values in the HT height range for each column in the vertical direction of the third license plate region, and selecting the maximum value of the gray projection values in the HT height range as the gray vertical projection value of the corresponding column;
a gray level vertical projection difference calculation module for calculating WT for each column of the third license plate region in the vertical direction 1 Calculating the average value of the gray vertical projection values in the width range, and calculating the difference value between the gray vertical projection value of each column and the corresponding average value to be used as the gray vertical projection difference value of the corresponding column;
the energy vertical projection calculation module is used for acquiring an energy image of the third license plate region, counting energy projection values in an HT height range for each column of the energy image of the third license plate region in the vertical direction, and selecting the maximum value of the energy projection values in the HT height range as the energy vertical projection value of the corresponding column;
an energy vertical projection difference calculation module for calculating WT for each column of the vertical direction of the energy image of the third license plate region 1 Calculating the average value of the energy vertical projection values in the width range, and calculating the difference value between the energy vertical projection value of each column and the corresponding average value as the energy vertical projection difference value of the corresponding column;
a character block energy threshold calculation module for calculating WT for reference character blocks 2 Mean value of energy vertical projection values in width range, and multiplying the mean value by threshold coefficient lambda T As a character block energy threshold;
the minimum value point and the left side point and right side point acquisition modules are used for regarding each column of the vertical direction of the third license plate area, and if the energy vertical projection difference value is smaller than the negative character block energy threshold value, the corresponding column is considered to be the small value point; searching continuous small value points, and taking the small value point corresponding to the minimum value of the energy vertical projection difference value as the minimum value point; continuously searching small value points to the left and right of each small value point by taking each small value point as a starting point, taking the leftmost point of the continuous small value points as the left side point of the small value, and taking the right side point of the continuous small value points as the right side point of the small value;
character boundary acquisition module for combining left and right boundaries of the reference character block as boundaries to left and right WT 3 Searching a new boundary combination in the width range; continue with the new left The left point of boundary combination is the starting point, to the left WT 3 Searching a new combination of the next group of boundaries in the width range until the left boundary of the license plate; continuing to take the right point of the new boundary combination on the right as a starting point to the right WT 3 Searching a new combination of the next group of boundaries in the width range until the right boundary of the license plate; outputting all boundary combinations;
further, the character boundary acquisition module includes:
a left boundary combination search module for marking the left boundary and the right boundary of the reference character block as a group of boundary combinations, taking the left boundary of the reference character block as a starting point to the left WT 3 Searching a left side point and a right side point in the width range, if the left side point and the right side point are unique, combining the left side point and the right side point as a new boundary, if the left side point and the right side point are not unique, respectively calculating the sum of gray vertical projection values and gray vertical projection difference values corresponding to the left side point and the right side point of each group, and combining the left side point and the right side point which are the smallest as a new boundary; continuing to take the left point of the new boundary combination as a starting point to the left WT 3 Searching a new combination of the next group of boundaries in the width range until the left boundary of the license plate;
a right side edge combination searching module for starting from the right boundary of the reference character block to the right WT 3 Searching a left side point and a right side point in the width range, if the left side point and the right side point are unique, combining the left side point and the right side point as a new boundary, if the left side point and the right side point are not unique, respectively calculating the sum of gray vertical projection values and gray vertical projection difference values corresponding to the left side point and the right side point of each group, and combining the left side point and the right side point which are the smallest as a new boundary; continuing to take the right point of the new boundary combination as a starting point to the right WT 3 Searching a new combination of the next group of boundaries in the width range until the right boundary of the license plate;
and the boundary combination output module is used for outputting all boundary combinations.
10. The apparatus of claim 9, wherein the reference character block acquisition module comprises: the character block extraction module is used for extracting character blocks from the third license plate area by adopting a connected area method;
a reference character block selection module for calculating the aspect ratio and the energy mean ratio of each character block, and screening the aspect ratio to be located at [ RT ] 1 ,RT 2 ]The energy mean ratio is located at [ ERT ] 1 ,ERT 2 ]Is a character block of (a); and calculating the character recognition confidence of the screened character blocks, and selecting the character block with the maximum character recognition confidence as a reference character block.
11. The apparatus of claim 9, wherein the minimum point and left and right side point acquisition module comprises:
a small value point searching module for the p-th column x=x of the vertical direction of the third license plate region p If ED p <-ET B Then consider x p Is a small value point, where ED p For p-th column x=x p Energy perpendicular projection difference, ET B A character block energy threshold;
the minimum value point searching module is used for searching the minimum value of the energy vertical projection difference value for the continuous small value point area if the continuous small value point area exists, taking the small value point corresponding to the minimum value of the energy vertical projection difference value as the minimum value point corresponding to the continuous small value point area, and taking the single small value point as the minimum value point if the single small value point exists;
left and right side point searching module for searching minimum value point x q As a starting point, successively searching for a minimum point to the left and right, respectively, if a minimum point x q To the left of (a) has a continuous k 1 The points are small value points, and the continuous k is arranged towards the right 2 The point is a small value point, and the small value point x q X is the left point of (2) q -k 1 The right side point is x q +k 2
12. The apparatus of claim 9, wherein the false boundary filtering and too narrow boundary blending module comprises:
False boundary combination filtering module for constructing boundary groups according to boundary combinationsIf the difference value of all gray vertical projections in the boundary combined area is smaller than 0, filtering the corresponding boundary combined area; calculating the width of the region with gray vertical projection difference greater than 0 in the boundary combined region, if the width of the region is smaller than WT 4 Filtering out the corresponding boundary combined region;
an over-narrow boundary combining fusion module for combining, for two adjacent boundary combined regions, if all gray-scale vertical projection differences between the right boundary of the left boundary combined region and the left boundary of the right boundary combined region are smaller than 0, and the sum of the widths of the two boundary combined regions is not larger than WT 5 Combining the two adjacent boundary combined areas;
and the character segmentation area output module is used for extracting an area at a corresponding position from the third license plate area as a character segmentation area according to the boundary combination area and outputting the character segmentation area.
CN201810751647.6A 2018-07-10 2018-07-10 Character projection segmentation method and device for license plate Active CN108960244B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810751647.6A CN108960244B (en) 2018-07-10 2018-07-10 Character projection segmentation method and device for license plate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810751647.6A CN108960244B (en) 2018-07-10 2018-07-10 Character projection segmentation method and device for license plate

Publications (2)

Publication Number Publication Date
CN108960244A CN108960244A (en) 2018-12-07
CN108960244B true CN108960244B (en) 2023-06-20

Family

ID=64483511

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810751647.6A Active CN108960244B (en) 2018-07-10 2018-07-10 Character projection segmentation method and device for license plate

Country Status (1)

Country Link
CN (1) CN108960244B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109325492B (en) * 2018-08-17 2023-12-19 平安科技(深圳)有限公司 Character cutting method, device, computer equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106485249A (en) * 2016-10-20 2017-03-08 江苏商贸职业学院 A kind of slag-soil truck registration number character dividing method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093181B (en) * 2011-11-01 2016-04-27 青岛海信网络科技股份有限公司 A kind of method and apparatus of license plate image location
CN103020621B (en) * 2012-12-25 2016-02-24 深圳深讯和科技有限公司 The cutting method of Chinese and English mixing character image and device
US9122953B2 (en) * 2013-04-15 2015-09-01 Xerox Corporation Methods and systems for character segmentation in automated license plate recognition applications
CN108108734B (en) * 2016-11-24 2021-09-24 杭州海康威视数字技术股份有限公司 License plate recognition method and device
CN107423735B (en) * 2017-04-07 2020-11-06 西华师范大学 License plate positioning method utilizing horizontal gradient and saturation

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106485249A (en) * 2016-10-20 2017-03-08 江苏商贸职业学院 A kind of slag-soil truck registration number character dividing method

Also Published As

Publication number Publication date
CN108960244A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
CN103324930B (en) A kind of registration number character dividing method based on grey level histogram binaryzation
CN107392139B (en) Lane line detection method based on Hough transform and terminal equipment
CN102254159B (en) Interpretation method for digital readout instrument
Tian et al. A two-stage character segmentation method for Chinese license plate
CN103065138A (en) Recognition method of license plate number of motor vehicle
CN105139011B (en) A kind of vehicle identification method and device based on mark object image
CN116071763B (en) Teaching book intelligent correction system based on character recognition
CN109460722B (en) Intelligent license plate recognition method
WO2023279966A1 (en) Multi-lane-line detection method and apparatus, and detection device
CN109583442B (en) False license plate detection method and device based on line segment detection
WO2020146980A1 (en) Lane line recognizing method, lane line recognizing device, and nonvolatile storage medium
CN108960115A (en) Multi-direction Method for text detection based on angle point
CN110111283A (en) The reminding method and system of infrared suspected target under a kind of complex background
CN111178193A (en) Lane line detection method, lane line detection device and computer-readable storage medium
CN112329776A (en) License plate detection method and device based on improved CenterNet network
CN115761563A (en) River surface flow velocity calculation method and system based on optical flow measurement and calculation
CN108960244B (en) Character projection segmentation method and device for license plate
Choudhury et al. A new zone based algorithm for detection of license plate from Indian vehicle
US10115028B2 (en) Method and device for classifying an object in an image
CN110033425B (en) Interference area detection device and method and electronic equipment
CN116704490B (en) License plate recognition method, license plate recognition device and computer equipment
CN110569801B (en) Identification method for key content of driving license
Pan et al. An efficient method for skew correction of license plate
CN116189119A (en) Lane departure early warning method and device
CN109886120B (en) Zebra crossing detection method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant