Blue Eye Macro
http://blueeye-macro.com/

Tesseract and OCR plugin
http://blueeye-macro.com/viewtopic.php?f=175&t=34702
Page 1 of 1

Author:  digit [ Fri May 17, 2019 10:03 am ]
Post subject:  Tesseract and OCR plugin

Hi, im very new in Blue Eye and need some OCR into Roulette recognizing numbers.
So i made a script :

when Color.At coordinate is (RGB)("255", "0", "0", "658", "322")
begin
Plugins.OCR (Simple)("654", "348", "696", "319", "1")
Macro.Pause("1000")
Window.Display message box("{1}", "yes")
end
to OCR and record only red numbers. But when the red number is show the message box is empty. Can you help me how can i OCR all red numbers and put them into some table?

Here is the execution log:
Checking if: Color.At coordinate is (RGB)(R: 255, G: 0, B: 0, X coordinate: 658, Y coordinate: 322)
Result: No
Checking if: Color.At coordinate is (RGB)(R: 255, G: 0, B: 0, X coordinate: 658, Y coordinate: 322)
Result: Yes
Executing: Plugins.OCR (Simple)(X Coordinate: 654, Y Coordinate: 348, X Coordinate: 696, Y Coordinate: 319, Save to variable: 1)
Executing: Macro.Pause(Duration: 1000)
Executing: Window.Display message box(Message: , Wait: yes)

Attachments:
red.png
red.png [ 842.55 KiB | Viewed 586 times ]
empty.png
empty.png [ 687.05 KiB | Viewed 586 times ]

Author:  Syrifina [ Fri May 17, 2019 1:51 pm ]
Post subject:  Re: Tesseract and OCR plugin

The first thing I would do is to make sure you have .net Framework 3.5 loaded; I see the tab in your first picture says "download 4.8"...it's not the same and 3.5 is still needed.

Another thing that is really confusing is all the "1s". I doubt the 2 pictures are sequential, but if they are then I would have to assume there's at least 2 problems. The first being that the OCR plugin is not correctly identifying the red number and the second is that there is a problem displaying the correct variable.

The second problem is more concerning because I've never seen that before. Let's take a look at what's going on:

script:
Plugins.OCR (Simple)("...coordinates for plugin...", "1")
-- You are telling the plugin to save the variable as the number 1
Macro.Pause("1000")
Window.Display message box("{1}", "yes")

-- You are telling BEM to display the variable named "1"
end

execution log:
Executing: Plugins.OCR (Simple)(..., Save to variable: 1)
-- It looks like the plugin found a value of "1" and is saving it to variable "1"
-- but, the plugin may just be saying "save the value" to variable 1 and it didn't get a value
Executing: Macro.Pause(Duration: 1000)
Executing: Window.Display message box(Message: , Wait: yes)

-- There is no value defined for variable "1", so it displays nothing

Therefore, isn't it very difficult to follow what is going on when trying to find numbered values with numbered variable names like "1"? Not to mention 1 is red and 21 has a 1 in it (doesn't that make it so much more fun?). If you replaced (in the very first line above) the variable name "1" with "x" and the display message with {x}, it would be much easier to see if the plugin got the result "1" or if it's repeating the variable name...or use a proper name like "OCRresult".

But anyway, it looks like the plugin is not getting a number. I would test it out on the screenshots you already have and dial it in before trying it on the game again.

Author:  digit [ Mon May 20, 2019 3:17 pm ]
Post subject:  Re: Tesseract and OCR plugin

Can you tell me how can i read numbers and save to text file?

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/