• 沒有找到結果。

A one-pass plate extraction (OPE) was designed to extract all plate candidates from the connected components after the removal of four types of plate runs and horizontal smearing. The steps of OPE are summarized in the following:

1. For an image input, calculate vertical gradients, Gp.

2. For each row in the Gp, find all plate runs; and remove the runs of type 1.

3. For each plate run, smear horizontally with other plate runs and remove the runs of types 2 and 3.

4. After processing all plate runs in each row, update information of connected com-ponents.

5. After processing al rows, extract connected compoents and remove the type 4 runs.

In more complex surveillance environments, the plate candidates might be close or connected with complex backgrounds, in which there are high gradient values. To further explain the problem, a frame of a parking lot is demonstrated in Fig. 63(a), while the corresponding plate candidate map, Gp, and the result after we remove the four types

of plate runs are displayed in Figs. 63(b) and (c), respectively. Because of the trees in the background, OPE would extract many candidates with large regions as shown in Fig. 63(d). The large candidates would meaninglessly consume recognition time. For example, the largest candidate, region R1, is a non-plate one, which is still demanded to be rejected in the cascade plate recognition system. Moreover, we would have inclined plates connected with other patterns; it is difficult to extract compact plates accurately only by suppressing the four types of plate runs. Some of these plate candidates may have wide-margins and are not compact plate regions. For example, the characters in region R2 are connected with other patterns, where the rightmost character is connected with a label. Region R3 shows another example of a plate with wide-margin, where the plate is connected with the backgrounds. The extracted regions R1, R2, and R3 are enlarged in Figs. 63(f)-(h), respectively.

(a) (b) (c)

(d) (e)

(f) (g) (h)

(i) (j) (k)

Figure 63: Results of the OPE and the BOPE algorithms in a complex environment of a parking lot: (a) the original frame with multiple motorcycle plates, (b) the corresponding plate candidate map, (c) the result after removing the four types of plate runs from (b), (d) the result after applying the OPE procedure in (b), (e) the result after applying the BOPE procedure in (b), (f)-(h) the extracted regions R1-R3 of (d), and (i)-(k) the extracted regions R1-R3 of (e).

The problems after we apply the OPE are summarized as follows:

• Large plate candidates. This type of candidates is caused by the complex envi-ronments.

• Wide-margin plate candidates. This type of candidates is caused by the complex environments or adornments closed to the plate characters.

• Small plate candidates. This type of candidates sometimes occurs when special characters, such as “1”, exist successively with a large gap.

In order to solve the problems, some procedures, such as character boundary detec-tion, could be applied to reject the large background patterns or to remove the wide-margins, but they would be time-consuming. To extract all compact plate regions accu-rately without increasing the algorithm’s time complexity, we propose a bi-level one-pass plate extraction algorithm (BOPE) as shown in Algos. 5, 6, and 7.

In the first level as depicted in Algo. 5, plate candidates are extracted as connected components after we apply the smearing method and exclude the three types of plate runs 2, 3, and 4. These steps are similar to the OPE and shown in the loop “foreach”

of Algo. 5. The sub-procedure of runs finding as shown in Algo. 6 is used to determine all horizontal plate runs while excluding the vertical plate runs 1 higher than Hp. In the algorithm, the numbers of pixels, which are grouped in plate candidates, are accumulated in a summed area table [132], CS, to speed up the second level procedure. Each value at location (x, y) of CS contains the sum of the pixels above and to the left of (x, y):

CS(x,y) = ∑

x0≤x;y0≤y

pr(x0,y0)= CS(x−1,y)+ CS(x,y−1)− CS(x−1,y−1)+ pr(x,y) (6.1)

with

CS(−1,y) = CS(x,−1) = 0,

where pr(x, y) equals to one if the point (x, y) belongs to the plate run, or zero if it is not.

In the second level as depicted in Algo. 7, large or wide-margin plate candidates are adjusted to compact plate ones by comparing the probabilities of compactness for each sub-region inside the candidates. The probability could be estimated from the number of pixels in a grouped plate run, since each point in the plate run is identified as a part of the plate region. Then, for each sub-region, the probability of compactness Pc is defined as

Pc =∑

x

y

pr(x, y), (6.2)

where (x, y) is the point in the sub-region. The sub-region with the highest Pc is selected as the new compact plate candidate based on the assumption that the sum in the plate region would be larger than those of neighboring regions. Moreover, to avoid redundant calculations, Pc is measured in constant time from CS and re-defined as

Pc = CS(r,t)− CS(l,t)− CS(r,b)+ CS(l,b), (6.3)

where l, t, r, b denote the left, top, right, and bottom boundaries of the sub-region, respec-tively.

As shown in Fig. 63(e), the three plates extracted by our BOPE are tighter than those extracted by the OPE. The extracted regions R1, R2, and R3 by the BOPE are shown in Figs. 63(i)-(k), where the regions R2 and R3 are compact plate regions.

Data: Gp

Result: candidates of compact plate regions foreach row in the image do

FindAllRuns() ; foreach Runi do

if kRuni, Runjk ≤ λs then group Runi and Runj // Smearing;

if kRunik > Wp then continue to process next run ;

if kRunik < λs and kRuni−1, Runik > Wp and kRuni, Runi+1k > Wp then continue to process next run ;

end

update information of corresponding connected components when Runi is connected with runs of the previous row ;

end

for non-updated connected components do PlateReestimation() ;

extract connected components whose sizes are larger than (Hp× Wp)/4;

end end

Algorithm 5: BOPE algorithm for extracting compact plate regions.

Data: the rowy of Gp

Result: plate and non-plate runs Initialize an array Acc[width of Gp];

foreach column(x) in the rowy do if rowy(x) > 0 then

Algorithm 6: Algorithm for run determination, FindAllRuns.

Data: connected components and CS Result: plate candidates

foreach connected component, CCi do

if the size of CCi is larger than (Hp× Wp) then

determine the compact plate candidate, which size is (Hp × Wp) with the largest Pc (Eq. 6.3);

reject the plate candidate when the gradient sum is lower than a threshold end

else

extend the left and right boundaries end

end

Algorithm 7: Algorithm for plate re-estimation, PlateReestimation.