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)