Visualizing characters in an Optical Character Recognition database
Artificial neural networks can use optical character recognition. It is perhaps one of the most commonly sited examples. Optical Character Recognition
(OCR) is the process of recognizing handwritten characters in images. Before we jump into building that model, we need to familiarize ourselves with the dataset. We will be using the dataset available at
http://ai.stanford.edu/~btaskar/ocr
. You will be downloading a file called letter.data
. For convenience, this file has been provided to you in the code bundle. Let's see how to load that data and visualize the characters.
Create a new python file and import the following packages:
import os import sys import cv2 import numpy as np
Define the input file containing the OCR data:
# Define the input file input_file = 'letter.data'
Define the visualization and other parameters required to load the data from that file:
# Define the visualization parameters...