图片识别文字, OCR
文章引用自:?https://www.cnblogs.com/stone_w/archive/2011/10/08/2202397.html
方式一、Asprise-OCR的使用。
Asprise-OCR下載地址:
http://asprise.com/product/ocr/download.php?lang=csharp?
其中需要使用的3個dll是AspriseOCR.dll、DevIL.dll、ILU.dll。
需要注意的是這幾個.dll是vc寫的引用要在程序中用DllImport引用,關鍵代碼:
[DllImport("AspriseOCR.dll",?EntryPoint?=?"OCR",?CallingConvention?=?CallingConvention.Cdecl)]
public?static?extern?IntPtr?OCR(string?file,?int?type);
[DllImport("AspriseOCR.dll",?EntryPoint?=?"OCRpart",?CallingConvention?=?CallingConvention.Cdecl)]
static?extern?IntPtr?OCRpart(string?file,?int?type,?int?startX,?int?startY,?int?width,?int?height);
[DllImport("AspriseOCR.dll",?EntryPoint?=?"OCRBarCodes",?CallingConvention?=?CallingConvention.Cdecl)]
static?extern?IntPtr?OCRBarCodes(string?file,?int?type);
[DllImport("AspriseOCR.dll",?EntryPoint?=?"OCRpartBarCodes",?CallingConvention?=?CallingConvention.Cdecl)]
static?extern?IntPtr?OCRpartBarCodes(string?file,?int?type,?int?startX,?int?startY,?int?width,?int?height);
轉載于:https://www.cnblogs.com/zxhome/p/10008846.html
總結
以上是生活随笔為你收集整理的图片识别文字, OCR的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 微信小程序学习笔记(4)--------
- 下一篇: 字符串,那些你不知道的事