Uncategorized Thursday, March 22nd 2012 at 11:21 am

## Programmer Creates Algorithm to Find Waldo

Because people with phenomenal computer skills get bored of simply being geniuses and need to exercise their genius every now and then, we, the human race, have found a way to make computers find Waldo. Over on collaborative programming site Stack Overflow, the question of how to easily make a computer find Waldo using computational software program Mathematica was posed, so the programmers collaborated and user Heike’s solution seems to have done the job, garnering the most upvotes by a wide margin.

Rather than post all of Heike’s code, which can be viewed over on Stack Overflow, we’ll simply discuss the steps his code took. First, he filtered out all of the colors that aren’t red. Next, he calculated the correlation of the Waldo scene to a black and white image in order to find the red and white transitions in Waldo’s iconic shirt. Then, he picks out the pixels in that image that were found to have a high correlation, and draws a white circle around them. He had to fidget with the level of the image, as when it is too high, the code identifies false positives.

Finally, he compares the image the code was working on — the compared one — and joins it to the original Waldo scene.

Heike’s method seems to work, with commenters granting it many upvotes and posting their support, one commenter notes that the method isn’t exactly ideal, as it requires manual tuning (fidgeting with the levels). Though Heike’s method was post a few months ago, it’s just being widely discovered now, and we couldn’t help but share it with you, as Heike answered everyone’s most important childhood question, “Where’s Waldo?” Sorry Carmen, but wondering where Waldo is only takes three syllables.

Filed Under |
• waldo

easy… just find by pixel color.

• lolno

because the only red pixels in that picture are on waldos shirt.

• timcoxb

heike is name mostly used for females

Dude you’re stupid…you just sounded soo not programmer (as you wished). That image has like 1MP of red in it. So, please go back to sleep.

• SmarterGuy

You know, I usually don’t correct people on the internet, or call them out on stuff, because you know, better things to do, no one will care, don’t feel like getting into an argument, etc, but I think I’ll make an exception for you, Oksada the Internet Genius, because you might just be the biggest hypocrite & idiot I’ve seen all year. Let’s dissect your horrid, frothing, anal-grease-laden festering mess of a statement shall we?

1st off, where did you get the idea this guy was trying to sound “programmer?” His fucking statement has to do with pixel color, more akin to a graphic artist than a programmer. Seriously, programming is mostly about CODE, not graphical elements like pixels, and pixel colors, idiot.

2nd, has like 1 MP? What the fuck are you talking about? I hope you’re exaggerating. Do you know how many pixels 1 megapixel holds? 1 million. Guess how many pixels that image has? I’ll give you a hint: There’s a big CLUE in the image’s filename. Do you know how to view the image’s filename? Sure you do, you’re the Internet Genius. Anyway, it says “waldo-550×412.jpg” Let’s see, now how would we find the total # of pixels? That’s right (as I’m sure you knew), you multiply! 550×412 = ….drum roll….226,600. Awwwww, I’m afraid Mr. Oksada is a big ol’ dumbass. You see, even if every one of those pixels was red, it couldn’t = a megapixel.

3rd, “you just sounded soo not programmer?” Sweet sentence composition there bro. How about “Dude you’re stupid…You really didn’t come off as the programming expert as I’m sure you intended to.” I’m sure you’ll agree this sounds a bit better, doesn’t it?

4th, his statement has some basis. If you were to find a group of red pixels, in roughly a line shape, extremely close to a group of white pixels, in roughly a line shape, and then found this pattern to repeat a couple of times (aka the striped pattern on his shirt) you would indeed be on your way to finding Waldo. I’m sure that’s probably the basis for his algorithm anyway.

Basically, your response to the statement you’re originally responding to is all kinds of retarded, and frankly your post reeks of “little fucking kid on the internet who doesn’t know when to keep his mouth shut.” Please learn to do just that (keep your mouth shut) because frankly you don’t seem to have very intelligent, or well-thought out input.

Cordially yours,

Someone older and smarter than you.

P.S. Don’t even TRY to respond to this and pretend like you have some sort of counter-argument. I try very hard not to be narcissistic or egotistical, in fact besides what I’m about to say I am the completely opposite of those characteristics 99% of the time, but seriously dude you just got owned. Don’t even humor me with some BS half-assed response to try and justify yourself. You’re dumb, you’re wrong, it’s over. Move on. And learn from it. That’s all.

• Jezzamon

Hello I am not that guy so I can respond! Yay!

Anyways um if someone does something wrong, the best thing to do is maybe politely tell them they’re wrong. So like raging at them just makes everyone unhappy angry. Like I’m trying to do now.

So yeah, using the word “like” in “like 1 MP” is indicating approximation or exaggeration. It doesn’t really matter if it’s completely off.

Also sometimes it’s fun to use incorrect grammer such as “soo not programmer”.

and I don’t like your tone, mister!

So yeah let’s all have a fun time on the internet and be kind to everyone! Wheee

Also good troll by waldo if that was the intention. :D

Bill Gates found Waldo first.

• Anonymous

I worked as a research assistant on a face recognition project for two years, and researched some image processing methods for my thesis. I am not saying I am smarter than everyone else, I am saying I have some experience from my choice in education.

The step to filter red was already sort of cheating. In other words, the algorithm was tuned to find Waldo already in images that were predominantly other colors, since its looking for his red shirt transitions. Its not uniquely trying to identify Waldo from other features like the way he looks in spite of the shirt. From what I read in the description, its as if you are looking for only one needle in the haystack as it runs along a conveyer belt but have a filter to remove anything that isn’t one of the colors of the metal you are looking for. Its also pretty simple to identify a series of lines.

It is an example of image recognition, but it seems too fine tuned to be state-of-the-art. Furthermore, I would like to see how his algorithm does on the advanced difficulty ones where Waldo is surrounded by barber poles, Christmas scenes, and/or faux-Waldos.

I have to be a devils advocate here, its part of my nature.

• ohlawd

… really? you are defending a dumbass that was being an ignorant dick in the first place? there are people who deserve long rant rages… and he was one

you aren’t helping, i enjoyed reading it because if i knew the specifics i would say the same thing

nobody likes a white knight

• you are a moron

“4th, his statement has some basis. If you were to find a group of red pixels, in roughly a line shape, extremely close to a group of white pixels, in roughly a line shape, and then found this pattern to repeat a couple of times (aka the striped pattern on his shirt) you would indeed be on your way to finding Waldo. I’m sure that’s probably the basis for his algorithm anyway.”