Keywords

1 Introduction

The character segmentation method in license plate image is the premise of next step, character recognition, and it determines the character recognition rate. So, the step of the character segmentation attracts great attention around the world. Researchers promote kinds of solutions on the basis of the existed printed character segmentation technology (Hong Zhao et al. 2004). Nowadays, one popular way of segmentation is utilizing the fixed aspect ratio of character and the character space as the Priori Knowledge (Lu Yi 2003); The threshold (T) is determined by Mathematical Expectation (E) and Variance (D): T = E−D. E and D got from the Projection-histogram of the last step. The home position is determined when the background pixel satisfies the inequality piexl[i] < T < piexl[i + 1]. The ending position is determined when the background pixel satisfies the inequality piexl[i] < T< piexl[i − 1]. In this way, all the characters can be determined; As it shows above, the threshold is important for this method’s segmentation performance. So this method needs researches on every segmentation results and the readjustment if there’s a specified amount of deviation (Casey and Lecolinet 1996). Firstly, the gray histogram on the basis of vertical and horizontal direction’s projection must be concluded (Haijiao Wang et al. 2008). Secondly, choose the suitable threshold to segment the license plate image and character according to the gray histogram. Then the character segmentation combined with aspect ratio and the nor malized transact can be done. So the next step of feature extraction can be easily achieved. This paper will do the binarization of license image, and then project the binary image at the vertical direction. At the same time, I take the advantage of characters’ aspect ratio and the character space along with contour analysis to cut the character of license plate image.

2 Choosing the Suitable Threshold and Doing the Binarization

The license plate character segmentation performance is determined by the binarization. The key factor is choosing the threshold. The background and the object are distinguished by the threshold. The Binarization Formula is:

$$ g\left( {x,y} \right)=\left\{ \begin{aligned} 1\quad f(x,y)\geqslant T \hfill \\ 0\quad f(x,y)<T \end{aligned} \right. $$
(1)

f(x,y) is the Original Gray Images; g(x,y) is the Transformed Image.

There are many kinds of traditional ways to choose the threshold, but most methods need a prior probability distribution of destination and background. Then the optimal threshold which satisfies this distribution can be achieved by utilizing the Bayesian formula (Jin Zhang et al. 2008). But it is an impossible way for the real object for the statistic of license plate target points is a difficult problem to deal with. What’s more, the license plate background values can affect the threshold.

Different ways to choose threshold according to thread:

  1. 1.

    Probability and Statistics, if g is threshold, the object points are consisted of points < g. P is the ratio of object points and all the points. The gray value is 0, 1, 2,…, g, till the ratio closing to P. This threshold is image threshold (Ni Fuyin 2011).

  2. 2.

    The average value of maximum gray value and minimum gray value can be simply regarded as segmentation threshold of the image when dealing with high quality image whose gray level-differential value is large (Yu Zhang et al. 2006).

  3. 3.

    If g is threshold, there are more target points and background points while fewer points whose gray value is g. In this case, the gray value of minimum points can be determined as threshold. This is the trough principle of gray histogram. The object and background take most of the points, so the two peaks of image can be achieved. On the other hand, the points which are close to threshold are fewer to consist of the trough of the image. If the image is complicated changing, looking for the trough is the most important part of this method.

  4. 4.

    When transiting from background to objects, edge points are the points with greatest change of gray value. In this case, the edge gray value can be determined as image threshold. This method is used when doing the local threshold segmentation.

This essay focuses on gray value histogram iterative method to look for trough on the basis of enhanced treatment of image. The middle point of average gray value of background and average gray value of character is threshold (T). The formula is (Lifeng Zhang and Jun Dai 2008):

$$ \begin{aligned} T=\frac{1}{2}\left( {\frac{{\left( {\sum\limits_{i=1}^{T-1 } {i\times H(i)} } \right)}}{{\sum\limits_{i=1}^{T-1 } {H(i)} }}+\frac{{\left( {\sum\limits_{i=T}^N {i\times H(i)} } \right)}}{{\sum\limits_{i=T}^N {H(i)} }}} \right) \end{aligned} $$
(2)

H is gray value histogram. N is maximum gray value (as 255). The formula above can conclude that the threshold is in trough. Then do the iteration till TK = TK + 1. TK is threshold. The formula is:

$$ \begin{aligned} {T_{k+1 }}=\frac{1}{2}\left( {\frac{{\left( {\sum\limits_{i=1}^{{{T_k}-1}} {i\times H(i)} } \right)}}{{\sum\limits_{i=1}^{{{T_k}-1}} {H(i)} }}+\frac{{\left( {\sum\limits_{{i={T_k}}}^N {i\times H(i)} } \right)}}{{\sum\limits_{{i={T_k}}}^N {H(i)} }}} \right) \end{aligned} $$
(3)

The binarization treatment is after the threshold determined. The procedure is easy. The gray value which is less than threshold value is gray region. The gray value which is more than threshold is objection. The license plate gray value and binarization image are as follows (Figs. 1 and 2).

Fig. 1
figure 1

Car plate gray

Fig. 2
figure 2

Binarization image

As above images show, some pictures are black character with white background while other pictures are white characters with black background after binarization treatment. To explain this phenomenon, we notice that there are four kinds of color: white character with blue background, black character with yellow background, black or red character with white background and white or red character with black background. When the license plates are black character with yellow background and black or red character with white background, after turning them to gray image, the gray value of objection is less than background. In this case, the technology of image determination is needed to transform the situation of black character with white background.

Choosing threshold is the key step of Binarization treatment. To find better ways to choose threshold, I analyze the histogram through Laplace Histogram, Difference Histogram and Gradient-histogram, but the result is barely satisfactory. So I still use the traditional histogram algorithm method.

3 Character Segmentation Algorithm

There are many ways of character segmentation Algorithm such as the License Plate Segmentation algorithm by Rough Transition and Priori Knowledge; They are complex. It is important to find a better algorithm of faster speed and higher segmentation rate for the system as license plate recognition with high timeliness requirement (Zhao Peng and Zhao Zhong-meng 2011).

3.1 Fixed Bindery Segmentation

The size (aspect ratio) of license plate is certain, so as the size of character, script, number and distribution. The segmentation can be done according to the location of character in the image under the situation of location accurate, image capture fully and variant little.

Fixed bindery segmentation is easy, not affected by noise and independent on the condition of image. However, the requirement is high on the size accurate. Or the character is not entire and make bad influence on the character recognition.

3.2 Projection Segmentation

The principle of projection segmentation firstly turn the license plate image to Binarization image (black is 0, white is 1). Then the vertical projection can be achieved through accumulating the pure gray value from row’s horizontal direction. The gray value between characters is always 0. The projection image can form to trough or form to a special wave crest. Find out the valley points between two peaks. Use them as the position of character segmentation (Jun Tao 2008). Then complete the character segmentation. The process is as follows:

Assuming binary image is M × N matrix, its vertical projection:

$$ D(j)=\sum\limits_{i=1}^M {f(i,j)} $$
(4)

f(i, j) is pixels. (i, j) is gray value. Then do the differential operators to the projection vectors.

$$ \left\{ {\begin{array}{*{20}{l}} {{\it Diff}(j)=1\ldots G(j+1)-G(j)<0} \\ {{\it Diff}(j)=0\ldots G(j+1)-G(j)=0} \\ {{\it Diff}(j)=-1\ldots G(j+1)-G(j)>0} \\ \end{array}} \right. $$
(5)

Search the graphic coordinates matching recognition in the vectors Diff.

$$ D(j)=\sum\limits_{s=1}^S {\sum\limits_{t=1}^T {\left[ {{\it Diff}(j-t)-M(s,t)} \right]} } $$
(6)

D(j) is similarity. S is template number. T is factor number in template.

The trough between characters will be greatly affected because of the noises. The result is the bottom is not obvious. Even seriously, bottom will disappear resulting in character segmentation error or mistakes. Ultimately affect the character recognition. Therefore, the method of the plate is relatively high image quality requirements. Even already removed the border and rivets, there still have noises when interception of the general license plate, and sometimes the inaccurate judgment will affect the trough.

3.3 Connective Area Segmentation

Connective area method is based on the principle of mathematical morphology and utilizes the structuring elements to collect image information in order to understand the structure of the image.

The basic morphological operations are: corrosion and intumescent. The corrosion makes the objection reduced, the inter-bore increased and eliminates the external noise isolation. The intumescent makes the objection increased and the inter-bore reduced to form connected area. B is structural elements. A is working range. The formulas are as follows:

$$ \mathrm{corrosion}\;A\varTheta B=\cap \left\{ {A-b:b\in B} \right\} $$
(7)
$$ \mathrm{intumescent}\;A\oplus B=\cap \left\{ {A+b:b\in B} \right\} $$
(8)

Another two important methods are opening and close operation. Corrosion before intumescent is opening while intumescent before corrosion is close operation. The formulas are as follows:

$$ \mathrm{opening}\;{\rm AOB}=\left\{ {A\varTheta B} \right\}\oplus B $$
(9)
$$ \mathrm{close}\ \mathrm{operation}\;A\bullet B=\left\{ {A\oplus B} \right\} \varTheta B $$
(10)

This essay combines corrosion and opening to do the license plate character segmentation.

The formula is:

$$ X\oplus S=\left\{ {(x,y)|(\mathop{S}\nolimits_{(x,y)}^{\wedge })\cap X\ne \varnothing } \right\} $$
(11)

Find the point, then recursive using the formula above till the set of elements of the character pixels are no longer increasing. Its advantage is independent on tilted image. What’s more, the positioning is accurate. The drawback is that it requires high quality images and converts a good binary image. The two characters are not linked together in the binary image.

3.4 Integrated Algorithm of Character Segmentation

Connective area method, comparing with the projection and fixed boundary method, is more accurate but more sensitive to noise, when one character is next to another, it will fail in segmentation. However, projection and fixed boundary method are not sensitive to this. Character segmentation are compared as below (Table 1):

Table 1 Character segmentation comparation

To achieve the optimal segmentation effect, This paper has proposed an integrated method to enhance it. The figure above has shown the best ways to assemble the three methods to achieve the optimum.

Procedure:

  1. 1.

    To transfer Gray Images to Binarization Images using dynamic threshold approach.

  2. 2.

    Scan to the right at one seventh of width of the license plate image by connective area method, to see whether six connective components could be found.

  3. 3.

    If failed, to determine the position of characters using projection.

  4. 4.

    If failed again, to break up characters using fixed frontier approach.

Connective area method acts as the main method of detection for its success rate of detection is particularly high, when the input image is of low noise or without black area, which is similar to the characters. Static boundary method, as the last method, is based on the horizontally-arranged characters. Because of the first character of the license plate is Chinese and of no connective characteristics, it is detected using projection.

This paper stated all the improved template matching method that has been utilized in the License Plate Recognition. The experiment was conducted using Matlab emulator. The original statistics are 100 original standard images of Vehicle Administration Office and 100 on-the-spot images of Toll Station. The results of the experiment are as below (Table 2):

Table 2 The contrast of two algorithm

We can see from the above figure that the algorithm we proposed in This paper has improved self-stability and timeliness, especially the on-the-spot images with high timeliness.

4 Prepare Your Paper Before Styling

This paper introduces the main methods of image extraction and separation, proposing an integrated method of character separation. We popularize the traditional connective area method, combining the merits of projection and fixed boundary method, to make mutual complementation in calculating speed and separating quality\( {_{\circ}} \) Experiments have shown that this method, based on the enhanced effect of image separation, accelerate the image processing.