我正在使用abbyy ocr移动sdk进行android应用程序开发。我想检测特定区域中的文本。有没有人可以帮我在abbyy手机sdk中指定识别区域?
发布于 2015-11-24 16:25:54
不确定它是如何在安卓上完成的,但即使我使用的是iOS,这也可能会有所帮助。有复制keywords
、dictionaries
和patterns
的构建阶段。预先选择的设置被设置到英语词典/关键字上。因此,您可以查看项目文件并查找English.akw
或English.edc
,然后将此条目替换为所需的区域。
此外,您还可以在代码中搜索ocrConfiguration
。这包含识别语言。
发布于 2015-12-10 23:50:14
我不是在Android sdk上做的,但Abbyy sdk在每种语言中都是相似的。我会给你和c#的例子,我希望你会发现它很有用。
您有两个选择:
FRDocument文档= engine.CreateFRDocument();矩形矩形=新矩形();矩形.X= 160;矩形.Y= 42;rectangle.Width = 240;rectangle.Height = 37;CrearBloque(矩形,"BlockName");私有空区域(矩形矩形,字符串名){ FREngine.Region CrearBloque= engineLoader.Engine.CreateRegion();region.AddRect( rectangle.Left,rectangle.Top,rectangle.Width + rectangle.Left,rectangle.Height + rectangle.Top);ITextBlock block = document.Pages.Layout.Blocks.AddNew( BlockTypeEnum.BT_Text,region,-1).GetAsTextBlock();block.Name =名称;}//最后,您可以保存文档的布局: document.Pages.Layout.SaveToFile("path_of_the_layout");
document.Pages.Layout.LoadFromFile("path_of_the_layout");
非常重要!
别忘了使用document.recognize()
方法。
切勿使用document.Process()
。
https://stackoverflow.com/questions/33170917
复制相似问题