Project 1 Writeup
Alex Hills (ahills)
Feb 5, 2010
For this project, I implemented two different main functions and one helper function. The first is the single scale combination algorithm, it runs on the smaller images (jpgs, anything less than 500px wide). Because it takes less than one minute to process the smaller images, the image pyramid (as implemented) actually slows it down, and speeding it up seems like overkill. However, for any of the larger images (the tifs, 60+mb and 3000px wide), I use an image pyramid. The algorithm is as follows:
First, scale the image to 200px wide, and do a large scan. (the function for how large a radius to scan is this: (-width*20/2800+26), I found that this allows precise changes at later levels and large changes initially when scanning is faster). Then, scale the image 1/8 of the way to full size, and scan again with a pre-determined initial scan. Proceed until scanning the full image (usually scanning a 20x20 patch on the last one). This detailed level of scanning usually takes 5-10 minutes for the tifs.
Most of the paramaters are variables and thus easy to change to suit the needs of different photographs (say there was a 2gb file. That would need a different function for scanning, etc...). Easily changable things are: scanning function, initial scale factor, number of scales to process, single-scale scan radius, size of image to switch algorithms, etc...
The metric I used is the least squares sum((a-b)^2). It worked on almost all the images given, and the extra ones.
- Extra credit 1: I crop the images as well, although I do just crop a proportion of the image (this makes the image checks better, as well as usually gets rid of most of the ugly borders while losing close to nothing of the actual image). I crop them immediately before passing them to the shift function.
Results Images
Large Images
Extra Images
One additional large image
Image 7