1. A method for detecting a bad photosensor in an image capturing device, comprising: identifying a first photosensor in a grid of photosensors and obtaining its associated first pixel value; identifying a first plurality of photosensors surrounding the first photosensor and obtaining pixel values associated with the first plurality of photosensors, the first plurality of photosensors having the same color sensitivity as the first photosensor; subtracting the first pixel value from the first plurality of photosensor pixel values to obtain a first set of pixel value differences; classifying each of the differences in the first set of pixel value differences based on their individual magnitude and sign to generate a first string pattern; and comparing the first string pattern to one or more predefined string patterns indicative of a bad photosensor.