Hello. I am troubled with handwriting recognition.
I implemented it in C # by referring to "Recognizing Handprinted Texts" in Help, but I can not properly recognize handwriting.
What is wrong with my code?
The target is English, numbers.
Also attach the target file you want to recognize.
Comments
3 comments
Source Code
// Engine Load
...
FRDocument document = engine.CreateFRDocument();
document.AddImageFile(strImagePath, null, null);
FREngine.Layout layout = engine.CreateLayout();
// Set block region
FREngine.Region region = engine.CreateRegion();
region.AddRect(70, 106, 256, 129);
// 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;
// GetParameter
DocumentProcessingParams dpp = engine.CreateDocumentProcessingParams();
dpp.PageProcessingParams.RecognizerParams.SetPredefinedTextLanguage("Japanese,English");
dpp.SynthesisParamsForDocument.FontSet.SystemFontSet.FontNamesFilter = (int)FontNamesFiltersEnum.FNF_Japanese;
dpp.PageProcessingParams.PagePreprocessingParams.CorrectOrientation = true;
dpp.PageProcessingParams.PagePreprocessingParams.OrientationDetectionParams.OrientationDetectionMode = OrientationDetectionModeEnum.ODM_Normal;
dpp.PageProcessingParams.ObjectsExtractionParams.SourceContentReuseMode = SourceContentReuseModeEnum.CRM_Auto;
dpp.PageProcessingParams.ObjectsExtractionParams.DetectTextOnPictures = true;
dpp.PageProcessingParams.ObjectsExtractionParams.EnableAggressiveTextExtraction = true;
// Process
document.Process(dpp);
// PDF Export
FREngine.PDFExportParams pdfParams = engine.CreatePDFExportParams();
pdfParams.Scenario = FREngine.PDFExportScenarioEnum.PES_Balanced;
document.Export(strPDFPath, FREngine.FileExportFormatEnum.FEF_PDF, pdfParams);
// Engine Unload
...
Hello!
First of all, automatic layout analysis is not available for handprinted text. The coordinates of each block containing handprinted text must be specified manually.
In your code there are two issues:
Please check the following C# code sample showing how to recognize the first field of your document.
Hope the information will be helpful!
Hello.
Thank you for your reply and source code.
You create a new layout from the page and set it there.
Because it was a detailed explanation, it was easy to understand and it was very helpful.
I will challenge other acquisition based on this information.
Please sign in to leave a comment.