Use OCR for more info during loading screen
See original GitHub issueHey there. I’m also a C# developer, and I have been looking into OCR possibilities for locating players position on the loading screen, as well as determining which hero they are playing.
As source, I used your screenshot of HotsStats.
I tried tesseract OCR, which gave me garbage results. I then tried this: https://msdn.microsoft.com/en-us/library/windows/apps/windows.media.ocr.aspx
Unfortunately, it’s for WinRT (windows 8+ apps), but I managed to implement it in a sample console application on my windows 10 machine. I reckon I can implement it on this app, but it will only run on windows 8 or higher.
The results were pretty impressive. Here is the result from running OCR on your screenshot (as one long text string):
Li-Ming Mudak Greymane caspeR Illidö 20 WELCOME TO SKY TEMPLE Link Defend the Temples Guardians will try to wrest control of their temples from your team. Hold them off to keep the temple's power for yourselves! Abathur SpincOck Greymane Re41ity Azmodan Grindex Thrall xUmidumix Zeratul DenBennyyy 24 12 Player Mudak AdrianTony obZen Buja MMR 3253 2151 2050 2750 3988 Link Player Grindex SpincOck Re41ity xUmidumix Den Bennyyy MMR 2065 4019 3067 1588 2170 Average MMR: 2838 Average MMR: 2581 Capture the Temples Temples will periodically activate. Stand within their grounds to capture their power! j 20 AdrianTony Raynor obZen Abathur Buja Hold the Temples Stand firm and the temple will unleash a blistering onslaught on your enemy's forts!
I still have a few reference problems that is causing troubles with some of the types involved, but I also believe these are fixable (I just don’t know how yet).
If you want to test the capabilities of this OCR, without writing code, this website is built upon the same assembly: https://ocr.space/
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
having heroes and map data at loading screen will allow to create many useful features like showing top builds for your hero and tips how to play with or against certain heroes from hotscounters.com and showing objective timers next to map info
Hmm… That is true. I do have a lot on my hands at the moment… I could send you the code I have for pre-processing the pictures for good OCR results if you want to pursue down this road. I was planning to use the webservice for doing the actual OCR, as the free api allows quite a lot of requests - and gives you the same information as using the assembly yourself. It has the added advantage that we don’t have to mess around with implementing a WinRT assembly - and still supporting OS lower than Win8.