Abstract
A method for matching images is provided that includes the step of providing a template image and an input image. The images include pixels, each pixel having an intensity associated therewith. An energy function formed by weighting a sum of squared differences of data constraints corresponding to locations of both the template image and the input image is minimized to determine estimated geometric and spatially-varying illumination-parameters for the input image with respect to the template image. The estimated geometric and spatially-varying illumination parameters are outputted for further processing.