Information Technology Reference
In-Depth Information
Gene 63* - (* comes from the operation of inverting the central input) has to
be applied only one iteration to extract the edges of the rectangles. These
edges are always one pixel wide. The implementation formula for ID 63*
is:
>
E w .
Using some simple switching elements, as shown in Fig. 8.2, one single control
bit can be used to toggle between the ID = 768 and ID = 63* genes as desired by
the algorithm.
The above sequence of genes performs correctly even when the characters are
rotated, as seen in Fig. 8.4. Note however that if two characters are supposed to
produce overlapping blocks (see the sequence U I in Fig. 8.4) then a single rectan-
gle is produced for both characters.
4
)
D
4
Fig. 8.4. The segmentation algorithm applied to a rotated image. Here the “UI” sequence
collided into a single rectangular box
8.2.3 Feature Extraction and Classification
The following simple algorithm “reads” the positions and the sizes of the char-
acter boxes determined in the output image by the CA processing described above.
It is implemented using the controller and it generates a list of four-dimensional
vectors. Each vector contains the position (Px, Py) and the size (Sx, Sy) of a box
surrounding a character:
ix=0; // found character index
FOR I=1:M-1
FOR J=1:N-1
IF neigh(output_image,I,J) is “left corner” THEN
ix=ix+1
Px(ix)=J; Py(ix)=I; // character position
Sx(ix)=count_all_black_pixels_rightwards();
Sy(ix)=count_all_black_pixels_downwards();
// character rectangle size
F=FEATURES(input_image, PX, PY, SX,SY);
X=RECOGNIZE (F);
END
END
END
Search WWH ::




Custom Search