x
ETF2L is looking for new Staff to recruit! Are you interested in supporting the league? Then click here for more details on what we can offer and how to apply! 

Forum

Explain please

Created 4th October 2011 @ 21:03

Add A Reply Pages: 1

howdeh

Perilous
WUL

I don’t understand how the system grabs the players, including mercs who played so quickly, just from a status screenshot…?

srry if dumb its just rly cool and fascinating and i wanna kno x))

Dr-GimpfeN

9g1c

there are little indians who review the screenshots everytime one gets uploaded.
they live at canfos basement thats why he is ETF2L Admin cos he got free little indians

huhystah

Magic!

xzr

http://en.wikipedia.org/wiki/Optical_character_recognition

Quoted from Dr-GimpfeN

there are little indians who review the screenshots everytime one gets uploaded.
they live at canfos basement thats why he is ETF2L Admin cos he got free little indians

I don’t know what the real explanation is and I don’t care because I believe that this must be the truth.

Skyride

DUCS

Someone come and shout me down if I’m wrong (if there’s another way I’d be really interested to hear it, this isn’t an area I know a lot about). This isn’t how ETF2L necessarily does it, this is just me guessing how it works based on what I know.

Take this random screenshot as an example. To a computer, an image is a big shit load of numbers. As I’m sure you know, a computer screen is built up from “RGB”, or “Red Green Blue”. Each pixel on a computer is just a square, with 1 light of each of those colours, and by varying the brightness of each of those 3 colours, you can produce millions of different colours.

Generally on a modern computer, the image is stored such that each colour is just a number between 0 and 255 (0 being off completely, 255). So “0 0 255” would be Blue, “255 0 255” would be magenta, and so on. 255^3 gives you 16,581,375 different combinations.

The reason that matters is because we know the background colour behind the text on the console window is always going to be EXACTLY the same colour. Taking that into account, we can quite easily find a box of exactly that colour, and cut that out on its own. What that then gives us, is a nice tidy cutout image with 100% white (255 255 255) text, on a background we know the exact colour of. To make matters even easier, all the text is in a font that we already know, at a size we already know, and it’s not even anti-aliased (bassically that makes theres no fading to make it look smoother like this: http://upload.wikimedia.org/wikipedia/commons/5/5e/Antialiased-zoom.png)

The font is what is called a “monospace” font. Every single letter, space, and special character is the same width no matter what. By taking that into account, we can cut up the image into blocks, compare the image to each letter of the actual font, and use that to work out what letter is in this small image.

Once you compile this whole list of blocks together, you end with for all intents and purposes, just whatever is in the console window in the screenshot in a text file. From there, it’s pretty easy to just parse it together like a normal TF2 log file and find the “status” list.

Hope that helps man, just realised this is a massive wall of text, but it’s cool people are interested. It’s bassically just an interesting Computer Science type project.

tl;dr: It does some complicated image stuff so that it just has the text in the console window in the screenshot in a txt file. Reading steamID’s and stuff from a txt file is really easy.


Last edited by Skyride,

CanFo

(Legend)
[HA]
#T4F

They are russians, one of them is http://etf2l.org/forum/user/140mihalch[/url], the rest ist correct.

Add A Reply Pages: 1