GeneNight

How can I find numbers with OCR?

9 posts in this topic

Hi there guys, I got stuck with my own project because even though I do know what I need to use to solve my problem, which is finding numbers from the screen, I never used OCR in my life before. I tried to look out from the topic itself that talks about tesseract OCR, but it is really old and the example doesn't work anymore unfortunately. Can someone help me out please? Thank you.

Share this post


Link to post
Share on other sites



It might help if you provided more details, such as:

  • Where do these numbers come from? What is the  name of the application?
  • How do you intend to use them?

Share this post


Link to post
Share on other sites

First of all, thank you for replying me, anyway I already tried with memory leak and I got nothing at all. The numbers come from an application emulated by Nox, with the numbers i need to find the exact pixel point. Hope you are not thinking about bot games... 

Cheers

Share this post


Link to post
Share on other sites

Post more details (screenshot) of your application

Post some details on what AU3Inf or Simplespy is revealing (see FAQ31 link below)

Check then if you really need OCR or that you can handle your application in a better way.

Tesseract OCR in general still should work if you really have to fall down to OCR. Another bitmap solution could be to use bitmap/GDI to analyse yourself if you only have to recognize 0-9 numbers in a dedicated area of your screen.

 

Share this post


Link to post
Share on other sites

Thank you for replying me @junkew, anyway, I'll link you the image about what I want to achieve. By doing this simple math with the code down below: 

    $dex= GUICtrlRead(Int($destra))
    _CreateEdit($hEdit,$dex)
    $six= GUICtrlRead(Int($sinistra))
    _CreateEdit($hEdit,$six)
    $cen= GUICtrlRead(Int($centro))
    _CreateEdit($hEdit,$cen)
    $percentuale = ($cen - $six)/($dex - $six)*100
    _CreateEdit($hEdit,$percentuale)
    $click = (int(531*$percentuale/100)+71)
    _CreateEdit($hEdit,$click)

I want to find the 3 numbers for getting the exact pixel point where to click. Thank you again.

achieve.PNG

Share this post


Link to post
Share on other sites

What are tools as Au3Inf or simplespy giving back on the whole image.

  • Do you get one red square around the window or do you see highlighting areas around the text or numbers..
  • Suggest to also read FAQ 38 about bitmaps and pixels.

Algorithm you could try (with information you get out of FAQ38)

1.  Get pixels / bitmap data after aim at:

2. Interpret the hex bitmap data yourself

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I'm a newbie with autoit, I'm sorry about that, I'm not telling you to write my code, what I'm asking is an example that let me understand how FAQ38 functions work. I tried already myself without having success. @junkew

Edited by GeneNight

Share this post


Link to post
Share on other sites
11 hours ago, GeneNight said:

Hope you are not thinking about bot games... 

Well, that's what it looks like you are doing. In what other application would you need to aim at something and then click?

Share this post


Link to post
Share on other sites
3 hours ago, GeneNight said:

I'm a newbie with autoit, I'm sorry about that, I'm not telling you to write my code, what I'm asking is an example that let me understand how FAQ38 functions work. I tried already myself without having success. @junkew

1. Show more proof its not a game

2. Bitmap / pixel checking OCR etc. is not for newbies the best start.
Start first with notepad.exe or calc.exe understanding the base

3. This basically gives you all functions you should study to do what you want

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now