I have tried to recognize handprinted img by FRengine but failed to get correct result. however cloud SDK works fine. I think the api call sequence is not correct. anyone who can check it is very appreciate.

code:

engineLoader.Engine.LoadPredefinedProfile("FieldLevelRecognition");
string imagePath = "f:\\icr\\7.jpg" ;

        FREngine.FRDocument frDocument = engineLoader.Engine.CreateFRDocumentFromImage( imagePath, null );

        // Create a Layout object
        FREngine.Layout layout = engineLoader.Engine.CreateLayout();

        // Set block region
        FREngine.Region region = engineLoader.Engine.CreateRegion();
        region.AddRect( 0, 0, 100, 48);

        // Create a new block
        FREngine.IBlock newBlock = layout.Blocks.AddNew( FREngine.BlockTypeEnum.BT_Text, region, 0 );
        FREngine.TextBlock textBlock = newBlock.GetAsTextBlock();
        // Specify the text type
        textBlock.RecognizerParams.TextTypes = (int)FREngine.TextTypeEnum.TT_Handprinted;
        // Specify the type of marking around the letters
        textBlock.RecognizerParams.FieldMarkingType = FREngine.FieldMarkingTypeEnum.FMT_SimpleText;

        textBlock.RecognizerParams.SetPredefinedTextLanguage("English");

                  frDocument.Recognize(null, null);

        // Save results to rtf with default parameters

        frDocument.Export("f:\\icr\\output.txt",
                          FREngine.FileExportFormatEnum.FEF_TextUnicodeDefaults, null );

asked 20 Jun '15, 01:10

bennetchang's gravatar image

bennetchang
112

edited 20 Jun '15, 01:16


After you set the required parameters of the block, it is necessary to assign the configured layout to the IFRPage::Layout property of the corresponding page. For example, add the following line before the recognition process:

 // Assign the configured layout to the IFRPage::Layout property of the corresponding page. 
 frDocument.Pages.Item(0).Layout = layout;
link

answered 22 Jun '15, 12:19

Oksana%20Serdyuk's gravatar image

Oksana Serdyuk ♦♦
1.5k16

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×9

Asked: 20 Jun '15, 01:10

Seen: 738 times

Last updated: 22 Jun '15, 12:19

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal