.net - Tesseract 的奇怪问题

标签 .net vb.net tesseract

我在使用 Tesseract(在 vb.net 中)时遇到这个奇怪的错误:

“试图读取或写入 protected 内存。这通常表明其他内存已损坏。”

这是我的代码:

  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

有什么想法吗?

最佳答案

你好像是在调用Init,第一个参数是Nothing,但它应该是语言文件所在的路径。

关于.net - Tesseract 的奇怪问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9151377/

相关文章:

c# - 在库的异步方法中总是使用 'async' 和 'await' 关键字?

.net - 在 VB.NET 中使用 VB 6.0 窗体

VB.Net 将 datagridview Comboboxcolumn 绑定(bind)到 datagridviewTextboxColumn

iphone - 将 UIImage 转换为黑白而非灰度以使用超正方体

c++ - Tesseract 在 openCV Mat 上失败(安装问题?)

ios - 如何将 hin.cube.lm 放入 xcode

c# - 从 WPF 中的包 URI 打开文件

c# - 使用 Microsoft Jet OLEDB 对 CSV 的列限制

c# - 将 char 与 int 和 string 连接起来会产生奇怪的结果

c# - 删除具有子目录(非空)的目录