1. An image processing apparatus comprising: an obtaining unit configured to obtain a first image, a second image, and a third image, the first image being an image captured with focus set at a first distance, the second image being an image captured with focus set at a second distance different from the first distance, the third image being an image captured using an f-number larger than an f-number used in capturing of the first image and the second image; and an arranging unit configured to arrange at least a part of the first image and at least a part of the second image at a position based on the third image.