For the final project in my Computer Vision class (ECE 5554), I decided that the children’s book Where’s Waldo needed to be solved. For good. All those countless hours spent searching for the red and white striped man could be best spent elsewhere. You know, like solving mazes in Highlights.

After some research, I decided that I could construct a Hidden Markov Model based on the 2-dimensional Discrete Cosine Transform (2D DCT) of our friend, Waldo. Using the model, we could scan through a much larger image, looking for sections that closely match the model of Waldo. If the match is close enough (i.e. over a threshold), then highlight that section blue. We can play with the threshold to make the identification better or worse. With the test images, we saw a 70% positive detection of Waldo. Just think, with a few more algorithm and speed optimizations, manually solving for that elusive figure will be a thing of the past!

You can find the report and MATLAB code below. The code is based on the HMM Toolbox.

Last November, I had to create a MATLAB program that performed motion detection on movies. This particular program uses the Horn-Schunck method to detect areas of motion within a video. It highlights high motion areas (based on a pre-determined threshold) and removes any frames that do not contain motion above that threshold. This could be especially useful for watching boring security cameras (like the one in the example video).

Make sure to have the input video in the same directory as the MATLAB scripts and run hs_vid.m.

With the advent of CUDA (well, at least as long as I’ve been looking at it), I keep getting the question: “Can I use CUDA with MATLAB?” The short answer: yes! The long answer: yes…and you can do it for free or pay some money for extra features. If you’re interested in spending a little extra for the most optimized, feature-rich tool set, check out MATLAB’s Parallel Computing Toolbox.

For those (like myself) who are a little tight on money, I recommend GP-you’s GPUmat MATLAB library, which can be found on their site: http://gp-you.org/. And for fun, I’ll walk you through installation and a basic GPU-enabled script!