Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim XmlDoc As New XmlDocument
- Dim bild As New Bitmap("C:\Users\denni\Desktop\screenshot.jpg")
- bild = InvertColors(bild)
- Dim ocrtext = String.Empty
- Using engine = New TesseractEngine("./tessdata", "eng", EngineMode.Default)
- Using img = PixConverter.ToPix(bild)
- Using page = engine.Process(img)
- ocrtext = page.GetAltoText(1)
- End Using
- End Using
- End Using
- XmlDoc.LoadXml(ocrtext)
- For index As Integer = 2 To 6
- MsgBox(XmlDoc.SelectSingleNode("/Page/PrintSpace/TextBlock" & "[" & index & "]" & "/TextLine[2]/String/@CONTENT").Value)
- Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement