Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 11:42

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

Advertisement



Help with font based image recognition app

Discussion on Help with font based image recognition app within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2016
Posts: 4
Received Thanks: 0
Talking Help with font based image recognition app

basically I don't know what I am supposed to do the code is not really mine so I don't know what I am looking at...I have asked in multiple forums where the problem is and most of the problems so far were either misspelling or old code from older versions of autoit so here it is
Darthed is offline  
Old 09/13/2016, 22:44   #2
 
elite*gold: 0
Join Date: Apr 2011
Posts: 363
Received Thanks: 167
Worst ocr ever seen, is this s*** working?
Maybe you should make it work another way or find any project with ocr and try from there.
Useful links:
elmarcia is offline  
Old 09/14/2016, 00:22   #3
 
Shadow992's Avatar
 
elite*gold: 77
Join Date: May 2008
Posts: 5,430
Received Thanks: 5,878
Quote:
Originally Posted by elmarcia View Post
Worst ocr ever seen, is this s*** working?
Maybe you should make it work another way or find any project with ocr and try from there.
Useful links:
I see you are not having any kind of experience programming OCR and similar computer vision tasks.
Even if this OCR is not perfect, it is still usable in certain cases. This code uses some kind of k nearest neighbour classifier, which has been shown in literature that this classifier works best among all others (SVMs, NNs, RandomForest, ...) if you know the exact font (like you mostly do when you are working with computer generated texts). Even if you do not know the used font it may still work as good as using convolutional neural networks.

@Darthed
It highly depends on the application you want to develop (like always in computer vision). There is no solution which works for everything and every case. This kind of general purpose AI is decades of research away from us. So you should specifiy your goals, show some example texts you want to recognize and tell us what you know.
In general this is no easy task which you can solve in 1-2 weeks if you have basically no knowledge in the computer vision subject. Therefore I suggest to use Tesseract this is some kind of general purpose OCR but of coz it is not working perfectly in every case.
Shadow992 is offline  
Old 09/15/2016, 13:47   #4
 
elite*gold: 0
Join Date: Sep 2016
Posts: 4
Received Thanks: 0
Thanks for the replys
this is the github page of the author by the way I did modify it a little bit to stop it from giving errors but no luck with actually reading anything.. I think what it's supposed to do is detect text on the screen and then output it into output.txt and close the program but when I open it and hover over the text with the mouse it propts a random string of numbers and an Ok button...
Darthed is offline  
Old 09/15/2016, 13:58   #5
 
Shadow992's Avatar
 
elite*gold: 77
Join Date: May 2008
Posts: 5,430
Received Thanks: 5,878
Quote:
Originally Posted by Darthed View Post
Thanks for the replys
this is the github page of the author by the way I did modify it a little bit to stop it from giving errors but no luck with actually reading anything.. I think what it's supposed to do is detect text on the screen and then output it into output.txt and close the program but when I open it and hover over the text with the mouse it propts a random string of numbers and an Ok button...

Because you do not use the same font as the author did, also the splitting of
characters may need to be done on another way. As already mentioned, if you want to use it for something different than the author did, you have to change many things. Maybe that much things that recoding it is eveneasier/better.
But because your knowledge in OCR is very limited, vour best way to go is using Tesseract or some similar ready to use OCRs. They will not work perfectly, too. But at least they will work better than this approach you presented.

Edit:
If you would provide some screenshots we may be able to help you more, otherwise this is a guessing game...
Shadow992 is offline  
Old 09/15/2016, 15:01   #6
 
elite*gold: 0
Join Date: Sep 2016
Posts: 4
Received Thanks: 0
Quote:
Originally Posted by Shadow992 View Post
Because you do not use the same font as the author did, also the splitting of
characters may need to be done on another way. As already mentioned, if you want to use it for something different than the author did, you have to change many things. Maybe that much things that recoding it is eveneasier/better.
But because your knowledge in OCR is very limited, vour best way to go is using Tesseract or some similar ready to use OCRs. They will not work perfectly, too. But at least they will work better than this approach you presented.

Edit:
If you would provide some screenshots we may be able to help you more, otherwise this is a guessing game...
screenshots ? as in like... this one? since it waits for "WinActivate("Paint")" ....
Darthed is offline  
Old 09/15/2016, 15:22   #7
 
Shadow992's Avatar
 
elite*gold: 77
Join Date: May 2008
Posts: 5,430
Received Thanks: 5,878
Quote:
Originally Posted by Darthed View Post
screenshots ? as in like... this one? since it waits for "WinActivate("Paint")" ....
This is something we can work with. At least now we know that you want to use it for Diablo 2.
Your script obviously does not find lines and/or characters to recognize. This can be due to invalid startX/startY coordinates or due to changed fonts, ...

Especially this looks quite "wrong" for me. I guess you did not change these coords:
PHP Code:
COORDINATES PIXEL HERE:
$Line GetLines6143318139$Pixel 
If you changed this and it still does not find any lines/characters, you have to debug it by yourself. The messagebox you see is this msgbox:
PHP Code:
MsgBox(""""$TimerDiff
So it basically only shows you how long this script ran (~3800ms = ~4s). However as you are not very used to programming, you should search for another solution or for someone who gonna code something for you. Maybe you are able to find someone on this board but I guess no.
Shadow992 is offline  
Old 10/06/2016, 17:03   #8
 
elite*gold: 0
Join Date: Sep 2016
Posts: 4
Received Thanks: 0
Yeah thanks for the reply (yeah been busy for long time) now I actually know what the those actually lines do... I did try the app by changing the coordinates in $Line = GetLines part but it didn't really work out well it started running for way longer time(I basically put it on my default screen resolution) so the image search went completely slow mode and even if I narrowed down the coordinates to search for it was still not able to detect the text it might be because of my fonts but I am not sure if the reason is because my font in Diablo 2 is changed because I did try out custom fonts I was not sure if I successfully uninstalled it or not otherways this should definitely work with default diablo 2 fonts...

Also I am not exactly sure how to interpret the screen coordinates does this change work like this ??
Code:
$Line = GetLines( X, Y, X, Y, $Pixel )
then it should probably be like ( 0, 768, 1366,766) maybe ??

So I would really appreciate if somebody could test this script out see what is wrong with it or try to make a new similar one I really wanted to make sort of automatic cube recipe app where it would do certain actions based on the stats of an item... the hardest part I couldn't manage for me was making it speedy I wanted it to detect the characters on the screen as fast as possible and just get on with the rest of the functions...
So if somebody knowledgeable or with OCR experience revisits this it would be really awesome!
Darthed is offline  
Reply


Similar Threads Similar Threads
Font problem on image.
08/27/2015 - Metin2 Private Server - 0 Replies
Hello I´ve got this problem .. http://s7.postimg.org/poc9agmgb/Screenshot_1.png I´m trying to change the current font into new ones ... i´m translating to my own language but when i change to another font , the quality drops down and the imagem does not keep the good font .. How can i fix that?
Dragon City EXP HACK AND FOOD NEED PLEASE[/SIZE]lack"]/FONT][/FONT]
07/27/2013 - Facebook - 0 Replies
please guys i need a hack or link on site for exp hack i cant damn level up >< and i am still level 24 lol if anyone can help link the site and thanks so much :)
AHK Image Recognition
07/02/2011 - Mabinogi - 20 Replies
Hey guys, I've got most of my metallurgy bot done, but Qilla beach is just too spammy with hard black and hard whites to get it to work without a lot of false positives. If you've played with metallurgy much you know that making the sites ctrl-clickable breaks the game, so that's out. I've been playing around with the illumination mod in MAMP but I can't get ANYTHING in AHK's imagelib to work while that's on regardless of when I take the screenshot and what filter I put on. What gives, and...
Operation 7 Model Recognition
10/10/2009 - General Gaming Discussion - 2 Replies
close this shit already http://img122.imageshack.us/img122/9051/op7wallha cksp4.jpg http://img88.imageshack.us/img88/183/wallhackop7p m1.jpg
mob death recognition
07/22/2009 - Kal Online - 7 Replies
hi... for beheadable monsters i get the state packet when they die... 0x3d and the state is 0x08-it detecs the death of beheadable mobs but...how do i detect unbeheadable mobs death? (like doggebi death)? thanks alot.



All times are GMT +1. The time now is 11:43.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.