这是我使用的解决方案:Tesseract 一个开源 OCR 引擎,这里是获取它的链接:https ://code.google.com/p/tesseract-ocr/
如何使用它 :
Imports System.IO
Imports System.Threading
Imports System.Collections.Specialized
Public class myClass
Private ProcessList As New Hashtable
Private Sub Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button.Click
Dim croppedFile as String = "C:\image.tif"
Dim OCRProcess As Process = New Process()
OCRProcess.StartInfo.FileName = "C:\tesseract\tesseract.exe"
OCRProcess.StartInfo.Arguments = croppedFile & " " & croppedFile & " -l eng"
OCRProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
OCRProcess.StartInfo.CreateNoWindow = True
OCRProcess.EnableRaisingEvents = True
AddHandler OCRProcess.Exited, AddressOf Me.ProcessExited
OCRProcess.Start()
ProcessList.Add(OCRProcess.Id.ToString, croppedFile & ".txt")
Do While Not OCRProcess.HasExited
Application.DoEvents()
Loop
End Sub
Friend Sub ProcessExited(ByVal sender As Object, ByVal e As System.EventArgs)
Dim Proc As DictionaryEntry
Dim oRead As StreamReader
Dim EntireFile As String = ""
For Each Proc In ProcessList
If (sender.id.ToString = Proc.Key) Then
oRead = File.OpenText(Proc.Value)
EntireFile = oRead.ReadToEnd()
End If
Next
MsgBox(EntireFile)
End Sub
End Class
希望它会帮助某人