The method I used to implement the assignment was to pick a minimum size to start to that was a .5 to some power of the original image size. The number chosen needed to be enough to allow for the problems with the edges not to creep in. From there I used a gaussian multiresolution approach to speed up the search by limiting the number of tries on any given level, and to further narrow the search of lower levels. The images were matched using the vertical derivative of their images, so images with many vertical features would probably fair poorly with this implementation. Changing the matrix kernel to be a horizontal derivative would solve this for those images.