• 沒有找到結果。

3.1 License Plates with Different Appearances

3.1.2 License Plates Detection

The first step of the license plate detection system is to detect the license plate regions of the input car images. Due to the similar colors of the license plate background and that of the car body, it is difficult to detect the boundary of the license plate from the input car images in outdoors. Because the color of characters is different from that of the license plate background, the gradients of the original image are adopted to detect candidates of license plate regions. Figure 8 shows the processing flow of license plates detection.

Figure 8: The system diagram.

This section presents the details of license plates detection. The procedure consists of four major steps: (1) detection of possible license plate regions, (2) possibility mea-surement, (3) merging of broken regions, (4) inverse rotation transformation. The last step, inverse rotation transformation, has already been described in the previous section.

The details of the remaining steps are explained as follows.

A. Detection of Possible License Plate Regions

At the first step of the license plate detection phase, the possible license plate regions are detected from the vertical gradients of the input car images. The vertical gradients are derived by multiplying with a mask value for each pixel and its neighboring pixels. In the vertical gradients image, the license plate region is the area with large local variance. The local variances of the vertical gradients image are measured with a local window mask. In

this section, in order to cover the characters in the license plate of the input car images, the size of the local window mask is set as 11× 7. The smaller the window size is, the more possible the license plate regions are separated, while the larger the window size is, the over detected license plate regions occur. Figure 9 shows the possible license plate regions with three different window sizes: 7× 3, 11 × 7 and 15 × 11.

Figure 9: (a) The license plate image; (b)-(d) The possible license plate regions with the sizes of window mask, 7× 3, 11 × 7 and 15 × 11.

The pixel is defined as 1 for possible license plate regions. When we threshold the local variance image, the image of possible license plate regions is obtained. Figure 10(a) shows the image of a car with a license plate, where the colors of the license plate background and that of the car body are similar. Figure 10(b) displays the vertical gradient image of Fig. 10(a). Figure 10(c) and Fig. 10(d) demonstrate the local variance image of Fig. 10(b) and the possible license plate regions, respectively.

There may be some noise in the images of possible license plates such as holes and single dots. An opening operation of morphological analysis, in which the dilation oper-ation is performed after an erosion operoper-ation, is applied in order to reduce the undesired effect of noise and to separate the regions that were slightly connected.

Figure 10: (a) The car image with a license plate; (b) The vertical gradients of Fig. 10(a);

(c) The local variance of Fig. 10(b); (d) The possible license plate regions.

B. Possibility Measurement

To detect the most possible license plate regions from the candidate plate regions, the geometrical properties of the license plate are introduced to measure the possibility value.

The following defines the geometrical features:

• Area: If the candidate region is large, it is more likely being a license plate. A higher possibility value represents a more possible license plate region. The possibility of the area is defined as Ns

Ns, where Ns is the number of boundary rectangle of the possible license plate region, s.

• Orientation: As described before, the orientation of each possible license plate re-gion can be measured. A license plate usually appears as a horizontal rectangle.

The smaller the orientation of the possible license plate region is, the higher the possibility value is. The possibility of the orientation is given by 9090−θ, where θs is

the orientation of the possible license plate region, s.

• Density: The ratio between the black regions and the area of the bounding rectangle is defined as the density of the license plate region. The license plate is always a rectangle. A higher density value means that the region is more likely to be a rectangle and to be viewed as a license plate region. The possibility of the density is defined as Bs/Ns, where Bs is the number of the possible license plate region, s.

For each possible license plate region, s, the possibility value p(s), is defined as the weighted sum of the above three features, as shown below.

p(s) = ω1 Ns

Ns + ω290− θs

90 + ω1Bs

Ns (3.15)

where ωi is the weighting coefficient. We need to select proper ωi that can keep a high detection rate. These values are determined according to experimental results. In this study, ω1 = 0.2, ω2 = 0.3, and ω3 = 0.5 are adopted.

C. Merging of Broken Regions

After the detection of all candidate license plate regions, a license plate is probably sepa-rated into several adjacent regions. In Fig. 11(a), since the distance between the characters F and 4 in the license plate is larger than the threshold of the window mask defined above, two separated candidate license plate regions are generated. These separated regions have to be merged to extract the accurate license plate region.

Assume that s1 and s2 are two possible license plate regions and s is the merged region of s1 and s2. Regions s1 and s2 are merged when the following two rules are satisfied.

• The distance between s1 and s2 is smaller than a threshold value.

Figure 11: (a) The car image with a license plate; (b) The separated possible license plate regions.

• The possibility value of the merged region s is larger than both of s1 and s2.

The merging operation is repeatedly performed until no regions could be merged. Then, the region with the largest possibility value is viewed as the license plate region.