March 2019
Intermediate to advanced
642 pages
22h 54m
English
Let's see how to visualize the characters in an OCR database:
import cv2 import numpy as np
# Load input data input_file = 'letter.data'
# Define visualization parameters scaling_factor = 10 start_index = 6 end_index = -1 h, w = 16, 8
# Loop until you encounter the Esc key with open(input_file, 'r') as f: for line in f.readlines(): data = np.array([255*float(x) for x in line.split('\t')[start_index:end_index]]) ...Read now
Unlock full access