1. An image processing apparatus comprising: characteristic value calculation means for calculating a block luminance average value, which is an average value of luminance values in each of spatial blocks obtained by dividing an input image in a space direction, and a block luminance dispersion, which is a dispersion of the luminance values in each of the spatial blocks; edge-preserving smoothing means for calculating a general luminance value of pixels of the input image by setting a value obtained by approximately calculating a weighted average value of the luminance values of a noticed block which is the spatial block to which noticed pixels of the input image belong, on the assumption that a distribution of the luminance values of each of the spatial blocks conforms to a Gaussian distribution based on the block luminance average value and the block luminance dispersion of each of the spatial blocks, as the general luminance value of the noticed pixels, the weighted average value being calculated using a weight function, in which a weight of the luminance values increases as the luminance values are closer to the luminance values of the noticed pixels; tone curve calculation means for calculating a shape of a tone curve for each of the pixels of the input image based on the general luminance value of the pixels of the input image; and luminance value gray-scale correction means for correcting a gray scale of the luminance values of each of the pixels of the input image using the tone curve for each of the pixels of the input image.