1. An image processing device comprising: a weight determination unit configured to obtain a plurality of pieces of image data photographed at multiple viewpoints and to determine a weight of each of the plurality of pieces of image data for synthesizing the plurality of pieces of image data; and a generation unit configured to generate, by synthesizing the plurality of pieces of image data according to the weight determined by the weight determination unit, synthesized image data focused at a focus position different from focus positions of the plurality of pieces of image data, wherein the weight determination unit determines the weight so that an aliasing element included in frequency characteristics of the plurality of pieces of image data is reduced in the synthesized image data.