1. An image pickup apparatus, comprising: a focus bracketing device which shoots images successively by discretely moving a focus position by a predetermined amount of movement and thereby obtains a plurality of images; a corresponding point detecting device which detects corresponding points on subjects among the plurality of images shot by the focus bracketing device; an image transformation device which transforms the plurality of images excluding one reference image so that positions of the corresponding points will coincide between the reference image and the plurality of images excluding the reference image, the reference image being selected from the plurality of images based on a predetermined criterion; an image compositing device which composites a plurality of images including the transformed images; and a recording device which records an image obtained by the image compositing device on a recording medium.