1. An image processing apparatus that generates composite image data using multi-viewpoint image data obtained by capturing images from a plurality of viewpoints, the device comprising: a filter processing unit configured to perform filter processing on the multi-viewpoint image data based on distance information indicative of a distance to a subject; and a generation unit configured to generate composite image data by combining the multi-viewpoint image data on which the filter processing has been performed.