Live data from Hacker News

How do I find Waldo with Mathematica?

stackoverflow.com

11–14 of 14 posts

Re: How do I find Waldo with Mathematica?

#11

Earlier quoted context omitted.

The code works as-is in Mathematica 9 (though with the URL modified to point to archive.org), so there's likely a difference between your version of 8 and 9.0.0.0.

Can you try http://i.imgur.com/WwQ8P5R.jpg instead of the archive.org link? I rehosted the image on imgur, but it looks like imgur re-compresses the jpg, resulting in differences in the image. If so, then that demonstrates just how brittle this solution is.

I can confirm with this screenshot (http://cl.ly/image/2Q2e3k1w0g25) that imgur does indeed do some sort of compression that makes this solution break with an imgur link for Mathematica 9. I may investigate a bit further. I had previously tested with an uncompressed image, and the same technique did produce the expected results from the answer on Stackexchange.

UPDATE: Changed the correlation value from .12 to .2 and the compressed imgur image has some interesting results (3 circles, one of them is on Waldo): http://cl.ly/image/0Z3k150S2z10

Re: How do I find Waldo with Mathematica?

#12

Earlier quoted context omitted.

Can you try http://i.imgur.com/WwQ8P5R.jpg instead of the archive.org link? I rehosted the image on imgur, but it looks like imgur re-compresses the jpg, resulting in differences in the image. If so, then that demonstrates just how brittle this solution is.

I can confirm with this screenshot ( http://cl.ly/image/2Q2e3k1w0g25 ) that imgur does indeed do some sort of compression that makes this solution break with an imgur link for Mathematica 9. I may investigate a bit further. I had previously tested with an uncompressed image, and the same technique did produce the expected results from the answer on Stackexchange. UPDATE: Changed the correlation value from .12 to .2 a…

Changed the correlation value from .12 to .2 and the compressed imgur image has some interesting results (3 circles, one of them is on Waldo): http://cl.ly/image/0Z3k150S2z10

Yeah, I'm getting the exact same results. So it looks like compression is messing with the algorithm's correlation ability. I think the problem is that red color values are often thrown out in image compression (moreso than intensity / green channels).

Re: How do I find Waldo with Mathematica?

#13

it makes me incredibly happy that the top answer is just a simple correlation - building a boltzman machine or svm is completely overcomplicating the problem. In the other thread the top comment echos that this is a common problem in CV (as in object detection) and goes into that process. But an important thing we ML practitioners should remember is that we're building toward a goal, and exercises like this can help…

As long as we're admiring simple solutions that work on a dataset of size one, and as long as we're allowing a human in the loop, you might like this algorithm:

    return (150, 200);
It's pretty straightforward, it just took some parameter tweaking to match Waldo's coordinates exactly.

Obviously I'm being pedantic, and I mean no disrespect, but I have a bone to pick with so-called "computer vision" algorithms that are little more than simple image processing. In this case, the time spent implementing and tuning the algorithm exceeds the time it would take to solve the task manually (e.g. pay a second-grader to do it). And as others have observed, it isn't obvious that this algorithm would generalize to other images, in which case no time is saved over the manual approach.

It is tempting to dismiss sophisticated techniques because (a) they are hard to understand and (b) the task seems so easy to our own brain-equipped vision systems. But the fact is, most interesting computer vision problems (including this one) require sophisticated representations to achieve robustness and generality. In other words, any good solution will need an answer to the question "What is a Waldo?" that is better than "a 50x50 patch of pixels with red and white stripes".

Re: How do I find Waldo with Mathematica?

#14

it makes me incredibly happy that the top answer is just a simple correlation - building a boltzman machine or svm is completely overcomplicating the problem. In the other thread the top comment echos that this is a common problem in CV (as in object detection) and goes into that process. But an important thing we ML practitioners should remember is that we're building toward a goal, and exercises like this can help…

As long as we're admiring simple solutions that work on a dataset of size one, and as long as we're allowing a human in the loop, you might like this algorithm: return (150, 200); It's pretty straightforward, it just took some parameter tweaking to match Waldo's coordinates exactly. Obviously I'm being pedantic, and I mean no disrespect, but I have a bone to pick with so-called "computer vision" algorithms that are l…

> "so-called 'computer vision' algorithms that are little more than simple image processing"

Implementing any learning algorithm should be the absolute last resort. They're complicated, hard to generalize, and difficult to guarantee in the real world. Not that image processing is much better, but it's definitely more deterministic and predictable in its results. With any system geared toward a specific goal, your first approach should be to look at the simplest solutions (no matter how rudimentary they may be).

> It is tempting to dismiss sophisticated techniques because (a) they are hard to understand and (b) the task seems so easy to our own brain-equipped vision systems. But the fact is, most interesting computer vision problems (including this one) require sophisticated representations to achieve robustness and generality. In other words, any good solution will need an answer to the question "What is a Waldo?" that is better than "a 50x50 patch of pixels with red and white stripes".

Yes, of course. I'm using waldo as an example toward a problem I often see reading research papers, that is an overly complex system made to try to solve more than just the initial task. "What is a Waldo" is irrelevant to the task at hand. Identifying the best candidate for Waldo is the goal. In this situation simple correlation (or even more efficient correlation methods: MMCF, OTSDF, QCF, etc) can give good results (except on that all waldos page...damn that's even hard for a human) most of the time.

To make a euchre analogy - you don't pass on a biddable hand, and you don't waste your trump cards.

Post reply on HN