2013-12-12 145 views
0

我正在使用OCR的項目。現在,我在與這行代碼VB.Net上的Tesseract

Dim ocr As New Ocr() 
    Using bmp As New Bitmap("C:\Users\BESToffshoreSERVICE\Downloads\banktest.png") 
     MsgBox("asdsada") 
     Dim tessocr As New tessnet2.Tesseract() 
     'tessocr.Init(Nothing, "eng", False) 
     'tessocr.GetThresholdedImage(bmp, Rectangle.Empty).Save("c:\temp\" & Guid.NewGuid().ToString() & ".bmp") 
     '' Tessdata directory must be in the directory than this exe 
     'Console.WriteLine("Multithread version") 
     'ocr.DoOCRMultiThred(bmp, "eng") 
     'Console.WriteLine("Normal version") 
     'ocr.DoOCRNormal(bmp, "eng") 
    End Using 

,讓我錯誤的行一個問題是這樣的
Dim tessocr As New tessnet2.Tesseract() 如果刪除該行MSGBOX顯示。任何想法爲什麼發生這種情況 我已經添加了tessnet2參考,並且我在C#中獲得了此代碼。

好的。不知何故,我設法解決它。問題是:
1.我的目標是x86版本,而DLL需要x64。通過將x86更改爲任何CPU來解決此問題。
2.需要.NET框架2.0.Changed從4.0到2.0

回答

0

你加Imports語句到該文件的頂部?

+0

是的,並且對於遲到的回覆感到抱歉。 – Codemunkeee