1. A method for modifying an input image, comprising: providing a computer; providing a reference image to the computer; providing an input image to the computer, said input image including at least some portion of the reference image; providing a replacement image to the computer; and replacing, by using the computer, the portion of the reference image included in the input image with the replacement image, by performing steps comprising: (I) estimating illumination to form an illumination image; and (ii) estimating deformation to create a deformation set; (iii) wherein the deformation set maps the replacement image to a deformed replacement image.