Free Essay

# Ocr Matlab

Submitted By jorgeiscar
Words 1132
Pages 5
EEN 538: DIGITAL IMAGE PROCESSING

Optical Character Recognition (OCR) using binary image processing with MATLAB
Abstract- Nowadays, Optical Recognition is becoming a very important tool in several fields: medicine, physics, cosmology, traffic (plate numbers), etc. We can also use this to recognize character for example to digitalize a book. We will talk about this last topic in this report: Optical Character Recognition (OCR). I. INTRODUCTION Once we have the b&w image we can start the segmentation process. To do that we can use the function “bwconncomp”. This function returns us a struct from where we can obtain the characters because it gives us all the connected components. Thus, we can use it to get all the character even if they have 2 or 3 objects. This function returns us the pixels of the connected components (characters) but we have to figure out from those, the coordinates of the character in the original matrix (row and columns). To do this, we will obtain the centroid of every connected component and from it and using the first and last pixel detected of the connect component, we can figure out the exact coordinates of the image. The idea is as follows: Firstly, we can to convert the number that the function returns us to a column and a row. We can do this using the total rows of the original image. Once we have the first and last pixel detected of the connect component in (row, column) we can figure out directly the x-coordinates of the character in the image. Then using the centroid and those pixels we can also deduce the x-coordinates of the character in the image. This process will be more difficult to segment characters with 2 or 3 objects. In these cases we will follow the same process as before but now, the centroid will be the mean of the 2 or 3 centroids. We will repeat this process changing the b&w threshold till the segmentation system finds the correct number of objects that we expect. IV. Before starting with the process It is important to say that depending on if the characters are white and the background black or vice versa, we will have to do the not operation to the image matrix because some functions in MATLAB as “bweuler” require these modifications. RECOGNITION

In this report I will talk about a system (implemented with MATLAB) that will have the objective of recognizing several characters of the Russian alphabet from an image that will include more than one character. This image may include noise and different separation between characters. II. IMPLEMENTATION SUMMARY

To do this, I will follow these steps: Segmentation: in this step, we will obtain the different characters from the original image. Recognition: here, we will recognize the characters that we have got in the previous step. III. SEGMENTATION

In this step, first of all, I will convert the original image (.jpg, .png, etc) to a binary image (black and white) because all the functions that we will use in MATLAB to find a solution to the problem work with binary images. To do this conversion, we need a threshold to decide when an original pixel is going to be a black or white one. This threshold either can be obtained with another function or fixed by the programmer.

In this last step we will extract same properties of the characters to compare them with a date base (with properties of several characters previously analyzed) to recognize them. There are a lot of properties that can be used but I have used the following ones: 1. Euler Number: total number of objects in the image minus the total number of holes.

2. 3. 4. 5.

Number of cuts with row=20 Number of cuts with row=25 Number of cuts with column=17 Number of cuts with column=23

Thus, we have 5 properties to distinguish among the characters. It is important to say that I have taken the idea of the “Number of cuts” from [1]. I have done some modification to this idea such as increasing the number of cuts and modify the points of the cuts. Therefore, with these properties we can recognize the characters. V. TEST Figure 4. Final Result Where the black objects are characters that do not belong to the data base. We can observe how the system worked perfectly (accuracy 100%). 2. Test2:

To test the system we will use 4 images in increasing difficulty. 1. Test1:

We will use the following image:

We will use the following image:

Figure 1. Original Image Thus, if we convert it to a b&w image, we obtain:

Figure 5. Original Image Thus, if we convert it to a b&w image, we obtain:

Figure 2. B&W Image Then, after de segmentation process, we get these objects:

Figure 6. B&W Image Then, after de segmentation process, we get these objects:

Figure 3. Connected Components Finally, after the recognition process, we obtain the final result:

Figure 7. Connected Components Finally, after the recognition process, we obtain the final result:

Figure 12. Detected characters Finally, after the recognition process, we obtain the final result: Figure 8. Final Result Where the black objects are characters that do not belong to the data base. We can observe how the system worked perfectly again (accuracy 100%). 3. Test3:

We will use the following image:

Figure 13. Final Result We can observe how the system fails in this case due to the noise of the image (accuracy 20%). Figure 9. Original Image Thus, if we convert it to a b&w image, we obtain: 4. Test4:

We will use the following image:

Figure 14. Original Image Figure 10. B&W Image We erode the image: Thus, if we convert it to a b&w image, we obtain:

Figure 15. B&W Image Figure 11. Dilated Image Then, after de segmentation process, we get these objects: Then, after de segmentation process, we get these objects:

Figure 16. Connected Components

We can observe how the system completely failed because of the high noise level (accuracy 0%). VI. CONCLUSION

We can observe how when the noise is cero or very low, the system works perfectly, but when the noise increases, the system starts to fail till the accurary goes to 0%. We will finish the report I will write the strength and weaknesses of the system: Strength: • There are not input parameters: There are ‘for’ ciclos to get the best result. The system could recognize characters with 1, 2 or 3 objects.

Weaknesses: • • The system fails with high noise-level. Similiar charactertics among characters. Two characters may have 4 of 5 identical characteristics.

REFERENCES

[1]http://iris.elf.stuba.sk/JEEEC/data/pdf/5_106 -3.pdf

### Similar Documents

#### Character Recognition Project Report

...text, present in digital image, to editable text. It allows a machine to recognize characters through optical mechanisms. The output of the OCR should ideally be same as input in formatting. The process involves some pre-processing of the image file and then acquisition of important knowledge about written text. That knowledge or data can be used to recognize characters. OCR is becoming an important part of modern research based computer applications. Especially with the advent of Unicode and support of complex scripts on personal computers, the importance of this application has increased. The current study is focused on exploration of possible techniques to develop an OCR system for English language when noise is present in the signal. A detailed analysis of English writing system has been done in order to understand the core challenges. Existing OCR systems are also studied to know the latest research going on in this field. The emphasis was on finding workable segmentation technique and diacritic handling for English strings, and built a recognition module for these ligatures. The complete methodology is proposed to develop an OCR system for English and a testing application is also made. Test results are reported and compared with the previous work done in this area. 4.2 DESIGNING OF OCR : Various approaches used for the design of OCR systems are discussed below: Matrix Matching: Matrix Matching converts each character into a pattern within a matrix, and......

Words: 2960 - Pages: 12

Free Essay

#### Essay for Css

...Collage of Advanced Scientific Techniques (CAST) Sahiwal (BZU) | 417/800 | FSc(Pre-Engineering)2008-2010 | G.C Sahiwal (Multan Board) | 619/1100 | Matriculation(Bio Group)2006-2008 | G.M.C.H School Sadar Gogera(Lahore Board) | 555/850 | N.I.C : 35302-7339014-1 Academic Qualification Degree Projects * Book Store System (HTML 5,CSS,JavaScipt) * Student Exam Record Management System Using File Handling (OOP in C++) * Daewoo Bus Service Management System (DBMS Oracle) * Memory Management Data Structure (DSA& AOA using C++) * Book Store and management system(Asp.net C# ) * Game Flip Flop(WPF C#) * Crime Logger System(FYP) (Still Working) * Hand OCR(A.I using MATLAB) * Masters & Masters( Still Working using Oracle 11g) Working Skills In...

Words: 269 - Pages: 2

Free Essay

#### A Survey of Ocr Applications

...International Journal of Machine Learning and Computing, Vol. 2, No. 3, June 2012 A Survey of OCR Applications Amarjot Singh, Ketan Bacchuwar, and Akshay Bhasin Abstract—Optical Character Recognition or OCR is the electronic translation of handwritten, typewritten or printed text into machine translated images. It is widely used to recognize and search text from electronic documents or to publish the text on a website. The paper presents a survey of applications of OCR in different fields and further presents the experimentation for three important applications such as Captcha, Institutional Repository and Optical Music Character Recognition. We make use of an enhanced image segmentation algorithm based on histogram equalization using genetic algorithms for optical character recognition. The paper will act as a good literature survey for researchers starting to work in the field of optical character recognition. Index Terms— Genetic algorithm, bimodal images, Captcha, institutional repositories and digital libraries, optical music recognition, optical character recognition. I. INTRODUCTION Highlight in 1950’s [1], applied throughout the spectrum of industries resulting into revolutionizing the document management process. Optical Character Recognition or OCR has enabled scanned documents to become more than just image files, turning into fully searchable documents with text content recognized by computers. Optical Character Recognition extracts the relevant......

Words: 3379 - Pages: 14

Free Essay

#### Text-to-Speech Synthesis of Two-Syllable Filipino Words

...CONCATENATIVE TEXT-TO-SPEECH SYNTHESIS OF TWO-SYLLABLE FILIPINO WORDS Lourdes T. Tupas, Rowena Cristina L. Guevara, Ph.D., and Melvin Co Digital Signal Processing Laboratory Department of Electrical and Electronics Engineering University of the Philippines, Diliman ABSTRACT In concatenative-based speech synthesizers, one of the most important problems is proper union of speech units to achieve an intelligible and natural-sounding synthetic speech. For that purpose, speech units need to be processed and concatenated so that discontinuities at concatenation points are minimized. Another possible solution to this is by using a larger speech unit to decrease the number of concatenation points. In this project, which utilized two-syllable Filipino words, the speech unit is syllable. Characterization of these Filipino words is done to differentiate words of the same spelling but of different meanings. This characterization took note of the pitch, duration of utterance of each syllable in the word, and the first three formant frequencies. A digital signal processing (DSP) block is also implemented. It accepts two-syllable text and outputs all the possible utterances of that word; this block is the text-to-speech synthesizer. A two-interval forced choice test was conducted to evaluate the level of naturalness of the synthesized speech. Words of the same spelling but of different meanings are distinguished using the prosody and intelligibility test. 1.......

Words: 2642 - Pages: 11

Free Essay

#### Hipi

Words: 4082 - Pages: 17

Free Essay

#### Signal Processing Fir Filters

...Department of Electrical, Electronic and Computer Engineering ESP 411 | Special Assignment Report | | Mark awarded | | Plagiarism declaration 1. I understand what plagiarism is and am aware of the University’s policy in this regard. 2. I declare that this report is my own original work. Where other people’s work has been used (either from a printed source, Internet or any other source), this has been properly acknowledged and referenced in accordance with departmental requirements. 3. I have not used work previously produced by another student or any other person to hand in as my own. 4. I have not allowed, and will not allow, anyone to copy my work with the intention of passing it off as his or her own work. Name | Student number | Signature | | | | Date | | Contents Table of Figures 3 Acronyms Used 3 PART 1 Filtering in the Frequency Domain 3 Introduction 3 Review of Prior Knowledge 4 Complex Numbers 4 Fourier series 4 Fourier Transform 4 Convolution Theorem 5 Overview 5 2-D FFT 6 DFT 6 IDFT 7 2-D FFT 7 Comparison with 1-D FFT 8 2-D FFT and Image Processing 8 Image Smoothing and Sharpening 9 Smoothing 9 Sharpening 11 Conclusion 13 PART 2 Application of Filtering in the Frequency Domain 13 Introduction 13 Gaussian Filter Theoretical Analysis 13 Gaussian Low Pass Filter 14 Gaussian High Pass Filter 14 Gaussian Filter Design 15 Practical Results 16 Conclusion 17 References 18 Table of......

Words: 4172 - Pages: 17

Free Essay

#### Deep Learning Wikipedia

...Deep Learning more at http://ml.memect.com Contents 1 Artiﬁcial neural network 1 1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2.1 Improvements since 2006 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3.1 Network function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3.2 Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3.3 Learning paradigms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3.4 Learning algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4 Employing artiﬁcial neural networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.5 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.5.1 Real-life applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.5.2 Neural networks and neuroscience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.6 Neural network software ...

Words: 55759 - Pages: 224