1. An image processing apparatus comprising: a memory; a processor coupled to the memory which executes the following: identifying a main subject region and a background region different from the main subject region with respect to a plurality of images captured by an image capturing unit; aligning the main subject regions of the plurality of images and to generate a composite image in which predetermined blur processing is applied to the background region; detecting an amount of movement of the background region between the plurality of images; controlling an amount of blurring in the blur processing based on the amount of movement of the background region between the plurality of images detected; and generating a first composite image into which the plurality of images aligned with reference to the main subject region are combined and a second composite image to which blur processing to blur the background region of the first composite image is applied, and combines the first composite image and the second composite image based on the main subject region.