To provide an image indicating a subject's image by detecting lights and radiations including information of the subject's image by a detector, specify a defective area on the image corresponding to a defective portion of the detector and, when correcting pixel values of a plurality of defective pixels constituting the defective area, correct them in such a manner as becoming natural shading.
A plurality of weighted normal pixel values are provided by weighting the pixel value of a normal pixel N by a weighting coefficient, which gets smaller as a distance L between a defective pixel Qt of a correction object and the normal pixel becomes larger, for every combination of the defective pixel Qt of the correction object and each normal pixel N adjacent to the surroundings of the defective area Bt. A mean value of the plurality of weighted normal pixel values is calculated and the pixel value of the defective pixel Qt of the correction object is corrected using the calculated mean value. The process is performed on respective defective pixels.
Go Sakuma