Re: how to get the progress during OCR

1,197 views
Skip to first unread message

Patrick Questembert

unread,
Jan 11, 2013, 8:45:07 AM1/11/13
to tesser...@googlegroups.com
I don't know what callback mechanisms exist in Tesseract but you could use the lower-level APIs to first get blocks and rows then do the recognition for each row separately. Or, simpler, just keep track of how long it takes your app to complete the OCR as a function of image size and assume the next image will follow the same performance stats.

Patrick

On Fri, Jan 11, 2013 at 2:44 AM, <wowgr...@gmail.com> wrote:

sometime  it takes a long time to run OCR

so how to  get the progress during OCR?

thanks !

I'm using Tesseract3.02    win7 b4bit VS2010


--
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" group.
To post to this group, send email to tesser...@googlegroups.com
To unsubscribe from this group, send email to
tesseract-oc...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en



--
Patrick Questembert, ScanBizCards

Patrick Questembert

unread,
Jan 11, 2013, 11:29:24 AM1/11/13
to tesser...@googlegroups.com
Honestly I wouldn't bother with the complex solutions to get precise progress callbacks - the estimation method based on past scans works really well. You can see it with ScanBizCards (free versions available for iOS, iPad, Android): right after you install the app you'll notice that the progress animation may not be accurate (i.e. the scan may jump to 100% complete straight from say 70% done or get stuck at 100% done for a second) but after scanning a couple of cards it will match actual progress quite well.

Patrick

On Fri, Jan 11, 2013 at 10:26 AM, <wowgr...@gmail.com> wrote:
 Patrick 
 
   thanks. your idea is sort of good so far.

I roughly looked through the source code and found nothing .

 it seems that there's no event or callback function relative to OCR progress .

Dmitri Silaev

unread,
Jan 12, 2013, 3:21:31 PM1/12/13
to tesser...@googlegroups.com
Did you try using  int Recognize(ETEXT_DESC* monitor) with a non-NULL monitor? It updates monitor->progress in some way. And I suspect there is no more elegant way to know about the updates except polling this memory location periodically (e.g once in a second) from another thread.

Warm regards,
Dmitri Silaev
www.CustomOCR.com

Christian Haake

unread,
Dec 10, 2013, 6:54:25 PM12/10/13
to tesser...@googlegroups.com


On Saturday, January 12, 2013 9:21:31 PM UTC+1, Dmitri Silaev wrote:
Did you try using  int Recognize(ETEXT_DESC* monitor) with a non-NULL monitor? It updates monitor->progress in some way. And I suspect there is no more elegant way to know about the updates except polling this memory location periodically (e.g once in a second) from another thread.

This is exactly what I was searching for... Thanks Dmitri 

Renard Wellnitz

unread,
Jan 3, 2014, 6:46:11 PM1/3/14
to tesser...@googlegroups.com
Thats what i did for my tesseract app. I added a callback method to the monitor class that updated my ui. Its just an extra couple of line of code you have to add to tesseract.

Ionescu Alex

unread,
Apr 16, 2014, 8:55:34 AM4/16/14
to tesser...@googlegroups.com
Hi Renard,
I am learning java and I implemented and ocr android app using tesseract. I took a look in your github repo but I can't figure it out what methods you have added to update the progress...Can you please describe me exactly you modified and how do you call them so I can get progress?
Thanks!
Reply all
Reply to author
Forward
Message has been deleted
0 new messages