3
奇怪的問題我(在vb.net)採用正方體的時候得到這個奇怪的錯誤:與正方體
「試圖讀取或寫入保護內存這通常是指示其他內存已損壞。」
這裏是我的代碼:
Try
Dim T As New Tesseract
Using O As New OpenFileDialog
With O
If Not .ShowDialog = DialogResult.Cancel Then
Dim B As Bitmap = New Bitmap(.FileName)
T.Init(Nothing, "eng", False)
Dim L As List(Of Word) = T.DoOCR(B, Rectangle.Empty)
For Each w As Word In L
MessageBox.Show(w.Text)
Next
End If
End With
End Using
Catch Ex As Exception
MessageBox.Show(Ex.Message)
End Try
任何想法?
謝謝 - 我正在閱讀它,默認情況下,將路徑設置爲可執行文件路徑,並且它表示放置Nothing,所以我正在嘗試。當我把Application.ExecutablePath()或手動鏈接到tessdata目錄時,程序只是關閉而沒有任何消息。 – 2012-02-05 17:54:38