A non-transitory computer readable storage device storing a computer program, which when executed by a computer, performs a method comprising the steps of:
- generating, by an image combination unit, combined images by combining photographed images having different exposure times;
- performing, by a motion area detection unit, a comparison process on a plurality of the combined images generated by the image combination unit to acquire a pixel value difference and to perform a motion area detection process of comparing the pixel value difference with a predetermined threshold value and determining a pixel area, of which the pixel value difference is equal to or larger than the threshold value, to be a motion area where motion of a subject is estimated to have occurred;
- acquiring the pixel value difference between to-be-combined images by comparing output values of the corresponding pixels between the to-be-combined images, which are sources for generation of the combined images;
- and
- comparing the pixel value difference between the to-be-combined images with a predetermined second threshold value and determining a pixel area, of which the pixel value difference between to-be-combined images is less than the second threshold value, not to be the motion area with respect to the corresponding pixels of the motion area detected by the motion area detection unit.