Page Orientation

PDF-X OCR SDK is a New product from us and intended to compliment our existing PDF and Imaging Tools to provide the Developer with an expanding set of professional tools for Optical Character Recognition tasks

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Page Orientation

Post by jeffp »

It appears that your AutoRotate options are really deskew options.

Will you be adding the ability to delect and report page orientation? For example, other engines we have used typically return an orientation value after doing an OCR, which is 0, 90, -90, or 180.

Something like this would be very helpful.

That said, what happens now if the PDF page I send you to OCR is on it's side, that is, orientation of 90 or -90 or even 180. Will OCRp_Page or OCR_MakeSearchable handle this case?

Or do I need to ensure all my pages are oriented correctly be using the engine?

Thanks.
Walter-Tracker Supp
User
Posts: 381
Joined: Mon Jun 13, 2011 5:10 pm

Re: Page Orientation

Post by Walter-Tracker Supp »

Yes, auto-rotate is a deskew operation. Orientation detection is also on the feature list but most likely not in this version. If time allows we will add it, but we are currently heavily focused on some other higher priority improvements. There is a possibility we will find a window of time to put this in, and if we possibly can, we will.

-Walter
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Page Orientation

Post by jeffp »

Not sure how you will implement this, but keep in mind there will be times when developers like me will only what to know the page orientation without running the full OCR on the page or document. For example, we have an option in our app that will allow the user to select a file and auto rotate any mis-rotated pages. In this case, a full OCR of the page would just be overhead.

The other issue is during a full OCR it seems that you will need to internally orient the page to 0 so that your OCR produces good results (tested a orientation of 90 in your engine and it doesn't show good results, but when I rotate it back to 0, the results are perfect). In this case, we'd want the auto orientation to take place internally but just report back to us what you found the orientation to be.

Thanks again.
Walter-Tracker Supp
User
Posts: 381
Joined: Mon Jun 13, 2011 5:10 pm

Re: Page Orientation

Post by Walter-Tracker Supp »

Hi Jeff,

Thanks for the feedback and valuable suggestions. What you suggest is basically what we already have in mind ;)

-Walter
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Page Orientation

Post by jeffp »

Walter,

Is build 202 coming soon and will it include this page orientation ability? Thanks.
Walter-Tracker Supp
User
Posts: 381
Joined: Mon Jun 13, 2011 5:10 pm

Re: Page Orientation

Post by Walter-Tracker Supp »

It likely won't be in build 202; slim chance, but otherwise wait for version 3.

-Walter
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Page Orientation

Post by jeffp »

What are going to be the improvements/additions in OCR in 202?
Walter-Tracker Supp
User
Posts: 381
Joined: Mon Jun 13, 2011 5:10 pm

Re: Page Orientation

Post by Walter-Tracker Supp »

Our top development priorites focus on the upcoming major release, and one big change is that we are incorporating major improvements in layout analysis (for example, OCRing to text-based documents while preserving embedded pictures as images), plus the orientation detection you speak of. If you're talking about PDF-X Viewer v.2.5 OCR, I would not expect new features in the next build. On the SDK front, there is a new build of the OCR SDK that we will put out shortly that includes a couple of minor feature changes (e.g. output to a text-only document), and I would expect it will be released by the end of the week.

-Walter
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Page Orientation

Post by jeffp »

Output to text document is good. What about the Load image (ie, TIFF) option, so we can send you an image to OCR instead of a PDF page.
Walter-Tracker Supp
User
Posts: 381
Joined: Mon Jun 13, 2011 5:10 pm

Re: Page Orientation

Post by Walter-Tracker Supp »

Sorry for the slow response; I am not sure we can provide that (in theory we can, but it may not fit with our development schedule to put it in and properly test it). I hope to have a more definite answer for you shortly.

However it would be relatively easy to do with our SDK; create a PDF, insert images, save it, and load it for OCR.
Walter-Tracker Supp
User
Posts: 381
Joined: Mon Jun 13, 2011 5:10 pm

Re: Page Orientation

Post by Walter-Tracker Supp »

The new build with some additional output options (OCR_Image_SuppressOutput and OCR_Text_PlaceByLines) is ready and will be available on the web site for download shortly.

-Walter
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Page Orientation

Post by jeffp »

Did you remember to update the delpi wrapper?
Walter-Tracker Supp
User
Posts: 381
Joined: Mon Jun 13, 2011 5:10 pm

Re: Page Orientation

Post by Walter-Tracker Supp »

jeffp wrote:Did you remember to update the delpi wrapper?
That will likely be early next week, though it may get done over the weekend. Thanks for the reminder.

-Walter
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Page Orientation

Post by jeffp »

Did build 202 get delayed a bit? I was expecting to see it soon.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17960
Joined: Mon Jan 12, 2009 8:07 am
Location: London

Re: Page Orientation

Post by Tracker Supp-Stefan »

Hello Jeff,

Sorry - but there is still no specific release date announced for build 202. We will advise as soon as we have anything more specific. Thank you for your patience!

Best,
Stefan
Walter-Tracker Supp
User
Posts: 381
Joined: Mon Jun 13, 2011 5:10 pm

Re: Page Orientation

Post by Walter-Tracker Supp »

Jeff,

I think there is some confusion with version numbers. Build 202 would refer to the PDF-X Viewer *end user* product (and I suppose Active-X). The OCR DLL included with the Tools SDK is at version 1.0.10.

Have you tried the currently available DLL with your existing delphi wrapper? The only change has been the addition of some flags that can be submitted to OCR_MakeSearchable, which are just integer values (a C++ enum type) and so this should be easily ported to your Delphi wrapper without substantial changes.

The new flags and corresponding hexadecimal values are:

Code: Select all

	OCR_Image_NoRotate = 0x0000,
	OCR_Image_Autorotate = 0x0001,
	OCR_Image_EdgeRefine = 0x0002,
	OCR_Image_GaussianBlur = 0x0004,
	OCR_Image_SuppressOutput = 0x0008,
	OCR_Image_FastAutorotate = 0x0011, // 0001 0001 = ie, OCR_Image_Autorotate flag implied.  Be sure to XOR it out if testing for the fast bit only.
	OCR_Text_PlaceByLines = 0x0020, // smaller but less accurate output.
I am sorry for the delay but the whole team has been working overtime on the new releases and I have been unable to get their attention long enough to finish this small thing.

-Walter