Search found 22 matches
- 11 Oct 2021, 22:16
- Forum: Gaming Help (v1)
- Topic: Autohotkey stops during loop, stuck on ImageSearch?
- Replies: 3
- Views: 639
Re: Autohotkey stops during loop, stuck on ImageSearch?
I'd say that there's not much debugging to be had here. You haven't described the problem, haven't shown the function call, and haven't shown the other functions. As such, it's an unknown problem with an unknown script. In light of this, my advice from afar would be to consolidate the function to a...
- 10 Oct 2021, 10:55
- Forum: Gaming Help (v1)
- Topic: Autohotkey stops during loop, stuck on ImageSearch?
- Replies: 3
- Views: 639
Autohotkey stops during loop, stuck on ImageSearch?
I have a function that loops looking for an image until it finds it, then it clicks on the image with an offset specified by the function parameters. The main loop inside will periodically get stuck, and it will get unstuck by clicking out of Roblox, and then clicking back into Roblox. The loop work...
- 04 Jun 2018, 08:55
- Forum: Scripts and Functions (v1)
- Topic: Vis2 - Image to Text OCR()
- Replies: 329
- Views: 158966
Re: Vis2 - OCR(), ImageIdentify()
So I ended up making a tesseract training file as it was now messing up 1/2/7's, and even with majority consensus it still wouldn't come at the correct number. And yes, training tesseract was as bad as people make it out to be =\. But the trained one would now fail 0/6/8/9's. I then changed my loop ...
- 31 May 2018, 18:55
- Forum: Scripts and Functions (v1)
- Topic: Vis2 - Image to Text OCR()
- Replies: 329
- Views: 158966
Re: Vis2 - OCR(), ImageIdentify()
You must set the "page segmentation mode" to "single char". -psm 10 Old static q := Chr(0x22) _cmd .= q this.tesseract q " --tessdata-dir " q fast q " " q in q " " q SubStr(out, 1, -4) q _cmd .= (this.language) ? " -l " q this.language q : "" _cmd := ComSpec " /C " q _cmd q RunWait % _cmd,, Hide Mo...
- 31 May 2018, 18:54
- Forum: Scripts and Functions (v1)
- Topic: Vis2 - Image to Text OCR()
- Replies: 329
- Views: 158966
Re: Vis2 - OCR(), ImageIdentify()
You must set the "page segmentation mode" to "single char". -psm 10 Old static q := Chr(0x22) _cmd .= q this.tesseract q " --tessdata-dir " q fast q " " q in q " " q SubStr(out, 1, -4) q _cmd .= (this.language) ? " -l " q this.language q : "" _cmd := ComSpec " /C " q _cmd q RunWait % _cmd,, Hide Mo...
- 31 May 2018, 18:52
- Forum: Scripts and Functions (v1)
- Topic: Vis2 - Image to Text OCR()
- Replies: 329
- Views: 158966
Re: Vis2 - OCR(), ImageIdentify()
You must set the "page segmentation mode" to "single char". -psm 10 Old static q := Chr(0x22) _cmd .= q this.tesseract q " --tessdata-dir " q fast q " " q in q " " q SubStr(out, 1, -4) q _cmd .= (this.language) ? " -l " q this.language q : "" _cmd := ComSpec " /C " q _cmd q RunWait % _cmd,, Hide Mo...
- 30 May 2018, 23:54
- Forum: Scripts and Functions (v1)
- Topic: Vis2 - Image to Text OCR()
- Replies: 329
- Views: 158966
Re: Vis2 - OCR(), ImageIdentify()
Interesting! I did give Capture2Text a try and it seemed like that was a similar process. The Google Cloud Vision would be VERY expensive for what I am doing :shock: For my use, setting it to 2.9 and then sampling 10 times and going with the majority result will work perfect for what I am doing. Gr...
- 16 May 2018, 14:08
- Forum: Scripts and Functions (v1)
- Topic: Vis2 - Image to Text OCR()
- Replies: 329
- Views: 158966
Re: Vis2 - OCR(), ImageIdentify()
So I modified my macro to run through a stepping of the upscaling and here are the results I got after about 150 runs of each (ended up giving me a roughly accurate number quicker): 1.5 - 40% - failed majority consensus 1.55 - 23% - failed majority consensus 1.6 - 42% - failed majority consensus 1.6...
- 15 May 2018, 23:07
- Forum: Scripts and Functions (v1)
- Topic: Vis2 - Image to Text OCR()
- Replies: 329
- Views: 158966
Re: Vis2 - OCR(), ImageIdentify()
It's binarizing first so (black & white image) then upscaling that for speed. Which I don't like because it causes "jagged edges" similar to aliased font. The upscaling algorithm is bad and is a core weakness at this point. When the image is doubled like 1x, 2x, 4x, it's not really doing anything. ...
- 15 May 2018, 20:34
- Forum: Scripts and Functions (v1)
- Topic: Vis2 - Image to Text OCR()
- Replies: 329
- Views: 158966
Re: Vis2 - OCR(), ImageIdentify()
Ok so I just threw it together, and this was over about 1,000 samples per test, unless it just failed miserably then I stopped it after a couple hundred. 3.5 - failed hard, something around 50%, would fail my majority consensus from time to time 3.1 - failing like 2.8 3.0 - ~85.5%, never failed majo...
- 15 May 2018, 19:16
- Forum: Scripts and Functions (v1)
- Topic: Vis2 - Image to Text OCR()
- Replies: 329
- Views: 158966
Re: Vis2 - OCR(), ImageIdentify()
static scaleFactor := 3.5 (line 2169) is all that is needed. You can use Control + Space in Advanced UI mode to bring up the preprocessed image preview. If you get good results with specific settings, let me know so I can improve Vis2 in the future. At this rate, with the testing code I made, I am ...
- 15 May 2018, 15:53
- Forum: Scripts and Functions (v1)
- Topic: Vis2 - Image to Text OCR()
- Replies: 329
- Views: 158966
Re: Vis2 - OCR(), ImageIdentify()
Training is possible, but I haven't included the necessary command line utilities. You're right in that training may help, but unless you have some wacky, specific font, training is unlikely to beat the pre-trained model that is tesseract_best. Since your 0 just has a line through it which is prett...
- 15 May 2018, 12:26
- Forum: Scripts and Functions (v1)
- Topic: Vis2 - Image to Text OCR()
- Replies: 329
- Views: 158966
Re: Vis2 - OCR(), ImageIdentify()
In my application tesseract is confusing 0's with 8's at random times, since there is the cross line on the zero. Since I am using it in code and not the GUI, I am assuming it uses tessdata_best already as listed in OP? Is the only way to fix this to further train tesseract with a specific image dif...
- 14 May 2018, 22:16
- Forum: Scripts and Functions (v1)
- Topic: Vis2 - Image to Text OCR()
- Replies: 329
- Views: 158966
Re: Vis2 - OCR(), ImageIdentify()
Oh very good! I was always kind of curious about how AHK handled variable types. I'll keep an eye out for that!iseahound wrote:Make sure your variable isn't a string. If it is try MsgBox % OCR([x+0, y+0, w+0, h+0])
- 14 May 2018, 22:06
- Forum: Scripts and Functions (v1)
- Topic: Vis2 - Image to Text OCR()
- Replies: 329
- Views: 158966
Re: Vis2 - OCR(), ImageIdentify()
#include <Vis2> ; Equivalent to #include .\lib\Vis2.ahk x := 100 y := 100 w := 500 h := 500 MsgBox % OCR([x, y, w, h]) This works fine for me It must not like my variable contents. Just setting variables to numbers like you did worked great. I must have null variables or something else wrong. Thank...
- 14 May 2018, 21:50
- Forum: Scripts and Functions (v1)
- Topic: Vis2 - Image to Text OCR()
- Replies: 329
- Views: 158966
Re: Vis2 - OCR(), ImageIdentify()
Did you download the full package from GitHub? https://github.com/iseahound/Vis2/archive/master.zip I don't know what code you are running, so I can't give any detailed help. iseahound yes it is the latest 4/4 code. Thank you for the response! It seems like when I run the code with variables - OCR(...
- 14 May 2018, 18:29
- Forum: Scripts and Functions (v1)
- Topic: Vis2 - Image to Text OCR()
- Replies: 329
- Views: 158966
Re: Vis2 - OCR(), ImageIdentify()
I am getting the error - could not find source image. I believe I followed the setup instructions properly. What am I missing? Thanks for any help!
- 07 Mar 2018, 11:18
- Forum: Ask for Help (v1)
- Topic: Image scan on auto start with Windows login
- Replies: 8
- Views: 1693
Re: Image scan on auto start with Windows login
You used this code: FoundX := 123 FoundY := 456 MouseMOVE(%FoundX%,%FoundY%) ;returns empty msgbox 123 := "Test" 456 := "Hello" MouseMOVE(%FoundX%,%FoundY%) ; returns "Test Hello" msgbox MouseMOVE(FoundX, FoundY) ; returns "123 456" msgbox ExitApp MouseMOVE(x,y) { msgbox % x " " y } and got three t...
- 06 Mar 2018, 18:59
- Forum: Ask for Help (v1)
- Topic: Image scan on auto start with Windows login
- Replies: 8
- Views: 1693
Re: Image scan on auto start with Windows login
The naming conventions are not the problem. But this function call MouseMOVE(%FoundX%,%FoundY%) seems wrong. Instead of using the contents of the variables FoundX and FoundY as parameters, you are using the contents of these variables as variable names. So, if FoundX is 110 for example, the functio...
- 06 Mar 2018, 12:31
- Forum: Ask for Help (v1)
- Topic: Image scan on auto start with Windows login
- Replies: 8
- Views: 1693
Re: Image scan on auto start with Windows login
Thank you so much for the response. I will look more into the expression syntax when I get home.
The macro works perfect when I run it manually and open and run the file in windows 7 and 10. The image search stops working when I have it start automatically from Task Scheduler.
The macro works perfect when I run it manually and open and run the file in windows 7 and 10. The image search stops working when I have it start automatically from Task Scheduler.