A non-transitory computer-readable storage medium configured to store a computer program that enables a computer to execute image processing,
- wherein the image processing includes the steps of:
- acquiring a plurality of images;
- analyze header information of the plurality of images to acquire image pickup condition information of each of the plurality of images;
- acquiring an optical transfer function on the basis of the image pickup condition information;
- generating an image restoration filter from the optical transfer function on the basis of the image pickup condition information so as to correct the plurality of images using the image restoration filter;
- and
- separating the plurality of images into a plurality of groups based on the image pickup condition information to correct images included in each group using a same image restoration filter with respect to each group.