Hello,
with Abbyy Corporate Edition you are able to load a image file and then define areas on it for the OCR.
You can save this layout into a layout file with the "blk" file extension.
It seems that there is no way to load this created layout file within the FineReader Engine API, is there?
Comments
6 comments
Unfortunately, you cannot use .blk file in FRE.
But you can create a layout using FRE API, save it into a file and use it in other FRE applications (please, see Developer’s Help → API Reference → Layout-Related Objects → Layout). Also ImageViewer Visual Component is a good way to create a layout file via gui (see Developer’s Help → Visual Components Reference → ImageViewer)
Thank you for your answer.
I have tried the following to create the layout file via API as mentioned in the Developer's Help.
For example:
The coordinates of the rectangle i got from the AnalyzePage method.
It is from the first block of the analyzed Page.
There is a text "Seite 1" in it.
But nothing is recognized when calling the RecognizePage method.
Is the ImageViewer component included in the FineReader 10 Engine SDK?
But can you save the layout you created with ImageViewer?
In the sample it doesn't seem to be possible.
First things first:
Did you defined type of block before recognition? I guess should use TextBlock.
About ImageViewer:
You should use Synchronizer object to sync document with ImageViewer. So your document layout will change according to changes in ImageViewer component. After that you can save the layout using the following code sample:
Document.Pages.Item(page_num).Layout.SaveToFile(path);
I would also recommend you to check our ImageComponents demo to better understand how to work with visual components.
To load the layout please use the following code:
Document.Pages.Item(page_num).Layout.LoadFromFile(path);
Document.Pages.Item(page_num).Synthesize(null);
I did as you can see above.
Meanwhile I solved the problem: setting TextLanguage of RecognizerParams for the Textblock.
Before I only passed the RecognizerParams to the FRDocument.Recognize() method.
Please sign in to leave a comment.