Aspose.OCR
私は、
私のコード
で画像からテキストを抽出しようとしました:
Const resourceFileName As String = "c:\2011.08.05 v1.1 Aspose.OCR.Resouces.zip"
Dim uploadedImage As String = "c:\ConvertMeToText.bmp"
Try
'Create OcrEngine instance and assign
'image, language and image configuration
Dim ocr As New OcrEngine()
ocr.Image = ImageStream.FromFile(uploadedImage)
ocr.Languages.AddLanguage(Language.Load("english"))
ocr.Config.NeedRotationCorrection = True
ocr.Config.UseDefaultDictionaries = True
Dim fileStream As New FileStream(resourceFileName, FileMode.Open)
ocr.Resource = fileStream
Try
If ocr.Process() Then
TextBox1.Text = ocr.Text.ToString()
End If
Catch ex As Exception
MsgBox("Exception: " & ex.Message)
End Try
fileStream.Close()
ocr = Nothing
Catch ex As Exception
MsgBox("Exception: " & ex.Message)
End Try
例外: ZipEntry::ReadHeader(): 位置 0x00000000 の不正な署名 (0x00000100)