1. An image processing apparatus comprising: a processor; and a memory including instructions that, when executed by the processor, cause the processor to: obtain depth information according to subject distances subjects its an image captured by an image capture unit; select a plurality of subject distances based on peaks in a frequency distribution of the depth information; and control the image capture unit to capture a plurality of images whose focus distances correspond to the plurality of selected subject distances, respectively; wherein the frequency distribution of the depth information is based on a range image generated from a pair of captured images constituting stereoscopic images, and wherein the image capture unit comprises; an image sensor in which a plurality of pixels each having a plurality of photoelectric conversion areas are arranged, and that is capable of outputting the pair of captured images.