1. An image processing filter configured to correct a pixel value of an image, comprising: a flatness calculation unit configured to calculate a flatness of distribution of pixel values of surrounding pixels positioned on a periphery of a target pixel to be filtered, and a pixel value composition unit configured to blend the pixel value of the target pixel and a representative pixel value of the surrounding pixels, based on a blend ratio having a positive correlation with the flatness calculated by the flatness calculation unit, so that a first rate is larger as the flatness is smaller, where the first rate is the rate of the value corresponding to the pixel value of a plurality of surrounding pixels positioned on the periphery of the target pixel, and to generate a composite pixel value by combining the pixel value of the target pixel and the representative pixel value of the surrounding pixels.