Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 16:18

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



OCR with tesseract -> just bad results [AutoIt]

Discussion on OCR with tesseract -> just bad results [AutoIt] within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2018
Posts: 2
Received Thanks: 0
Question OCR with tesseract -> just bad results [AutoIt]

Hey guys,

i need your help with OCR:

Im trying to read a PIN from a game (WWE Supercard), and want to input the code to the virtual keyboard of the game.

The layout of the keyboard and the buttons is always a bit random, but this i can check with autoit and image search.

The main problem i have, is that the ocr ressult is always wrong.

I take a screenshot of the area with the pin code (with AutoIt, from Nox Player), save it as BMP (also tried jpg and png) and use tesseract to scan the image.

I have big problems with the results. A 5 is a 6, or 8 and 6 is always a B.
I tried with imagemagick to preprocess the image to b/w and other parameters, but the result is always poor and not accurate.

Tried with Tesseract 3.x and 4.

I use this code to get the OCR result:
C:\Users\username\Downloads\TesseractExample\tesse ract.exe, C:\Users\username\Downloads\TesseractExample\einga befeld_10.bmp, C:\Users\username\Downloads\TesseractExample\resul t.txt

Image files are attached.

Does anyone have a solution to scan this text?
Attached Images
File Type: png Nox Player 1.png (370.2 KB, 42 views)
File Type: bmp Nox Player 2.bmp (5.71 MB, 3 views)
File Type: bmp text.bmp (133.9 KB, 2 views)
o4314990 is offline  
Old 05/17/2019, 15:08   #2
 
Shadow992's Avatar
 
elite*gold: 77
Join Date: May 2008
Posts: 5,430
Received Thanks: 5,876
Tesseract is not really optimized for tasks like this. I guess the easiest and best solution is to write some small code on your own for this you can have a look at this:


It is mostly C++ based code but I guess you can still figure out how you can use this for AutoIt.
Shadow992 is offline  
Old 05/18/2019, 09:00   #3
 
elite*gold: 0
Join Date: Dec 2018
Posts: 2
Received Thanks: 0
Thx, I'll try it
o4314990 is offline  
Old 05/18/2019, 09:29   #4


 
False's Avatar
 
elite*gold: 0
The Black Market: 243/0/0
Join Date: Apr 2011
Posts: 11,118
Received Thanks: 2,435
Arrow General Coding -> AutoIt

#moved
False is offline  
Old 05/18/2019, 11:49   #5
 
Interløgy's Avatar
 
elite*gold: 729
Join Date: Aug 2016
Posts: 317
Received Thanks: 181
Tesseract provide a class names "ImageHelper", there are some static methods to provide a better picture.

in my last Java project it looks like this:
Code:
public static BufferedImage improveQuality(BufferedImage subimage) {
    subimage = ImageHelper.convertImageToGrayscale(subimage);
    subimage = ImageHelper.convertImageToBinary(subimage);
    subimage = ImageHelper.getScaledInstance(subimage, subimage.getWidth() * 3, subimage.getHeight() * 3);
    return subimage;
}
Interløgy is offline  
Reply


Similar Threads Similar Threads
Autoit OCR (Texterkennung)
12/14/2017 - AutoIt - 2 Replies
Moin moin, ich möchte gerne den Text aus screenshots auslesen und als Stringwert weiter verarbeiten. Das ganz am liebsten in Autoit. Ich hab mich da mal ein bisschen belesen. Unter anderem bietet ja google mit ihrer Vision API eine schöne OCR die in dem Umfang (3-5 im Monat) ja sogar kostenlos ist. Hat jemand damit schon Erfahung oder einen Ansatz wie man das anstellen könnte?
[Selling] Tesseract.cc - External CS:GO Multihack | Slotted | VAC Undetected
07/29/2017 - Counter-Strike Trading - 3 Replies
DON'T COME TO ME ASKING FOR A TRIAL, I AM NOT GOING TO GIVE YOU ONE. Slots: 6/10 currently filled This cheat is intended for legit play rather than hvh/rage. Video: - https://www.youtube.com/watch?v=kjdGDSloar4&fe ature=youtu.be - ^ ESP does not flicker in game, the video was just messed up.
[Suche] Jmd der sich mit Tesseract auskennt [Biete] 10€/500 e*gold
01/28/2014 - elite*gold Trading - 1 Replies
Hey, wenn sich einer damit auskennt einfach schreiben, zahle 10€ Paypal oder 500 e*gold. MfG, maxasoft
tesseract.exe
04/24/2013 - AutoIt - 2 Replies
hallo, ich würde gerne wissen ob sich jemand mit "tesseract.exe" auskennt und mir sagen kann ob er beim erkennen von Bildern nur bestimmte Zeichen sucht, ich bräuchte um ein capture zu knacken nur Kleinbuchstaben, keine Sonderzeichen und keine Großbuchstaben und keine Zahlen. mfg
OCR with Autoit
05/21/2011 - General Coding - 0 Replies
Hey guys, I need a short feedback. I want to create an OCR for a Website that is based on Flash. Before I tell you more, my current script: Func _select() ;ZAHL 1 For $i = 0 To 9 Step 1 $n = _ImgSearch("_"&$i) If $n > 895 AND $n < 905 Then $1 = $i



All times are GMT +2. The time now is 16:18.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.