Luminance of defective pixels is adjusted. A target pixel is selected from
the plurality of defective pixels. A normal pixel is searched and
detected on each of opposed sides across the target pixel along each of a
plurality of search lines extending through the target pixel. There are
calculated a first pixel value ratio which is a ratio between a pixel
value of one normal pixel located on one side across the target pixel and
a pixel value of a further normal pixel located on the other side across
the target pixel, a second pixel value ratio which is a ratio between the
pixel value of said one normal pixel and a pixel value of the target
pixel after the luminance adjustment thereof, and a third pixel value
ratio which is a ratio between the pixel value of the further normal
pixel and the pixel value of said target pixel after the luminance
adjustment thereof. A weight coefficient for each search line is
calculated, based on the first, second and third pixel value ratios. An
interpolation value for the target pixel is calculated for each search
line. Then, a correction value for the target pixel is calculated, based
on the weight coefficient for each search line and the interpolation
value for the target pixel, and the target pixel is corrected based on
the correction value.