Hi people, I have a bit of a problem with Tesseract-OCR 3.02.02. (installed
with .exe version)
My project in Visual Studio 2013 using Visual Basic Windows Form it is
supposed to scan an area of the screen and save the image as a .png then
Tesseract is supposed to take that file and do its voodoo and save the
result to a text file. Well, it seemed to be working until I discovered
that it would only convert double digits (10, 15, 35 etc.) to text, single
digits of 0 to 9 are not (all digits are of the same size) , the same goes
for letters, I tried the letter T it was a no go, as soon as I tried TT
there it was in the text file.
Now I've just spent the entire week trying to find easy to read info on
this, half of what I've read comes across to me as a relative newbie as
Martian, so any advice would be most appreciated if it is couched in "Janet
and John" terms or words of two syllables or less and with as much detail
as possible, it took me quite a while to cobble together what code I have
after a lot of trial and error, here it is below.
Imports System
Imports System.IO
Imports System.Text
Imports System.Collections
Imports Microsoft.VisualBasic
Public Class Form1
Dim a, b
Dim myStack As New Stack()
Private Sub Button1_Move(ByVal sender As System.Object, ByVal e As
EventArgs) Handles Button1.Move
Call shoot()
End Sub
Private Sub shoot()
Form2.Show()
Dim area As Rectangle
Dim capture As System.Drawing.Bitmap
Dim graph As Graphics
area = Form2.Bounds
capture = New System.Drawing.Bitmap(area.Width, area.Height,
System.Drawing.Imaging.PixelFormat.Format32bppRgb)
graph = Graphics.FromImage(capture)
a = 513
b = 144
graph.CopyFromScreen(area.X + a, area.Y + b, 0, 0, area.Size,
CopyPixelOperation.SourceCopy)
PictureBox1.Image = capture
Try
PictureBox1.Image.Save("C:\Tesseract-OCR\Last-Result.bmp")
System.Diagnostics.Process.Start("C:\Tesseract-OCR\tesseract.exe/-psm 10",
"C:\Tesseract-OCR\Last-Result.bmp
C:\Tesseract-OCR\Variable-Number")
Catch ex As Exception
End Try
End Sub
End Class
I have also included two of the images that I'm experimenting with at the
moment to illusatrate that the numbers are of the same size and quality.
Many thanks for any help given in helping me fix this.
(P.S. Someone really needs to write a book "Tesseract-OCR for
dummies".....with pictures......I'd buy it lol)
--
You received this message because you are subscribed to the Google Groups
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tesseract-ocr/94810d5d-13fd-4e75-b1e7-be45a1963daf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.