tesseract

Can not use ChoiceIterator in tesseract

浪尽此生 提交于 2019-12-04 17:32:17
First of all i want to confirm that i understand choice iterator right. For example if i have a word on an image "scope", choice iterator must give me something like "s" and maybe after Next(), "5". for 3. letter "o" it maybe gives me "0", after Next() "O" and after Next() "o". Do i understand right? Here is all my related code, api.SetImage((uchar*)img->imageData,img->width,img->height,img->depth/8,img->widthStep); api.SetRectangle(0,0,img->width, img->height); int left,top,right,bottom; left=0;top=0;right=0;bottom=0; api.Recognize(NULL); tesseract::ResultIterator *ri=api.GetIterator();

How to give best chance of success to an OCR software?

旧城冷巷雨未停 提交于 2019-12-04 17:15:04
I am using Tesseract OCR (via pytesser ) and PIL (Python Image Library) for automated test of an application. I am checking that the displayed text is ok by making a screenshot and getting the text thanks to tesseract. I had some issues in the beginning and it seems to work better since I have increased the size of the screenshot thanks to the bicubic interpolation of PIL. Unfortunatelly, I still have some mistakes like confusion between '0' and 'O'. I can imagine that I will have other similar issues in the future. I would like to know if there are some techniques to prepare an image in order

tesseract OCR in iphone application

笑着哭i 提交于 2019-12-04 17:10:06
I am using tesseract open source engine for OCR to read text from image. But I didn't get 100% result for a single time. Please give your suggestions about quality improvement for OCR using tesseract. Thanks here is how to get best result from tesseract Please make sure that you have done preprocessing on image. OVR will produce best results for the images which have following properties: fix DPI (if needed) 300 DPI is minimum fix text size (e.g. 12 pt should be ok) try to fix text lines (deskew and dewarp text) try to fix illumination of image (e.g. no dark part of image binarize and de-noise

How to fill the gaps in letters after Canny edge detection

一笑奈何 提交于 2019-12-04 17:00:19
I'm trying to do an Arabic OCR using Tesseract, but the OCR doesn't work unless the letters are filled with black color. How do I fill the gaps after Canny edge detection? Here is a sample image and sample code: import tesserocr from PIL import Image import pytesseract import matplotlib as plt import cv2 import imutils import numpy as np image = cv2.imread(r'c:\ahmed\test3.png') gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) gray = cv2.bilateralFilter(gray,30,40,40) #gray = cv2.GaussianBlur(gray,(1,1), 0) gray =cv2.fastNlMeansDenoising(gray ,None, 4, 7, 21) image = cv2.adaptiveThreshold(gray

Error setting up the tesseract OCR in gem in rails

会有一股神秘感。 提交于 2019-12-04 16:54:45
I'm trying to setup the tesseract-ocr gem in my rails environment. I have ran brew install tesseract and then ran a bundle install on the app and that all runs without errors however when starting the app ( rails s ) the following error is throw: /Users/xxxx/.rvm/gems/ruby-1.9.2-p290@xxxx/gems/ffi-inline-0.0.4.3/lib/ffi/inline/compilers/gcc.rb:35:in `compile': compile error: see logs at /var/folders/66/pm_j0lp94gvcj0qnlcnsx9pw0000gn/T/.ffi-inline-501/4239dac38f2a721e0dc5b3750d71ce2e6fa4acb6.log (CompilationError) It reference the following log file: g++ -dynamic -bundle -fPIC -L/usr/local

Need some advices to learn OCR related techniques [closed]

…衆ロ難τιáo~ 提交于 2019-12-04 15:58:17
I'm working on an OCR project for iPhone using tesseract OCR engine. I'm planning to write the following modules: Capture image from iPhone camera Pre-process on the image to refine it, in order to improve the OCR output. Divide the OCR output into meaningful fields. Define some rules for the OCR engine in order to neglect any undefined characters. (e.g. if the the OCR output is 0226s5242 I want it to ignore the s character) I want to begin learning the topics related to these modules, I'm not aware of the OCR related techniques, so any advice will be very helpful, Thanks. Abid Rahman K Then

Tesseract.NET in C#

╄→гoц情女王★ 提交于 2019-12-04 14:53:22
问题 Do you know of step by step guide of how to use bins and dlls in http://www.pixel-technology.com/freeware/tessnet2/ I spent 2 days trying to use this by when compiling i am being asked for a dll that do not exist in the zip file i downloaded from the site. Any help will be greatly appreciated. 回答1: You need the Leptonica DLL for Windows. You can download it from http://www.leptonica.com/download.html, or direct link to the specific zip is here. You need to copy the lib & include folders into

Tess4j on Windows 64-bit: exception on multiple threads

两盒软妹~` 提交于 2019-12-04 14:41:45
I am using tesseract 3 with Java 8 on Windows 64-bit to OCR scanned PDFs. I have followed the instructions on the Tess4j page and have used the 64-bit versions of the required DLLs, and have installed 64-bit Ghostscript. When I run my unit test with the normal @Test (no arguments), the code runs correctly , so I guess I have installed everything correctly. When I run it with 2 threads in parallel (see below) I get an exception. I have read the relevant thread here , but there it is suggested to use Tesseract1, which I am using (I have tried both). Any ideas? This is the code: // @Test // works

Perl Image::OCR::Tesseract module on Windows

放肆的年华 提交于 2019-12-04 14:12:46
Anyone out there know of a graceful way to install the "Image::OCR::Tesseract" module on Windows? The module fails to install on Windows via CPAN due to a *NIX only module dependency called "LEOCHARRE::CLI". This module does not seem to be required to run "Image::OCR::Tesseract" itself. I've managed to get the module working by first manually installing the dependency modules listed in the makefile.pl (except for "LEOCHARRE::CLI") and then by moving the module file to the correct directory structure under "C:\Perl\site\lib\Image\OCR". The final part of getting it to work was to alter the

Extracting lines from an image to feed to OCR - Tesseract

故事扮演 提交于 2019-12-04 13:43:45
问题 I was watching this talk from pycon http://youtu.be/B1d9dpqBDVA?t=15m34s around the 15:33 mark the speaker talks about extracting lines from an image (receipt) and then feeding that to the OCR engine so that text can be extracted in a better way. I have a similar need where I'm passing images to the OCR engine. However, I don't quite understand what he means by extracting lines from an image. What are some open source tools that I can use to extract lines from an image? 回答1: Take a look at