A system and method is provided for processing a digital image. The system
and method processes image data by replacing bad pixel data in the
digital image. Specifically, the system and method replaces bad pixel
data in the image data by comparing each pixel to selected neighboring
pixels, including pixels of other colors in some cases, and determining
if the pixel is likely corrupt, such as from a detective pixel. Corrupted
pixels are then replaced using averages, means, maximums, or other
statistical functions of select nearby pixels.