Professional Documents
Culture Documents
using MATLAB
Example of OCR:
Optical
Character
Recognition
Y8310
Y8384
OCR Pre-processing:
These are the pre-processing steps often performed in OCR.
Morphological Operators Remove isolated specks and holes in characters. Can use
certain morphological operators such a bwareopen etc.
Segmentation This is the most important part of the whole process. Check
connectivity of shapes, label, and isolate. Can use Matlabs bwlabel and regionprops
functions. Difficulties with characters that arent connected, e.g. the letter i, a
semicolon, or a colon (; or :). An alternate way is extracting lines and then characters
in each of the lines by detection of boundary 1-pixels and the cropping them. This
way, the problem with unconnected letters like i, ;, : etc., can be taken care of.
OCR Feature extraction:
After obtaining the individual characters, we have to find out which one
corresponds to what. There are several ways of doing this. The criteria used for
evaluating the accuracy of these ways are the following.
Robustness.
1) Noise.
Sensitivity to disconnected line segments, bumps, gaps, filled loops etc.
2) Distortions.
Sensitivity to local variations like rounded corners, improper protrusions,
dilations and shrinkage.
3) Style variation.
Sensitivity to variation in style like the use of different shapes to represent the
same character or the use of serifs, slants etc.
4) Translation.
Sensitivity to movement of the whole character or its components.
5) Rotation.
Sensitivity to change in orientation of the characters.
Practical use.
1) Speed of recognition.
2) Complexity of implementation.
3) Independence.
The need of supplementary techniques.
In our implementation, we used the most primitive but practical way as our means of
feature extraction i.e. Template Matching.
Training:
We make templates of each character (images of size 50 X 30 containing
individual characters). Then, we store them in a cell array. This is done in
create_templates.m
Recognition:
After obtaining the regions of image with characters, we resize each of them
into a 50 X 30 image to match the size of templates we have created. Picking each of
the character images, we correlate it with each of the templates we have and store the
values in a cell. The template which gives the maximum correlation coefficient for an
individual character image should give us the character in the image. This is
implemented using the M-file read_character.m.
Although the above suggested ways may give us OCR with better accuracy, the have
their drawbacks
Difficulty in implementation
Requirement of more time for processing thereby making them less practical
Even after all this, some of them require additional context based error
detection such as use of dictionaries, syntax and adaptive techniques for their
performance
Conclusion:
The objective o segment and recognize characters in image have been
achieved. We used only Template matching and correlation as our recognition
process. So, the accuracy may not be very good. But, a very good way is suggested
below based on experimental results as given in a paper.
After several experiments been done to find the best method to recognize the
characters with highest accuracy and considerable amount of time, the best way is by
using templates correlations as main recognition method with Fourier Descriptor and
several heuristic approach as filters. Experiments have found that this methods
recognition accuracy is 98.46%.
Sources:
(1) Line Eikvil Optical Character Recognition, December 1993 .
(2) Badruz Nasrin Bin Basri Text Detection and Character recognition from
images. (ppt)
(3) Digital Image Processing Using MATLAB by Gonzalez and Woods.