Matt Pucevitch, 9/16/04
This program will take a set of three greyscale images of a scene, correct minor alignment errors, and then overlay the three images to produce a final color image.
To solve this problem, my first step was to learn how to use matlab and its millions of functions wrapped in a bafflingly obtuse and proprietary syntax. Once I reached that point, the rest of the project was a somewhat pleasant experience.
I began by testing my capacity to apply gaussian blurs and edge detection filters to one of the image channels. Basically I made a lot of small functions and doodled around in the command line of matlab to test things out. Once I had all of those basic steps under control, I set out to implement a nieve solution
This solution took one of the three images as an anchor, and converted them to edge detected images (5x5 gaussian with a sigma of .5). I then permuted across all of the offsets of the other two images within a (-15,-15) to (15,15) region. For each offset, the resulting image was dotted with the original anchor image. The maximum result for all the permutations across the 15 pixel radius for each of the other two channels was selected as the best match result. Then the regular images were shifted thusly and fed to the cat() function for overlay.
After this solution was implemented, image tree-ifying it was a snap- it merely consisted of turning the function which produced the offsets into a recursive call. On a flight of fancy I also unrolled the double for loop to simultaneously work on both of the non-anchored channels to save time (I was told for loops in matlab are slow as poo). I set the compression threshold of the image tree to be a command line argument, and then went back and made the lookaround radius on the displacement matching an argument as well.
Finally, when I ran out of time to play, I ftpd the files into my handin directory, and then realized I didn't really know how to make a webpage. Thus I hit up some online manuals for some rather simple HTML tutorials! yay.
Here are some of my results