1. An image processing apparatus comprising: a plurality of normalized weighting functions for calculating weight values based on difference values between a pixel value of a pixel position in an image data and pixel values of pixels of a peripheral region of the pixel position; a unit that calculates the total sum of weights of all the pixels in the peripheral region, for the plurality of normalized weighting functions; a unit that selects one of the normalized weighting functions on the basis of the total sum of the weight values; and a unit that calculates expectation values of the pixel values in the peripheral region based on weight values calculated for the pixels in the peripheral region and also based on the selected normalized weighting function, wherein the expectation values are made to be the calculation results of the pixel position, and wherein the unit that calculates the total sum of weights of all the pixels in the peripheral region, the unit that selects the one of the normalized weighting functions, and the unit that calculates the expectation values of the pixel values in the peripheral region are each implemented via at least one processor.