Questions tagged [ocr]

Optical Character Recognition, usually abbreviated to OCR, is the mechanical or electronic translation of scanned images of handwritten, typewritten or printed text into machine-encoded text. The following topics, although some being distinct fields of application, are also commonly referred to as OCR: Handwritten Text Recognition (HTR), Optical Word Recognition (OWR), Intelligent Character Recognition (ICR), Intelligent Word Recognition (IWR).

Optical character recognition, usually abbreviated to OCR, is the mechanical or electronic translation of scanned images of handwritten, typewritten or printed text into machine-encoded text. It is widely used to convert books and documents into electronic files, to computerize a record-keeping system in an office, or to publish the text on a website.

OCR @Wikipedia

Frequently-asked questions:

6124 questions
59
votes
8 answers

What are good algorithms for vehicle license plate detection?

Background For my final project at university, I'm developing a vehicle license plate detection application. I consider myself an intermediate programmer, however my mathematics knowledge lacks anything above secondary school, which makes producing…
Ash
  • 3,494
  • 12
  • 35
  • 42
58
votes
8 answers

Converting a Vision VNTextObservation to a String

I'm looking through the Apple's Vision API documentation and I see a couple of classes that relate to text detection in UIImages: 1) class VNDetectTextRectanglesRequest 2) class VNTextObservation It looks like they can detect characters, but I don't…
Adrian
  • 16,233
  • 18
  • 112
  • 180
57
votes
2 answers

How can I implement OCR on a website using PHP?

Are there any free OCR libraries that work with PHP or Python on a Linux server? The idea is to be able to upload an image and pull out characters from it, or allow users to "draw characters", and parse them out of said image.
Moshe
  • 57,511
  • 78
  • 272
  • 425
52
votes
6 answers

How to get the word under the cursor in Windows?

I want to create a application which gets the word under the cursor (not only for text fields), but I can't find how to do that. Using OCR is pretty hard. The only thing I've seen working is the Deskperience components. They support a 'native' way,…
blez
  • 4,939
  • 5
  • 50
  • 82
52
votes
10 answers

OCR lib for math formulas

I need an open OCR library which is able to scan complex printed math formulas (for example some formulas which were generated via LaTeX). I want to get some LaTeX-like output (or just some AST-like data). Is there something like this already? Or…
Albert
  • 65,406
  • 61
  • 242
  • 386
51
votes
7 answers

Use pytesseract OCR to recognize text from an image

I need to use Pytesseract to extract text from this picture: and the code: from PIL import Image, ImageEnhance, ImageFilter import pytesseract path = 'pic.gif' img = Image.open(path) img = img.convert('RGBA') pix = img.load() for y in…
Smith John
  • 1,035
  • 1
  • 10
  • 19
47
votes
1 answer

Using Tesseract for handwriting recognition

I was just wondering how accurate can tesseract be for handwriting recognition if used with capital letters all in their own little boxes in a form. I know you can train it to recognise your own handwriting somewhat but the problem in my case is I…
Jackdaw
  • 663
  • 1
  • 6
  • 12
47
votes
2 answers

Detect text area in an image using python and opencv

I want to detect the text area of images using python 2.7 and opencv 2.4.9 and draw a rectangle area around it. Like shown in the example image below. I am new to image processing so any idea how to do this will be appreciated.
User9412
  • 491
  • 1
  • 6
  • 8
46
votes
2 answers

Set Tesseract font for OCR

I would like to use tesseract for serial number recognition, where I only want to recognize single characters, no word, no dictionary. Therefore I would like to use one of the already trained tesseract font-types for the serial number to achieve…
Mr.Sheep
  • 1,368
  • 1
  • 15
  • 32
44
votes
2 answers

Split text lines in scanned document

I am trying to find a way to break the split the lines of text in a scanned document that has been adaptive thresholded. Right now, I am storing the pixel values of the document as unsigned ints from 0 to 255, and I am taking the average of the…
Alex
  • 3,946
  • 11
  • 38
  • 66
43
votes
3 answers

Detect if an OCR text image is upside down

I have some hundreds of images (scanned documents), most of them are skewed. I wanted to de-skew them using Python. Here is the code I used: import numpy as np import cv2 from skimage.transform import radon filename = 'path_to_filename' # Load…
singrium
  • 2,746
  • 5
  • 32
  • 45
42
votes
4 answers

Android OCR Library

Does anyone know any available libraries or sample codes that can be used to develop an app that reads the text in an image captured by the camera? Something similar to Google Goggles but only for reading text.
Noah
  • 467
  • 1
  • 4
  • 8
41
votes
10 answers

Converting YUV->RGB(Image processing)->YUV during onPreviewFrame in android?

I am capturing image using SurfaceView and getting Yuv Raw preview data in public void onPreviewFrame4(byte[] data, Camera camera) I have to perform some image preprocessing in onPreviewFrame so i need to convert Yuv preview data to RGB data than…
Hitesh Patel
  • 2,868
  • 2
  • 33
  • 62
41
votes
7 answers

Extracting code from photograph of T-shirt via OCR

I recently saw someone with a T-shirt with some Perl code on the back. I took a photograph of it and cropped out the code: Next I tried to extract the code from the image via OCR, so I installed Tesseract OCR and the Python bindings for it,…
BioGeek
  • 21,897
  • 23
  • 83
  • 145
41
votes
4 answers

What kind of OCR Java library should I use in Android?

I would like to build an Android application that, via an OCR library, should scan a picture extracting text from it . What Java library should I use?
systempuntoout
  • 71,966
  • 47
  • 171
  • 241