170 likes | 534 Views
Optical Character Recognition on GPU. Lan Vu, Spring 2012 Department of Computer Science & Engineering University of Colorado Denver. Optical Character Recognition (OCR). Convert image into text. OCR Applications. Check reader. Form reader. Mail sorter. Passport reader.
E N D
Optical Character Recognition on GPU Lan Vu, Spring 2012 Department of Computer Science & Engineering University of Colorado Denver
Optical Character Recognition (OCR) Convert image into text
OCR Applications Check reader • Form reader • Mail sorter • Passport reader
Techniques for OCR Popular methods A set of algorithms to: • Transform to binary images • Reduce noise • Improve image quality • Correct skew errors • Letter segmentation • Separate text from bkground • Normalize character size • Artificial Neural Network • Hidden Markov Model • Support Vector Machine • Genetic Algorithm • Bayesian Network • Gaussian Model • K-nearest neighbor • Hybrid methods
They are all computational intensive Popular methods A set of algorithms to: • Transform to binary images • Reduce noise • Improve image quality • Correct skew errors • Letter segmentation • Separate text from bkground • Normalize character size • Artificial Neural Network • Hidden Markov Model • Support Vector Machine • Genetic Algorithm • Bayesian Network • Gaussian Model • K-nearest neighborhood • Hybrid methods
Image Processing with GPU • Images are just matrices of colors • RGB grayscale binary • Image processing algorithms • measure and adjust matrices for a purpose • Ideal for GPU • Computational intensive • Process huge amount of data • Highly data parallel computation • Minimal dependency between data elements
Transform to binary images • RGB grayscale binary • Load image into memory as a matrix • For each cell of matrix • Grayscale_color = (R + G + B) /3 • IfGrayscale_color > K • Binary_color = Black • Else • Binary_color = White Predefined threshold e.g. K = 60
Let use CUDA to run it on GPU 1378x1786
Experiment of CPU vs. GPU • Test Cases • Run sequential on Intel Core 2 CPU 1.8Ghz • Run parallel on Intel Core 2 CPU 1.8Ghz (OpenMP) • Run parallel on Gefore 9400 GT Nvidia GPU(CUDA) • Test images: Bitmap 200x300 - Iterations: 10000 • Source Code: I can give a copy if you interest
My current plan with GPU • Sequence Alignment on GPU