Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Fri Nov 15, 2019 1:47 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Tesseract and OCR plugin
Thanked: 0 time(s)  Unread post Posted: Fri May 17, 2019 10:03 am 
New User
New User



Joined: Wed Jan 30, 2019 12:19 pm
Posts: 3
Been thanked: 0 time(s)
Has thanked: 1 time(s)
Contribution Points: 10
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 870 times ]
empty.png
empty.png [ 687.05 KiB | Viewed 870 times ]
Top
 Profile  
Reply with quote  
 Post subject: Re: Tesseract and OCR plugin
Thanked: 1 time(s)  Unread post Posted: Fri May 17, 2019 1:51 pm 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 1963
Location: USA
Been thanked: 437 time(s)
Has thanked: 34 time(s)
Contribution Points: 16782
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.

_________________
----------------------------------------Syrifina---------------------------------------------------
PM me for licenses and/or licensing information: Click Here
[Be sure to include and update your profile with your BE ID]

Forum Rules
Reminder of rules regarding Contribution points
Getting started in 1, 2, 3
Virtual Drivers; Manual Installers


Top
 Profile  
Reply with quote  
 Post subject: Re: Tesseract and OCR plugin
Thanked: 0 time(s)  Unread post Posted: Mon May 20, 2019 3:17 pm 
New User
New User



Joined: Wed Jan 30, 2019 12:19 pm
Posts: 3
Been thanked: 0 time(s)
Has thanked: 1 time(s)
Contribution Points: 10
Can you tell me how can i read numbers and save to text file?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group