tesseract

Custom Dictionary for Tesseract

馋奶兔 提交于 2019-12-03 05:13:56
问题 I am currently working on a project for android using tesseract OCR. I was hoping to fine tune the results given to the user by adding a dictionary. According to http://code.google.com/p/tesseract-ocr/wiki/FAQ , the best way to go about this would be to Replace tessdata/eng.user-words with your own word list, in the same format - UTF8 text, one word per line. However there is no eng.user-words file in the tessdata folder, I assume that if I just make a text file with my dictionary in it, it

How can I train my Python based OCR with Tesseract to train with different National Identity Cards?

余生颓废 提交于 2019-12-03 05:06:18
I am working with python to make an OCR system that reads from the ID Cards and give the exact results from the image but it is not giving me the righteous answers as there are so many wrong characters that the tesseract reads. How can I train tesseract in a way that it reads the ID card perfectly and gives us the right and exact details, furthermore how can I get myself to the .tiff file and to make tesseract work for my project. Steps to improve Pytesseract recognition: 1) Clean your image arrays so there is only text(font generated, not handwritten). The edges of letters should be without

Tesseract confuses two numbers

≯℡__Kan透↙ 提交于 2019-12-03 05:01:06
I'm writing an application to scan numbers from an image. The numbers are using the OCR-B font and may also contain + and > characters. This is my source image: The scans using Tesseract weren't very good, even when limiting the character set to the mentioned characters. As I didn't find any OCRB training files for Tesseract, I decided to train it myself. I created this training image and made a box file from it. The box file is correct, all letters are matched correctly. Then I did all steps described here to create the other necessary files. Using this newly trained OCR-B tessdata-set, I get

How can I use Tesseract in Android?

时光毁灭记忆、已成空白 提交于 2019-12-03 04:43:52
问题 I have searched on the net for a couple of hours. I got many answers saying we need to use NDK, etc. for "Tesseract" for WINDOWS. But I didn't get any step-by-step/proper explanation of what should be done when NDK is installed. How to get the .so files? I have finished installing NDK and Cygwin. To check if it's done properly, I entered make -v and it gave the expected output. Can anyone who has used "Tesseract" tell me how they have done it? (I have downloaded "Mezzofanti", but there I didn

What's the way to remove all lines and borders in image(keep texts) programmatically?

随声附和 提交于 2019-12-03 04:26:44
问题 I 'm trying to extract text from an image using Tesseract OCR. Currently, with original input image(as below), output's very poor quality(about 50%).But when I try to remove all lines and borders in input image(using photoshop), output improve a lot(~90%). So is there any way to remove all lines and borders in image(keep texts) programmatically(using OpenCV, Image magick,..) ? Original Image: Expect Image: 回答1: Not using OpenCV, but just a one-liner of ImageMagick in the Terminal, but it may

Recognize a number from an image

独自空忆成欢 提交于 2019-12-03 03:34:19
问题 I'm trying to write an application to find the numbers inside an image and add them up. How can I identify the written number in an image? There are many boxes in the image I need to get the numbers in the left side and sum them to give total. How can I achieve this? Edit: i did a java tesseract ocr on the image but i didnt get any correct results. how can i train it? also i did a edge detection i got this: 回答1: You will most likely need to do the following: Apply the Hough Transform

character-wise confidence values using tesseract 3.01

孤者浪人 提交于 2019-12-03 03:25:11
i executed the following code to generate character-wise confidence values: int main(int argc, char **argv) { const char *lang="eng"; const PIX *pixs; if ((pixs = pixRead(argv[1])) == NULL) { cout <<"Unsupported image type"<<endl; exit(3); } TessBaseAPI api; api.SetVariable("save_blob_choices", "T"); api.SetPageSegMode(tesseract::PSM_SINGLE_WORD ); api.SetImage(pixs); int rc = api.Init(argv[0], lang); api.Recognize(NULL); ResultIterator* ri = api.GetIterator(); if(ri != 0) { do { const char* symbol = ri->GetUTF8Text(RIL_SYMBOL); if(symbol != 0) { float conf = ri->Confidence(RIL_SYMBOL); cout<<

Tesseract and tiff format - spp not in set {1,3}

匿名 (未验证) 提交于 2019-12-03 02:50:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: While trying to run this command: tesseract bond111.tif bond111 batch.nochop makebox I get the next error Error in pixReadFromTiffStream: spp not in set {1,3} Error in pixReadStreamTiff: pix not read Error in pixReadTiff: pix not read Assuming that spp not in set is the main error here, what does it mean? At first it had trouble because the bpp was higher than 24 so I reduced it using Gimp but that did not resolve the issue. 回答1: It probably means your TIFF image has an alpha channel and therefore the underlying Leptonica library used by

Creating a training image for Tesseract OCR

匿名 (未验证) 提交于 2019-12-03 02:50:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm writing a generator for training images for Tesseract OCR. When generating a training image for a new font for Tesseract OCR, what are the best values for: The DPI The font size in points Should the font be anti-aliased or not Should the bounding boxes fit snugly: , or not: 回答1: The 2th question is somehow answered here: http://code.google.com/p/tesseract-ocr/wiki/TrainingTesseract3#Generate_Training_Images There is no need to train with multiple sizes. 10 point will do. (An exception to this is very small text. If you want to

Creating a training image for Tesseract OCR

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm writing a generator for training images for Tesseract OCR. When generating a training image for a new font for Tesseract OCR, what are the best values for: The DPI The font size in points Should the font be anti-aliased or not Should the bounding boxes fit snugly: , or not: 回答1: The 2th question is somehow answered here: http://code.google.com/p/tesseract-ocr/wiki/TrainingTesseract3#Generate_Training_Images There is no need to train with multiple sizes. 10 point will do. (An exception to this is very small text. If you want to