OCR which stands for Optical Character Recognition is a computer vision technique used to identify the different types of handwritten digits that are used in common mathematics. To perform OCR in OpenCV we will use the KNN algorithm which detects the nearest k neighbors of a particular data point and then classifies that data point based on the class type detected for n neighbors.
This data contains 5000 handwritten digits where there are 500 digits for every type of digit. Each digit is of 20×20 pixel dimensions. We will split the data such that 250 digits are for training and 250 digits are for testing for every class.
Below is the implementation.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Text Detection and Extraction using OpenCV and OCR
- OCR of English alphabets in Python OpenCV
- License Plate Recognition with OpenCV and Tesseract OCR
- Python | Classify Handwritten Digits with Tensorflow
- Identifying handwritten digits using Logistic Regression in PyTorch
- Handwritten Equation Solver in Python
- Python | Reading contents of PDF using OCR (Optical Character Recognition)
- Python | OCR on All the Images present in a Folder Simultaneously
- OpenCV - Facial Landmarks and Face Detection using dlib and OpenCV
- Transition from OpenCV 2 to OpenCV 3.x
- Opencv Python program for Face Detection
- Real-Time Edge Detection using OpenCV in Python | Canny edge detection method
- OpenCV Python Program to analyze an image using Histogram
- Detection of a specific color(blue here) using OpenCV with Python
- Python Program to detect the edges of an image using OpenCV | Sobel edge detection method
- Erosion and Dilation of images using OpenCV in python
- Line detection in python with OpenCV | Houghline method
- Template matching using OpenCV in Python
- Set up Opencv with anaconda environment
- Addition and Blending of images using OpenCV in Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.