1. An image processing apparatus comprising: an image input unit configured to input a plurality of images, each of which corresponds to a different viewpoint, obtained by capturing the images from a plurality of viewpoints; an image generation unit configured to composite the plurality of images to generate a synthetic image with a curved focus surface of the synthetic image, wherein the curved focus surface is set based on focus coordinates of the plurality of images in a three-dimensional space; an acquisition unit configured to acquire focus coordinates representing a plurality of positions to be in focus in the synthetic image; and a surface generation unit configured to generate information representing the curved focus surface from a distance to an object and the acquired focus coordinates, wherein a curvature of the curved focus surface is determined in accordance with a number of the acquired focus coordinates, wherein the image generation unit is configured to composite the plurality of images based on the information representing the curved focus surface, and wherein the image generation unit is implemented using a processor.