A non-transitory computer-readable medium including computer program instructions, which when executed by an image processing apparatus, cause the image processing apparatus to perform a method for correcting hand shake blur occurring at a time of capturing a moving image, the method comprising:
- setting a specific image among a plurality of images constituting the moving image as a reference image serving as a reference of a hand shake blur correction process;
- generating, by setting the remaining images as correction target images to be subjected to the hand shake blur correction process, a correction amount by which position displacement of a correction target image relative to the reference image is to be corrected;
- estimating a hand shake blur area representing an area where hand shake blur relative to the reference image has occurred, on the basis of the generated correction amount;
- detecting an intentional picture composition changing operation at the time of capturing the correction target image, on the basis of the generated correction amount;
- and
- updating a set correction area to an area where hand shake blur in the correction target image relative to the reference image is to be corrected on the basis of the estimated hand shake blur area and a result of the detection, wherein
- the correction target images follow the reference image in an order in which the images were captured, and
- in a case where at least one of a horizontal component and a vertical component of a correction amount for a first correction target image is greater than a corresponding component of a correction amount for a second correction target image following the first correction target image, the estimating includes estimating the hand shake blur area on the basis of the correction amount for the first correction target image.