Anda di halaman 1dari 7

Training Report On

Character Recognition using OpenCV


For partial fulfillment of requirement of the degree of Master of Computer Applications (Session 2008-2011) Undertaken at Defence Laboratory (Defence Research & Development Organization) Jodhpur 342011

From 3rd January to 13 May

Submitted By: Kanika Gaur Monika Bidawat Monika Sharma Urvashi Choudhary

Under the Supervision of: Sh. R.K. Khatri Scientist D Defence Lab (Jodhpur, Raj.)

Abstract
The technology that allows a machine to automatically recognize characters through an optical mechanism is called Optical Character Recognition. Human beings recognize many objects in this manner our eyes are the "optical mechanism." But while the brain "sees" the input, the ability to comprehend these signals varies in each person according to many factors. Digitization of text documents is often combined with the process of optical character recognition (OCR). Character recognition is a trivial task for humans, but to make a computer program that does character recognition is extremely difficult. Recognizing patterns is just one of those things humans do well and computers dont. For performing optical recognition of characters we are using MFC library. The Microsoft Foundation Class Library (MFC Library) is a C++ class library released with Microsoft Visual C+ + to support application development on Microsoft Windows. Although MFC is most often used in GUI applications, it can be used to develop any type of application. The MFC Library consists of numerous classes that are thin wrappers for high level Application Programming Interfaces (APIs) such as WinSock and ODBC. All the Win32 Kernel, GDI, and User Objects have associated MFC classes. Along with this we are also using OpenCv an open source Computer vision library. OpenCV is cross-platform middle-to-high level API that consists of a few hundred (>300) C functions. It does not rely on external numerical libraries, though it can make use of some of them (see below) at runtime, if they are available. OpenCV is free for both non-commercial and commercial use.

Acknowledgement
We take immense pleasure in thanking Dr. Narendra Kumar (Director, Defence Lab Jodhpur) for having permitted us to carry out this project work. We would also like to forward our sincere thanks to Dr. S. R. Vadera (Head, Camouflage Division) for his cooperation and helping us in earning this learning opportunity. We would like to thank Sh. N. K. Agarwal (Oi/c Visual Camouflage, Defense Lab Jodhpur) for support and facilities made available. We wish to express our deep sense of gratitude to Sh. R.K. Khatri (Sc D Defense Lab Jodhpur) for his able guidance and useful suggestions, which helped us in completing the project work, in time. We extend our genuine thanks to Dr. M. C. Vyas (Sc B), Sh. Manish Choudhary (Sc B) and Sh. Madhu Sudan (STA C) for their kind help, cooperation to develop this project and providing essential resources to carry out project work. We would also like to thank Dr. Raj Bala Chaudhary (Oi/c Tech. Coord of Training) for her cooperation and support for registration and enrolment. Finally, yet importantly, we would like to express our heartfelt thanks to our beloved parents for their blessings and wishes for the successful completion of this project.

Kanika Gaur Monika Bidawat Monika Sharma Urvashi Choudhary

CERTIFICATE

This is to certify that Kanika Gaur (MCA, Lucky Institute of Professional studies, Jodhpur), Monika Bidawat, Monika Sharma (MCA, Lachoo Memorial Collage of Science and Technology, Jodhpur), Urvashi Choudhary (MSc. Banasthali Vidhyapith, Jaipur) have successfully completed the project titled Character Recognition using OpenCV under my supervision at Defence Laboratory, Organization). They have fulfilled tenure successfully from 3rd Jan 2011- 13th May 2011 for completing this project. They have worked very sincerely throughout the tenure and have enthusiasm and ability to learn and implement. Jodhpur (Defence Research & Development

R K Khatri, Scientist D Defence Laboratory Jodhpur (Raj.)

Contents
1.

Page_No. 1 2 3 3 3 5 6 7 14 15 16 16 17 18 18 18 19 19 20 21 22 22

Introduction 1.1. The OCR .. 1.2. Different Use of OCR ... 1.3. Accuracy 1.4. Applications of OCR .

2. Digital Image Processing


2.1. Types

Of Image

2.1.1. Raster Format 2.1.2. Vector Format


2.2. Bit

map Files

3. Basic Of Development Environment


3.1. 3.2. 3.3. 3.4. 3.5. 3.6. 3.7. 3.8.

Microsoft Visual C++ 6.0 and the Building Process The Resource Editors-Workspace Resource View

The C/C++ Compiler ... The Source Code .. The Resource Compiler .. Linker ... Debugger .. Application Wizard .

3.9. The Class Wizard .


3.10. 3.11.

The Programming Environment .. Help .

3.11.1. 3.11.2.

Local Help Online Help

22 23 24 24 24 25 28 29 30 31 34 36

4. Microsoft Visual C++ 4.1. Visual C++ Developer Studio 4.2. VC++ Runtime Library .. 4.3. VC++ MFC and Template Library 4.4. Active X 4.5. Data Access ...
4.6 .

Enterprise Tools .

4.7. Graphics used by VC++ using MFC ..


4.8 .

Device Context ...

5 Microsoft Foundation Class

5.1. Introduction to MFC 36 5.2. Microsoft Foundation class Library 5.3. Windows Vocabulary .. 38 39

5.4. Event Driven Software . 40 5.5. Designing a Program 41 5.6. Application Object 44 5.7. MFC and Windows Interaction 45 5.8. MFC Application Wizard . 48 5.9. Advantage of Document/View Architecture ... 49 6. OpenCV 6.1. Need of OpenCV Library 51 53

6.2. Relation between OpenCv and other Library .. 6.3. Data Type Supported By OpenCV .. 6.4. Supported feature of OpenCV . 6.5. Application Area of OpenCV .. 6.6 OpenCV Module Over View 6.7. Error Handling in OpenCV . 7. 8. 9. System Requirements Image Enhancements About the Project 9.1. How It Works 9.2. Basic OpenCV Functions .. 9.3. Image Processing Functions Of OpenCV . 9.3.1 Smoothing . 9.3.2. Morphology . 9.3.3. Thresholding 9.3.4. Canny ... 9.3.5. Histogram . 9.3.6. Contours ... 10. Conclusion 11. Bibliography

53 54 59 59 60 61 62 64 65 65 65 67 67 67 71 72 73 73 76 77

Anda mungkin juga menyukai