C#下免费使用的OCR? 各位大能,哪有C#下免费使用的OCR? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 有,msoffice 的MODI(Microsoft Office Document Imaging),英文识别还不错 public static extern IntPtr OCR(string file, int type);[DllImport("AspriseOCR.dll", EntryPoint = "OCRpart")]static extern IntPtr OCRpart(string file, int type, int startX, int startY, int width, int height);[DllImport("AspriseOCR.dll", EntryPoint = "OCRBarCodes")]static extern IntPtr OCRBarCodes(string file, int type);[DllImport("AspriseOCR.dll", EntryPoint = "OCRpartBarCodes")]static extern IntPtr OCRpartBarCodes(string file, int type, int startX, int startY, int width, int height);private void GetVeryfyCode(string _imgPath){ if(File.Exists(_imgPath))//ok now? { try { this.picbVeryfyCode.Image=System.Drawing.Bitmap.FromFile(_imgPath); _veryfyCode=Marshal.PtrToStringAnsi(OCR(_imgPath, -1)); _veryfyCode=_veryfyCode.Substring(0,4); this.label1.Text=_veryfyCode; } catch(Exception e) { this.label1.Text+=e.Message; } }} 更正[DllImport("AspriseOCR.dll", EntryPoint="OCR")]public static extern IntPtr OCR(string file, int type);[DllImport("AspriseOCR.dll", EntryPoint = "OCRpart")]static extern IntPtr OCRpart(string file, int type, int startX, int startY, int width, int height);[DllImport("AspriseOCR.dll", EntryPoint = "OCRBarCodes")]static extern IntPtr OCRBarCodes(string file, int type);[DllImport("AspriseOCR.dll", EntryPoint = "OCRpartBarCodes")]static extern IntPtr OCRpartBarCodes(string file, int type, int startX, int startY, int width, int height);private void GetVeryfyCode(string _imgPath){ if(File.Exists(_imgPath))//ok now? { try { this.picbVeryfyCode.Image=System.Drawing.Bitmap.FromFile(_imgPath); _veryfyCode=Marshal.PtrToStringAnsi(OCR(_imgPath, -1)); _veryfyCode=_veryfyCode.Substring(0,4); this.label1.Text=_veryfyCode; } catch(Exception e) { this.label1.Text+=e.Message; } }} 应用层,WCF服务,与DB的异常处理 历遍硬盘上的所有文件(在WINFORM上) C#获取HTML对应标签 求救!!!!!!!!! Form 继承相关的问题,请教高手帮助。 一个很简单的问题,请教各位大虾! 这是我进行远程截屏的代码,有问题想请教! 关于C#中的命名空间! 请问下,返回值个数不确定调用的时候的处理 SQL数据库的问题,请指点迷津! C#里我继承了BUTTON一个类 BUTTONARRY 在线求解决方案
public static extern IntPtr OCR(string file, int type);[DllImport("AspriseOCR.dll", EntryPoint = "OCRpart")]
static extern IntPtr OCRpart(string file, int type, int startX, int startY, int width, int height);[DllImport("AspriseOCR.dll", EntryPoint = "OCRBarCodes")]
static extern IntPtr OCRBarCodes(string file, int type);[DllImport("AspriseOCR.dll", EntryPoint = "OCRpartBarCodes")]
static extern IntPtr OCRpartBarCodes(string file, int type, int startX, int startY, int width, int height);private void GetVeryfyCode(string _imgPath)
{
if(File.Exists(_imgPath))//ok now?
{
try
{
this.picbVeryfyCode.Image=System.Drawing.Bitmap.FromFile(_imgPath);
_veryfyCode=Marshal.PtrToStringAnsi(OCR(_imgPath, -1));
_veryfyCode=_veryfyCode.Substring(0,4);
this.label1.Text=_veryfyCode;
}
catch(Exception e)
{
this.label1.Text+=e.Message;
}
}
}
public static extern IntPtr OCR(string file, int type);[DllImport("AspriseOCR.dll", EntryPoint = "OCRpart")]
static extern IntPtr OCRpart(string file, int type, int startX, int startY, int width, int height);[DllImport("AspriseOCR.dll", EntryPoint = "OCRBarCodes")]
static extern IntPtr OCRBarCodes(string file, int type);[DllImport("AspriseOCR.dll", EntryPoint = "OCRpartBarCodes")]
static extern IntPtr OCRpartBarCodes(string file, int type, int startX, int startY, int width, int height);private void GetVeryfyCode(string _imgPath)
{
if(File.Exists(_imgPath))//ok now?
{
try
{
this.picbVeryfyCode.Image=System.Drawing.Bitmap.FromFile(_imgPath);
_veryfyCode=Marshal.PtrToStringAnsi(OCR(_imgPath, -1));
_veryfyCode=_veryfyCode.Substring(0,4);
this.label1.Text=_veryfyCode;
}
catch(Exception e)
{
this.label1.Text+=e.Message;
}
}
}