The procedure of the present invention estimates a correction rate for
elimination of a positional shift between the multiple first images,
executes correction with the estimated correction rate to eliminate the
positional shift between the multiple first images, and combines the
multiple corrected first images to generate the second image. The
procedure selects a target pixel among pixels included in the second
image, and detects multiple adjacent pixels respectively in the multiple
first images, which adjoin to the selected target pixel. The procedure
then selects an image as a composition object or a composition object
image with regard to the target pixel among the multiple first images
according to the multiple adjacent pixels, and calculates a pixel value
of the target pixel based on the composition object image. The procedure
excludes the first image that includes a certain adjacent pixel out of
the multiple adjacent pixels, which is detected to have a motion relative
to one base image selected among the multiple first images, from the
composition object image with regard to the target pixel. This
arrangement of the invention enables generation of a high-resolution
still image by taking into account motions of image parts.