Zhongliang Fu
The distance of P, and P; is equal to 2W. P,, P, and P,, Pe is used to detect diagonal stroke.
The algorithm features dynamic of stroke width without limitation, preserving character shapes and resisting
noise.
3. LOCATING CHARACTER GROUP
Due to the complexity of background and the effect of noise, no all of 1 pixels detected in binary process belong
to character stroke. These pixels must be separated with the pixels in character. The role of character location is
to determine the location and range of characters. The algorithm is as follows:
1) Scan image row-by-row from left to right, and from up to down, record the numbers N, of 1 pixel in
each row, the numbers N, of 0 pixel to 1 pixel and the numbers of 1 pixels appearing continuously N;.
For ith row,
N N
M=XBG,D, N =XB6,D-0-B6,0, N=" @
j=0 i=0 2
Where, N is the width of image.
2) If following inequations yield,
LC*W <N,<4*LC*W
LC « N, «3«LC (5)
W/2« N, «2*W
then character pixels may exist in ith row. LC is the length of character group. For the number code of freight
car, LCz7.
3) If inequations (5) yields in continuous five rows starting from ith row, then row number i| is recorded,
r(k)=i.
4) Set R, = min (r(k)),
R, = max (r(k)), k = 1,2, (6)
Where, R,, R, are minimum and maximum number of row where character pixels are in.
Similarly, characters between R; and R, are projected in horizontal direction. With the project value, the range
of characters in vertical direction can be determined.
For the jth column, suppose project value is N,.
R,
N,- M Bü. j) (7)
izR
If the following inequation is satisfied in continuous five column,
W«N4«HC (8)
then, the column number c(k)=j is recorded. Where, HC is the height of character. Finally, minimum and
maximum column number is computed.
C, = min(c(k))
C, =max(c(k)) k=1,2,... (9)
C;, C; is the range of character group in horizontal direction.
4. CHARACTER SEGMENTATION
The role of character segmentation is to segment each character in character group. It may utilize information as
the space between characters, character height and width. The algorithm is as follows:
1) The character group image is projected in vertical direction, have G(i, j) = > BG, i
International Archives of Photogrammetry and Remote Sensing. Vol. XXXIII, Part B3. Amsterdam 2000. 307