1. An image processing apparatus for determining a pixel value of a target pixel by a weighted mean of a plurality of reference pixels in image data, comprising: a derivation unit configured to derive a weight for each of the reference pixels, based on similarity between a target region associated with the target pixel and a reference region associated with the reference pixels; and a weighted mean processing unit configured to perform weighted mean processing based on pixel values of the plurality of reference pixels and the weights corresponding to the reference pixels, respectively, derived by the derivation unit, wherein the weighted mean processing unit performs the weighted mean processing by using a pixel other than the target pixel as the reference pixel.