An image sensor may have a certain number of defective or bad pixels, which are due to manufacturing faults or operation conditions. These pixels respond to light exposure differently than surrounding pixels and therefore may produce undesirable results in the final image.