Patent ID: 8275215

Claim:
A method to merge first and second images having a foreground subject at different locations of a same background to form a merged image, comprising: determining, by a processor, a pixel difference image from the first and the second images, wherein each pixel of the pixel difference image comprises an absolute difference between corresponding pixels in the first and the second images; from the pixel difference image, determining, by the processor, first and second locations of the foreground subject in the first and the second images, respectively; for a region between the first and the second locations of the foreground subject, determining, by the processor, a minimum path of values extending from a top to a bottom of the merged image from the pixel difference image; forming, by the processor, the merged image by stitching the first and the second images along the minimum path by using pixels from the first image on a first side of the minimum path and using pixels from the second image on a second side of the minimum path; and displaying the merged image.