Back to results
US 2008/0278518 A1Published application
Merging Images
AssigneeArcsoft (Shanghai) Technology Company, Ltd
InventorsQiPeng Mei, Liangkui Feng, Kaixuan Mao, Yushan Huang, Weining Sun
Life of this patent
Estimating the term…
Abstract
A method for merging first and second images includes determining a pixel difference image from the first and the second images, determining first and second locations of the foreground subject from the pixel difference image, determining a minimum path of values from the pixel difference image for a region between the first and the second locations of the foreground subject, forming a merged image by stitching the first and the second images along the minimum path, and adjusting pixels of the merged image within a width of the minimum path.
Claims9
1:
- A method to merge first and second images having a foreground subject at different locations of a same background, comprising:
- determining 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 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 a minimum path of values from the pixel difference image;
- forming a 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.
4 more elements
2:
- The method of claim 1, wherein said determining first and second locations of the foreground subject comprises:
- projecting the pixel difference image onto an x-axis;
- determining two peaks separated by a valley in the projection;
- and
- setting x-coordinate of the two peaks as the first and the second locations of the foreground subject.
2 more elements
3:
- The method of claim 2, wherein said determining two peaks separated by a valley comprises:
- determining an average of the pixel differences on the projection;
- determining two biggest continuous regions on the projection with pixel differences greater than the average;
- determining a biggest continuous region on the projection with pixel differences less than the average;
- and
- if the biggest continuous region is located between the two biggest continuous regions, setting x-coordinates of two largest values in the two biggest continuous regions as the first and the second locations of the foreground subject.
3 more elements
4:
- The method of claim 1, further comprising:
- adjusting pixels of the merged image within a width of the minimum path.
5:
- The method of claim 4, wherein said adjusting comprises adjusting each pixel in proportion to its horizontal distance from the minimum path and its corresponding value from the pixel difference image.
6:
- The method of claim 5, wherein said adjusting each pixel comprises determining pixel values as follows:
- Pleft(x,y)=PL(x,y)+(w′−wleft)×Diff(y), and
- Pright(x,y)=PR(x,y)+(w′−wright)×Diff(y),
- where Pleft(x,y) is a value of a left pixel of the merged image on the left of the minimum path, PL(x,y) is an original value of the left pixel from the first image, w′ is the width about the minimum path, wleft is the distance of the left pixel from the minimum path, Pright(x,y) is a value a right pixel of the merged image on the right of the minimum path, PR(x,y) is an original value of the right pixel from the second image, and wright is the distance of the right pixel from the minimum path.
1 more element
7:
- The method of claim 1, further comprising:
- determining another pixel difference image from the first image and a third image;
- from the another pixel difference image, determining a third location of the foreground subject in the third image;
- determining yet another pixel difference image from the merged image and a third image;
- for another region between the second and the third locations of the foreground subject, determining another minimum path of values from the yet another pixel difference image;
- forming another merged image by stitching the merged image and the third image along the minimum path by using pixels from the merged image on one side of the another minimum path and using pixels from the third image on another side of the another minimum path;
- and
- adjusting pixels of the another merged image within a width of the minimum path.
5 more elements
8:
- The method of claim 1, further comprising:
- determining if the foreground subject in the second image and a third image does not overlap;
- if the foreground subject in the second and the third images does not overlap:
- determining yet another pixel difference image from the merged image and a third image;
- for another region between the second and the third locations of the foreground subject, determining another minimum path of values from the yet another pixel difference image;
- forming another merged image by stitching the merged image and the third image along the minimum path by using pixels from the merged image on one side of the another minimum path and using pixels from the third image on another side of the another minimum path;
- and
- adjusting pixels of the another merged image within a width of the minimum path.
5 more elements
9:
- The method of claim 8, wherein said determining if the foreground subject in the second and the third images overlaps comprises:
- determining a further pixel difference image from the second and the third images;
- projecting the further pixel difference image onto an x-coordinate, where the foreground subject in the second and the third images does not overlap if there are two distinctive peaks in the projection.