LEADTOOLS是一个综合工具包的集合,用于将识别、文档、医疗、成像和多媒体技术整合到桌面、服务器、平板电脑、网络和移动解决方案中,是一项企业级文档自动化解决方案,有捕捉,OCR,OMR,表单识别和处理,PDF,打印捕获,归档,注释和显示功能利用业界领先的图像处理技术,能够智能识别文件,可以用来识别任何类型的扫描或传真形式的图像,接下来我们就来聊聊关于labview怎么读取表格数据LEADTOOLS如何快速帮助提取复杂庞大的表格信息?以下内容大家不妨参考一二希望能帮到您!

labview怎么读取表格数据?LEADTOOLS如何快速帮助提取复杂庞大的表格信息

labview怎么读取表格数据LEADTOOLS如何快速帮助提取复杂庞大的表格信息

LEADTOOLS是一个综合工具包的集合,用于将识别、文档、医疗、成像和多媒体技术整合到桌面、服务器、平板电脑、网络和移动解决方案中,是一项企业级文档自动化解决方案,有捕捉,OCR,OMR,表单识别和处理,PDF,打印捕获,归档,注释和显示功能。利用业界领先的图像处理技术,能够智能识别文件,可以用来识别任何类型的扫描或传真形式的图像。

LEADTOOLS Document Imaging Developer Toolkit官方最新版免费下载试用,历史版本下载,在线文档和帮助文件下载-慧都网

在无纸化办公室工作时,企业会收到来自不同供应商的数百种不同的表格和发票。手动查找、提取和存储所有必要信息通常是一个主要的痛点和瓶颈。值得庆幸的是,借助 LEADTOOLS 文档 SDK 和我们获得专利的 表单识别 技术,一切都可以轻松自动化,以提高工作流程的生产力和效率。

使用 LEADTOOLS,用户只需为每个不同的发票或表单类型创建模板,也称为主表单。然后将这些主表单存储在存储库中,并用于自动识别当前正在处理哪种类型的填写表单。

在下面的演示中,我们获取填写表格的目录并将它们与主表格列表进行比较。我们将首先加载希望识别的填写表格以及我们希望与之比较的主表格。

加载填写好的表格

填充的表单可以跨越多个页面,因此我们需要从填充的表单中读取图像数据,并将每个页面添加到 FormRecognitionAttributes 类的实例中。

private static FormRecognitionAttributes LoadFilledFormAttributes(string filledFormName) {  FormRecognitionAttributes filledFormAttributes = recognitionEngine.CreateForm(null);  RasterImage currentForm = codecs.Load(filledFormName, 0, CodecsLoadByteOrder.BgrOrGray, 1, -1);  for (int i = 0; i < currentForm.PageCount; i ) { recognitionEngine.AddFormPage(filledFormAttributes, currentForm, null); currentForm.Page = i 1; }  recognitionEngine.CloseForm(filledFormAttributes);  return filledFormAttributes; }

加载主表单

加载主表单就像读取主表单的 .bin 文件并将其加载到 FormRecognitionAttributes 类的实例中一样简单。

private static FormRecognitionAttributes LoadMasterFormAttributes(string masterFormName) {  FormRecognitionAttributes masterFormAttributes = new FormRecognitionAttributes();  masterFormAttributes.SetData(File.ReadAllBytes(masterFormName));  return masterFormAttributes; }

寻找合适的匹配

现在我们已经准备好遍历一个充满填写表格的整个目录,并找到它们对应的主表格。

private static void RecognizeForms() {  Console.WriteLine("Recognizing Forms\n");  string[] formsToRecognize = Directory.GetFiles(filledFormsDirectory, "*.tif", SearchOption.AllDirectories);  string[] masterFileNames = Directory.GetFiles(masterFormsDirectory, "*.bin", SearchOption.AllDirectories);  foreach (string filledFormName in formsToRecognize) { FormRecognitionAttributes filledFormAttributes = LoadFilledFormAttributes(filledFormName);   string resultMessage = "";   foreach (string masterFileName in masterFileNames) { FormRecognitionAttributes masterFormAttributes = LoadMasterFormAttributes(masterFileName);    //Compares the master form to the filled form FormRecognitionResult recognitionResult = recognitionEngine.CompareForm(masterFormAttributes, filledFormAttributes, null);    //When the Recognition Engine compares the two documents it also sets a confidence level for how closely the engine thinks the two documents match if (recognitionResult.Confidence >= AllowedConfidenceLevel) { resultMessage = $"Form {Path.GetFileNameWithoutExtension(filledFormName)} has been recognized as a(n) {Path.GetFileNameWithoutExtension(masterFileName)} with a confidence level of {recognitionResult.Confidence}"; break; }    resultMessage = $"The form {Path.GetFileNameWithoutExtension(filledFormName)} failed to be recognized with a confidence level of {recognitionResult.Confidence}"; }   Console.WriteLine(resultMessage); Console.WriteLine("=============================================================\n"); } }

以上便是如何快速通过使用leadtools控件,快速提取表单的操作,当然除了表单提取之外,leadtools也支持其他格式的文件提取,大家可以根据需求下载体验!

,