4 comments on “Where’s Waldo Solver

  1. hey bro.. my name is ryan from indonesia, i wanna ask you about program “finding waldo” with HMM method, coz i have a final task about HMM..
    This is my story :
    I wanna ask you how to change the objek in program “finding waldo” coz my task just want to change the objek (waldo) to find the “illagal logging” in image taken from google earth ..
    i know we should change the parameters to find it ,for example to find waldo we have to use parameters like: hat, face and t-shirt and of course there is a sample picture of waldo as a clue to find waldo (pic size 20×40).

    i wanna change the objek (waldo) to image illegal logging taken from google earth , so this programme will be finding illegal logging not finding waldo anymore.. can you please help me? i really need your help :)

    • Hi Ryan! Thanks for taking a look at the project. How familiar are you with HMMs? The important thing is that there must be some kind of change over the sub-image (the illegal logging in your case) that remains constant. In the example of Waldo, Waldo could almost always be seen with the red hat, beige face, and red/white shirt – in that order from top to bottom. Are there at least 2-3 “features” that you can use in the sub-image that always appear in a particular order? If not, you might want to look at another method (such as Eigenface).

      If you’ve downloaded the code, take a look at the train_image_mhmm.m file. You can change the training image (images/sub/waldo-cal-01-lq.jpg to the image of your choice) and adjust the numbers in “% Define user parameters” and “% Define regions from picture (states)” sections to best match the picture. This is a LOT of trial and error to produce a good HMM fit. The training script produces a 3D chart that shows the 3 color channels (RGB) sampled over the image (apologies that the graphs are not well labeled. This program was thrown together for school). As you can see, the amount of red, blue, and green change over the sections of the sampled image. Because the RGB curves always have that same basic shape over most Waldos (hat, face, shirt), we can train an HMM to those curves.

      For now, play with those parameters and consider how you would fit an HMM to your sub-image. I hope that gives you a good start. Please let me know if you have any more questions!

      • Thank’s for the opinion that you gave to me, i’ll try as good as i can do, but i just wanna know how to create trial and error files?? cause you say “This is a LOT of trial and error to produce a good HMM fit. ” . In my case (Illegal Lgging) i really need them, so i wanna know how to create it?

  2. There are no files that you can use for trial and error. What I mean is that you need to find an example of your image (illegal logging in this case) and use the train_image_mhmm.m script on the image to train an HMM. Then, adjust the parameters in train_image_mhmm.m and run it again. Does the HMM fit the image better? If you can’t get a good fit with 3 HMM states, you probably need to try a different number of states (2, 4, 5, etc.). Hope that helps!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s