tesseract

pytesseract using tesseract 4.0 numbers only not working

徘徊边缘 提交于 2019-12-03 07:41:19
Any one tried to get numbers only calling the latest version of tesseract 4.0 in python? The below worked in 3.05 but still returns characters in 4.0, I tried removing all config files but the digits file and still didn't work; any help would be great: im is an image of a date, black text white background: import pytesseract im = imageOfDate im = pytesseract.image_to_string(im, config='outputbase digits') print(im) You can specify the numbers in the tessedit_char_whitelist as below as a config option . ocr_result = pytesseract.image_to_string(image, lang='eng', boxes=False, \ config='--psm 10

How to extract text from image Android app

£可爱£侵袭症+ 提交于 2019-12-03 07:30:10
问题 I am working on a feature for my Android app. I would like to read text from a picture then save that text in a database. Is using OCR the best way? Is there another way? Google suggests in its documentation that NDK should only be used if strictly necessary but what are the downfalls exactly? Any help would be great. 回答1: you can use google vision library for convert image to text, it will give better output from image. Add below library in build gradle: compile 'com.google.android.gms:play

Text detection on Seven Segment Display via Tesseract OCR

时光总嘲笑我的痴心妄想 提交于 2019-12-03 06:46:14
问题 The problem that I am running with is to extract the text out of an image and for this I have used Tesseract v3.02. The sample images from which I have to extract text are related to meter readings. Some of them are with solid sheet background and some of them have LED display. I have trained the dataset for solid sheet background and the results are some how effective. The major problem I have now is the text images with LED/LCD background which are not recognized by Tesseract and due to

Tesseract traineddata not working in Swift 3.0 project using version 4.0

守給你的承諾、 提交于 2019-12-03 06:44:11
问题 I'm attempting to use Tesseract-OCR-iOS in a new Swift 3.0 project. I'm using Xcode Version 8.1 (8B62). CocoaPods is version 1.1.1. When I attempt to use tesseract.recognize() , my app crashes and I get the following output in the console: actual_tessdata_num_entries_ <= TESSDATA_NUM_ENTRIES:Error:Assert failed:in file tessdatamanager.cpp, line 53 I found this post, which sounds I'm using the wrong version of traineddata . I downloaded tessdata from the tesseract-ocr/tessdata repo, so I'm

Training tesseract to use with iPhone

我们两清 提交于 2019-12-03 06:22:47
问题 I am trying to use tesseract-2.04 in my iPhone application and just want to detect the numbers. What I am doing here is first I am cross compiling tesseract to generate lib file using this post http://robertcarlsen.net/2009/07/15/cross-compiling-for-iphone-dev-884 and then using the the demo application at http://robertcarlsen.net/2010/01/12/ocr-for-iphone-source-1080 , but the results far away than realistic. I am not able to resolve the issue or how to train tesseract so that it comes

Is number recognition on iPhone possible in real-time?

佐手、 提交于 2019-12-03 06:18:52
问题 I need to recognise numbers from the camera image on iPhone, in real-time. I know there will be no more than 5 digits on the image. Is this problem realistic to solve given the computational specifications of the iPhone? Does anyone have any experience using the Tesseract OCR library, and do you think it could be solved by using it? 回答1: The depends on your definition of "real-time", but yes, it should be possible to do relatively fast recognition of just the digits 0-9 on an iPhone 4,

Can I use OCR to detect font style (bold, italic)? [closed]

让人想犯罪 __ 提交于 2019-12-03 06:08:02
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I am interested in using OCR to extract bold and italic words from a simple text. For example, if I input a clear image with text like so: "The quick brown fox jumps over the lazy dog." I would like to get an output like so: bold("brown", "jumps"), italic("lazy") I have looked

get the exact position of text from image in tesseract

好久不见. 提交于 2019-12-03 05:59:27
问题 Using GetHOCRText(0) method in tesseract I'm able to retrieve the text in html and on presenting the html in webview i'm able get the text but the postion of text in image is different from the output. Any idea is highly helpful. tesseract->SetInputName("word"); tesseract->SetOutputName("xyz"); tesseract->Recognize(NULL); char *utf8Text=tesseract->GetHOCRText(0); and output image 回答1: GetBoxText() method will return exact position of each characters in an array. char *boxtext = _tesseract-

Tesseract OCR simple example

心已入冬 提交于 2019-12-03 05:40:15
问题 Hi Can you anyone give me a simple example of testing Tesseract OCR preferably in C#. I tried the demo found here. I download the English dataset and unzipped in C drive. and modified the code as followings: string path = @"C:\pic\mytext.jpg"; Bitmap image = new Bitmap(path); Tesseract ocr = new Tesseract(); ocr.SetVariable("tessedit_char_whitelist", "0123456789"); // If digit only ocr.Init(@"C:\tessdata\", "eng", false); // To use correct tessdata List<tessnet2.Word> result = ocr.DoOCR(image

pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path

折月煮酒 提交于 2019-12-03 05:20:28
使用pytesseract识别验证码中遇到异常如下: pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path 安装Pillow,命令pip install Pillow,安装完毕会在 Python文件夹下Lib\site-packages\pytesseract 这个文件夹,里面有 pytesseract.py 文件 检查上述报错中的pytesseract.py源码,发现如下说明: # CHANGE THIS IF TESSERACT IS NOT IN YOUR PATH, OR IS NAMED DIFFERENTLY tesseract_cmd = 'tesseract' 从网上找到相应的‘Tesseract-OCR’下载安装(寻找对应版本):https://github.com/tesseract-ocr/tesseract/wiki 安装后的默认文件路径为(这里使用的是Windows版本):C:\Program Files (x86)\Tesseract-OCR\ 然后将源码中的: tesseract_cmd = 'tesseract' 更改为: tesseract_cmd = r'C:\Program Files (x86)