没有找到合适的产品?
联系客服协助选型:023-68661681
提供3000多款全球软件/控件产品
针对软件研发的各个阶段提供专业培训与技术咨询
根据客户需求提供定制化的软件开发服务
全球知名设计软件,显著提升设计质量
打造以经营为中心,实现生产过程透明化管理
帮助企业合理产能分配,提高资源利用率
快速打造数字化生产线,实现全流程追溯
生产过程精准追溯,满足企业合规要求
以六西格玛为理论基础,实现产品质量全数字化管理
通过大屏电子看板,实现车间透明化管理
对设备进行全生命周期管理,提高设备综合利用率
实现设备数据的实时采集与监控
利用数字化技术提升油气勘探的效率和成功率
钻井计划优化、实时监控和风险评估
提供业务洞察与决策支持实现数据驱动决策
原创|使用教程|编辑:郝浩|2013-09-29 09:55:28.000|阅读 894 次
概述:LEADTOOLS v18的全新设计极大地简化了开发而无需牺牲控制力。LEADTOOLS v18增强了其用于光学字符识别的.Net类。LEADTOOLS的架构灵活、直观而且易于使用。开发人员仅通过三行代码就可以实现图像的OCR功能。本文接下来将着重介绍全新的LEADTOOLS .NET OCR 类,以及展示如何创建一个OCR程序。
# 界面/图表报表/文档/IDE等千款热门软控件火热销售中 >>
LEADTOOLS v18的全新设计极大地简化了开发而无需牺牲控制力。LEADTOOLS v18增强了其用于光学字符识别的.Net类。LEADTOOLS的架构灵活、直观而且易于使用。开发人员仅通过三行代码就可以实现图像的OCR功能。本文接下来将着重介绍全新的LEADTOOLS .NET OCR 类,以及展示如何创建一个OCR程序。
LEADTOOLS OCR .NET类库提供了Win32 和 x64 版本,适用于下列开发环境:
LEADTOOLS使用OCR手柄连接OCR引擎和包含在页面列表中的OCR文档。OCR手柄是LEADTOOLS OCR和OCR引擎之间的通信会话。OCR手柄是一个包含了识别、获取/设置信息以及文本验证的所有必要信息的内部结构。
以下是识别单页或者多文档所涉及到的基本步骤:
1、选择你想使用的引擎类型并创建一个IOcrEngine接口实例。
2、根据IOcrEngine.Startup方法启动OCR引擎。
3、创建一个OCR文档。
4、手动或者自动创建页面区域。(该步骤为可选步骤)
5、设置OCR引擎所使用的活动语言。(默认为英语)
6、设置拼写语言。(默认为英语)
7、设置任意特殊识别模块选项。如果页面包含区域,该步骤是必须的。
8、识别。
9、如果需要,可以保存识别结果。可将识别结果保存到一个文件或者内存中。
10、关闭OCR引擎。
只要步骤4、5、6和7在启动OCR引擎后和完成识别前进行都可以,而且可以不按照顺序进行。
添加引用到.Net程序的Leadtools.Forms.Ocr.dll 程序集中,以启动LEADTOOLS for .NET OCR。该程序集包含了各种接口、类和结构。由于LEADTOOLS图像开发包提供了多引擎支持,因此 链接引擎的实际代码被储存在一个单独的程序集中。因此,必须确保你打算用的引擎程序集位于Leadtools.Forms.Ocr.dll 程序集中。如果需要自动检测依赖性,你可以将引擎程序集作为引用添加到项目中。
下列代码演示了如何执行上次步骤:
Visual Basic
' *** Step 1: Select the engine type and
' create an instance of the IOcrEngine interface.
' We will use the LEADTOOLS OCR Plus engine and use it in the same process
Dim ocrEngine As IOcrEngine = _
OcrEngineManager.CreateEngine(OcrEngineType.Plus, False)
' *** Step 2: Startup the engine.
' Use the default parameters
ocrEngine.Startup(Nothing, Nothing, Nothing)
' *** Step 3: Create an OCR document with one or more pages.
Dim ocrDocument As IOcrDocument = _
ocrEngine.DocumentManager.CreateDocument()
' Add all the pages of a multi-page TIF image to the document
ocrDocument.Pages.AddPages("C:\Images\Ocr.tif", 1, -1, Nothing)
' *** Step 4: Establish zones on the page(s), either manually or automatically
' Automatic zoning
ocrDocument.Pages.AutoZone(Nothing)
' *** Step 5: (Optional) Set the active languages to be used by the OCR engine
' Enable English and German languages
ocrEngine.LanguageManager.EnableLanguages(New String() {"en", "de"})
' *** Step 6: (Optional) Set the spell checking language
' Enable the spell checking system and set English as the spell language
ocrEngine.SpellCheckManager.Enabled = True
ocrEngine.SpellCheckManager.SpellLanguage = "en"
' *** Step 7: (Optional) Set any special recognition module options
' Change the fill method for the first zone in the first page to be Omr
Dim ocrZone As OcrZone = ocrDocument.Pages(0).Zones(0)
ocrZone.FillMethod = OcrZoneFillMethod.Omr
ocrDocument.Pages(0).Zones(0) = ocrZone
' *** Step 8: Recognize
ocrDocument.Pages.Recognize(Nothing)
' *** Step 9: Save recognition results
' Save the results to a PDF file
ocrDocument.Save("C:\\Images\Document.pdf", OcrDocumentFormat.PdfA, Nothing)
ocrDocument.Dispose()
' *** Step 10: Shut down the OCR engine when finished
ocrEngine.Shutdown()
ocrEngine.Dispose()
C#
// *** Step 1: Select the engine type and
// create an instance of the IOcrEngine interface.
// We will use the LEADTOOLS OCR Plus engine and use it in the same process
IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.Plus, false);
// *** Step 2: Startup the engine.
// Use the default parameters
ocrEngine.Startup(null, null, null);
// *** Step 3: Create an OCR document with one or more pages.
IOcrDocument ocrDocument = ocrEngine.DocumentManager.CreateDocument();
// Add all the pages of a multi-page TIF image to the document
ocrDocument.Pages.AddPages(@"C:\Images\Ocr.tif", 1, -1, null);
// *** Step 4: Establish zones on the page(s), either manually or automatically
// Automatic zoning
ocrDocument.Pages.AutoZone(null);
// *** Step 5: (Optional) Set the active languages to be used by the OCR engine
// Enable English and German languages
ocrEngine.LanguageManager.EnableLanguages(new string[] { "en", "de"});
// *** Step 6: (Optional) Set the spell checking language
// Enable the spell checking system and set English as the spell language
ocrEngine.SpellCheckManager.Enabled = true;
ocrEngine.SpellCheckManager.SpellLanguage = "en";
// *** Step 7: (Optional) Set any special recognition module options
// Change the fill method for the first zone in the first page to be default
OcrZone ocrZone = ocrDocument.Pages[0].Zones[0];
ocrZone.FillMethod = OcrZoneFillMethod.Default;
ocrDocument.Pages[0].Zones[0] = ocrZone;
// *** Step 8: Recognize
ocrDocument.Pages.Recognize(null);
// *** Step 9: Save recognition results
// Save the results to a PDF file
ocrDocument.Save(@"C:\Images\Document.pdf", OcrDocumentFormat.PdfA, null);
ocrDocument.Dispose();
// *** Step 10: Shut down the OCR engine when finished
ocrEngine.Shutdown();
ocrEngine.Dispose();
接下来的示例展示了如何利用IOcrAutoRecognizeManager执行相同任务,
Visual Basic
' Create the engine instance Using ocrEngine As IOcrEngine = _ OcrEngineManager.CreateEngine(OcrEngineType.Plus, False) ' Startup the engine ocrEngine.Startup(Nothing, Nothing, Nothing) ' Convert the multi-page TIF image to a PDF document ocrEngine.AutoRecognizeManager.Run( _ "C:\Images\Ocr.tif", _ "C:\Images\Document.pdf", _ Nothing, _ OcrDocumentFormat.PdfA, _ Nothing) End Using
C#
// Create the engine instance
using (IOcrEngine ocrEngine =
OcrEngineManager.CreateEngine(OcrEngineType.Plus, false))
{
// Startup the engine
ocrEngine.Startup(null, null, null);
// Convert the multi-page TIF image to a PDF document
ocrEngine.AutoRecognizeManager.Run(
@"C:\Images\Ocr.tif",
@"C:\Images\Document.pdf",
null,
OcrDocumentFormat.PdfA,
null);
}
本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@ke049m.cn
文章转载自:慧都控件网

LEADTOOLS Document Imaging Suite SDK是LEADTOOLS SDK中各种特点的精选组合,这套强大的工具利用了LEAD行业领先的图像处理技术来智能地识别文档的特征,而根据文档的特征可以识别扫描的或传真的任何类型的表格图像。

LEADTOOLS Asian OCR Module在应用程序中增加了一些光学字符识别(OCR)技术的方法,并包含了开发健壮的,高性能的和可扩展的图像识别方案所需要的技术。
注意: Cogent DataHub 软件 v11 包含一些新功能,您的目标操作系统可能不支持这些功能。
本教程主要为大家介绍如何使用DevExpress WinForms数据网格控件进行数据排序的基础知识,欢迎下载最新版组件体验!
在使用Parasoft C/C++test执行BugDetective数据流分析时,可能会遇到用户自定义的资源API,那在这种情况下,若要判断是否存在资源问题,如资源泄露等,则需要手动配置测试配置。
大型SaaS系统的自动化测试常常受制于界面变化快、结构复杂、加载机制多变等因素。从元素识别到脚本管理,SmartBear TestComplete帮助Salesforce建了可靠的自动化测试体系。
相关产品
20多年的老牌图像处理控件,支持TWAIN扫描、200多种图像效果、150多种图像格式…
LEADTOOLS Document Suite Developer ToolkitLEADTOOLS Document Imaging Suite SDK是LEADTOOLS SDK中各种特点的精选组合,这套强大的工具利用了LEAD行业领先的图像处理技术来智能地识别文档的特征,而根据文档的特征可以识别扫描的或传真的任何类型的表格图像。
LEADTOOLS Document Imaging Developer Toolkit多语言的文档图像处理控件,支持光符识别处理、条形码扫描识别等。
LEADTOOLS Professional Asian OCR ModuleLEADTOOLS Asian OCR Module在应用程序中增加了一些光学字符识别(OCR)技术的方法,并包含了开发健壮的,高性能的和可扩展的图像识别方案所需要的技术。
LEADTOOLS OCR Module - LEAD Engine开发健壮的,高性能的和可扩展的图像识别方案所需要的OCR 识别技术。
最新文章 MORE
半岛外围网上直营相关的文章 MORE
服务电话
重庆/ 023-68661681
华东/ 13452821722
华南/ 18100878085
华北/ 17347785263
客户支持
技术支持咨询服务
服务热线:400-700-1020
邮箱:sales@ke049m.cn
关注我们
地址 : 重庆市九龙坡区火炬大道69号6幢
半岛外围网上直营