验证码/条形码识别动态链接库-Asprise-OCR4.0.3破解版
发布于: 2015/1/27 8:18:43 | 发布在: Delphi第三方组件 | 点击:
Asprise OCR是一种内嵌高性能OCR引擎、支持快速开发图片识别系统的软件组件,允许开发者使用多种语言,如VB,VB.net,VC++,VC.net,C#,Java,Delphi等。该组件是C语言开发的,以动态链接库的形式调用,所以支持动态链接库的开发工具都可以使用该组件用于验证码或条形码识别。
该动态链接库有四个导出函数:
__declspec(dllexport) char* OCR(char* filePath, int fileType);
__declspec(dllexport) char* OCRpart( char* filePath, int fileType, int startX, int startY, int width, int height);
__declspec(dllexport) char* OCRBarCodes(char* filePath, int fileType);
__declspec(dllexport) char* OCRpartBarCodes( char* filePath, int fileType, int startX, int startY, int width, int height);
这里以Delphi为例简单介绍该组件第一个函数OCR(图片识别)的用法:
首先,在Delphi单元的implementation部分对要引用的函数进行申明:
function OCR(imgname:PChar; i:integer):PChar; stdcall; external 'AspriseOCR.dll';
然后,直接调用该函数即可:
procedure TForm1.Button1Click(Sender: TObject);
var
vCode: PChar;
begin
if OpenDialog1.Execute then
begin
vCode := OCR(PChar(OpenDialog1.FileName),-1);
ShowMessage(StrPas(vCode));
end;
end;
附件下载:Asprise-OCR4_0_3