Detecting Waldo with Python for UChicago College Admissions
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

This is a script I created in response to the University of Chicago admissions essay question, "So where is Waldo, really?" I have published a version of the accompanying counselor-friendly essay, though I will not distribute Handford's entire drawings publicly.

It was inspired by a StackOverflow response that implemented rudimentary Waldo detection in Mathematica. This solution follows a more versatile algorithm in Python, supported by NumPy, SciPy, Scikits-Image, and the Python Imaging Library.

If you'd like to run the code yourself, it works on Python 2.7.3 with the latest versions of the four aforementioned libraries. You may need to boost the contrast of the images you're working with so that red-white borders are clear, and replace my reference values and color distance thresholds for red, white, and black (in the L*ab colorspace) with your own. Input images must be in RGBA colorspace, and my pixel counts are only tested to work with images where a single page is 1285x666.