Patent attributes
An image processing method correcting a defective portion in color image data having a plurality of color components. The method includes the steps of adjusting luminance of each defective pixel; selecting a plurality of normal pixels from around a target pixel which is selected from a plurality of defective pixels; obtaining for each color component, a difference between a pixel value of the target pixel whose luminance has been adjusted by the luminance adjusting unit and a corresponding pixel value of each normal pixel selected; obtaining a minimum value of the differences for the respective color components of each normal pixel, thereby to obtain a weight coefficient common to the respective color components for each normal pixel, the smaller the minimum value, the greater a weight being provided by the coefficient; calculating a weighted average value for each color component of the plurality of normal pixels by using the weight coefficient; and correcting the target pixel by using the weighted average value for each color component.