Edge Detection Algorithm for Yoruba Character Recognition

Digital image processing for pattern recognition involves several processing and pre-processing steps. Edge detection stands a great position for accurate pattern recognition most especially in character recognition system. Many edge detection techniques were implemented with convolution mask and based on approximations to differential operators. For efficient Yoruba character recognition, compass edge detection algorithm was developed to enhance the recognition rate of Yoruba character. The algorithm developed achieved 0.923 edge detection error rate. The level of accuracy will have been better if noise removal or reduction steps were included in the algorithm.


INTRODUCTION
Pattern recognition is the process of making decision in order to automate functions using computer system. Pattern recognition encompasses a wide range of information processing problems which are of great practical significances. Practical application of pattern recognition includes and not limited to biometric recognition, optical character recognition (typed and hand written), medical imaging for diagnosis, fault detection in machineries etc.
Optical character recognition (OCR) is the processing of converting digital image of a scanned character printed or hand written into readable character stream by computer based systems. Optical character recognition has become one of the most successful application of technology in the field of pattern recognition and artificial intelligence [1] The performance of OCR largely depends on the quality of the input document, the pre-processing of the document image, segmentation, edge detection algorithm, feature extraction technique used in the process of character recognition.
An edge in a digital image is a point of sudden change in pixel intensity of the image, edge therefore, differentiate between an object in an image from its background [2].Edge detection is fundamental in low level image processing [3], good edge detection is necessary for high level of performance in image and pattern recognition. Though there are several edge detection algorithms, the quality of edge detection is highly dependent on lighting conditions of the of the objects in the image, the presence of objects of similar intensities, density of edge in the scene and noise. [4]

LITERATURE REVIEW
The naïve nature of computer system has made pattern recognition and classification highly tasking in computer vision and artificial intelligence. The advancement in pattern recognition has accelerated recently due to many emerging applications which are not challenging but also computationally intensive. This is evident in optical character recognition [4] Character recognition originated as early as 1870 when Carey invented retina scanner, which is an image transmission system using photocell. It is used as aid to the visually impaired persons, develop by the Russian scientist. Tyurin in 1900. Optical character recognition was realized as a data processing application to the business world [5].
Yoruba language is a tonal language of which the meaning of a word depends on the tone with which it is called. Words of the same spelling will have different meaning depending on the tones.

Yoruba character Set
The Yoruba character set is made up of twentyfive characters or alphabets, some of which are similar to Roman characters or letters. Out of these twenty five characters, seven are vowels and the remaining eighteen are consonants. All the twenty five letters in Yoruba character set can assume upper and lower case.
The twenty five Yoruba character set are as follows: The upper case: The lower case: a b d e ẹ f g gb і h j k l m n o ọ p r s ṣ t u w y There are seven vowel letters in the Yoruba character set, these letters are as follows: The letter 'GB' or 'gb' is a combination of two consonants, this is a special case and the only situation when two consonants letters are allowed to follow each other in Yoruba orthography.

EDGE DETECTION TECHNIQUES
Edge detection in digital image is a very important aspect in the field of pattern recognition and classification. Edge defines the boundaries between an object in an image and its background. Edge detection helps in object segmentation, classification and recognition [5]. There are numbers of edge detection techniques in the field of pattern recognition, these includes Canny edge detector has best error rate so far. By variation method, Canny derives an optimal edge detection operator which turns out to be well approximated by the first derivatives of a Gaussian function [6].
(4) Colored edge detectors, are of three categories output Fusion methods, Multi-imensional gradient methods and Vector methods [9].

Yoruba Character Edge Detection Algorithm
Since all edge detection results are usually affected by image noise, it is a good practice to filter (enhance) out noise from the image to reduce false edge detection. Gaussian filter is applied to convolve with the image. This step will slightly smooth the image to reduce the effect of the obvious noise on the edge detection algorithm. Convolution of the image by 5X5 Gaussian filter, which filters the image reduces the level of false edge detection as well as omission to the bearest minimum.
Two-dimensional mask operators are commonly used for filtering and image edge detection. Two-dimensional discrete differentiation can be performed by convolving the original image with the compass gradient masks [10,2] Compass edge detection is a form of differential gradient edge detection. As a result, the operation generates two images: one estimating the local edge gradient magnitude and one estimating the edge orientation [8,11]. In spatial domain gradient at a location (m,n) is defined as , ≜ | , | Where k = 0,1,2 ………..7 Each gradient is at 45 0 from the previous one, the first one is the direction of North, followed by North-West, then West , South-West and so on back the North as shown in figure 3.1 The direction of edge gradient magnitude is given as The operator takes a single kernel mask and rotates it through all 8 compass directions. The edge magnitude is calculated as the maximum magnitude of all directions. The edge direction is defined by the mask that produces the maximum edge magnitude. The compass edge detector is one of the ways to estimate the magnitude and orientation of an edge. Although differential gradient edge detection needs a time-consuming calculation to estimate the orientation from the magnitudes in the x-and y-directions, the compass edge detection obtains the orientation directly from the kernel with the maximum value [10,5].
The 8 possible kernel in the eight directions are as show below The edge map is plotted by calculating the gradient of two orthogonal directions, for example G x and G y , which measure the gradients in the North and West directions; approximate the partial derivatives in order to detect edges in the x-direction and y-direction, respectively. Application of G x and G y to an image results in spatial differentiation in the two orthogonal directions and the edge map is plotted accordingly.
The magnitude of the edge map is given as The direction of edge map is given as

EXPERIMENTAL RESULT AND ANALYSIS
The implementation of the developed algorithm was carried out on Matlab environment, several test document images were used along with graphically generated lower case Yoruba vowel letters with diacritical marks. The document images and generated character images were first converted to greyscale image using Luma correction algorithm ITU-RBT 601 version (b).
The algorithm is given as The greyscale image was then smoothen with 5X5 Gaussian filter to reduce the effect of noise.
Finally, convolution with 8 possible directional compass kernel (mask) was carried out on the document images and graphically generated Yoruba character image.
The performance of the edge detection algorithm was measured using the edge detection error rate metric.

CONCLUSION
The edge detection is very important in the process of Yoruba character recognition, the developed algorithm will enhance accurate Yoruba character recognition most especially the offline printed Yoruba characters.
The compass edge detector presents a suitable method for effective edge detection in character recognition. This was shown in the edge detection error rate achieved in this work.
The achieved result can be improved upon by including noise reduction step in the edge detection, segmentation and recognition algorithm.