Where’s Waldo? This Algorithm Knows
Illinois-based programmer Arnoud Buzing created an algorithm/‘Mathematica’ that makes it easy to find Waldo (or ‘Wally’, as known outside of America) without you squinting your eyes.
On the collaborative programming Q&A site Stack Overflow, Buzing published a function which “reduces the visual complexity a little bit by dimming some of the non-red colors—which makes it easier to find the elusive character.
He first filters colors that aren’t red, then calculates the “correlation of this image with a simple black and white pattern” to find where the red and white transitions in the shirt.
After that, Buzing uses “Binarize to pick out the pixels in the image with a sufficiently high correlation and draw white circles around them to emphasize them using Dilation”.
“I had to play around a little with the level. If the level is too high, too many false positives are picked out,” he wrote.
“Finally I’m combining this result with the original image to get the [answer].”
Looks like Waldo can’t escape Mathematica.
[via The Verge]
Also check out these recent news