Loading...

OCRTesseractGetOrientation Speed Problem

Discussions about image processing in GdPicture.NET using GdPictureImaging.

OCRTesseractGetOrientation Speed Problem

Postby Stingrae » Wed Nov 24, 2010 2:25 pm

Hi Loic

I'm having some performance issues when determining the orientation of images.
I'm using the OCRTesseractGetOrientation method with the English dictionary, and I've tried various values for the accuracy parameter (including leaving it out), but I can't seem to achieve an acceptable level of performance.

I'm scanning using the following options:
DPI = 200
TwainSetPixelType = TwainPixelType.TWPT_RGB
TwainSetBitDepth = 8
TwainSetAutoFeed = true
TwainSetHideUI = true
during my testing with the above params I've found that setting the OCR accuracy to anything less than 4 regularly determines the orientation incorrectly, so I've been using 4 as the minimum.

Most image processing is fast enough (reading barcodes, deskewing and cropping borders). However, OCRTesseractGetOrientation takes 4 seconds (on average, though it occasionally deviates to as little as 3 and as much as 6 seconds) per image. Ideally we'd like this to be under a second, less than 0.5 seconds if possible.

At the moment I'm running the image processing on a background worker while the scanning happens on the main thread (inserting imageID's into a queue for the processing thread). This helps a little, but the main bottleneck is still the orientation process.

I've tried converting the image to 1Bpp and determining the orientation from that, which was slightly faster, (by about 1 second on average) but was less reliable, correctly analyzing only about 50% of images.

Are there any settings or techniques you would recommend to speed up the orientation process?

Thanks and regards

Steven
Stingrae
 
Posts: 2
Joined: Wed Nov 24, 2010 1:33 pm

Re: OCRTesseractGetOrientation Speed Problem

Postby Loïc » Thu Nov 25, 2010 12:17 pm

Hi Steven,

Unfortunately I have no suggestion. This functions is OCRrd technology based, and OCR is slow due to internal stuff (segmentation, pattern recognition, threshing, classification...).
We expect to release another function to determine the document orientation in less than 1 sec for a 300 dpi image in 2011.

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: OCRTesseractGetOrientation Speed Problem

Postby Stingrae » Thu Dec 01, 2011 11:33 am

Hi Loic

I have downloaded the latest version (v8) of GdPicture, but I find I still get similar results as when using the previous version (outlined in my original post above).
Does this new version have any additional functionality to speed up the ORC orientation process? If so how do I enable/call it?

Basically all I want is to be able to determine the orientation of the image and rotate it to the "right way up" in the shortest possible time. The current 3 to 4 seconds will be too long for my purposes. I'm getting the image directly from a twain source and storing it in memory using the TwainAcquireToGdPictureImage method, then doing the OCRTesseractGetOrientation and rotating the image before saving the corrected image to disc.

Thanks
Stingrae
 
Posts: 2
Joined: Wed Nov 24, 2010 1:33 pm

Re: OCRTesseractGetOrientation Speed Problem

Postby mcurtis » Thu Apr 19, 2012 1:00 am

Has there been any progress on getting the function for document orientation in less than 1 sec for a 300 dpi image supposedly for 2011? I really have a need for that functionality. I got my answer already that there is not a function for that yet.
mcurtis
 
Posts: 3
Joined: Thu Apr 19, 2012 12:55 am


Return to Image Processing

Who is online

Users browsing this forum: No registered users and 0 guests

cron