1. An image generation method for generating an output image from an input image acquired by an image sensor that has an array of a plurality of pixels, each of which has arranged therein a plurality of sub-pixels that each receive a light beam that passes through a different pupil sub-area of an imaging optical system, the method comprising: a step of generating a plurality of parallax images that respectively correspond to the different pupil sub-areas based on the input image; a step of generating a plurality of pixel shifted images by performing different shifting for each of the plurality of parallax images according to a virtual image forming plane of the imaging optical system that is different from an image sensing plane at which the image sensor is arranged; and a step of generating an output image that has a higher resolution than the resolution of the parallax images from the plurality of pixel shifted images through composition processing.