Patent ID: 8253688

Claim:
A method for modifying illumination sources for an input device, the method comprising: activating a first illumination source to illuminate a surface external to the input device with light emitted from the first illumination source; detecting a first illumination level from the first illumination source; comparing the first illumination level to a first threshold value; when the first illumination level exceeds the first threshold value, using the first illumination source for the input device; and otherwise, when the first illumination level is less than the first threshold value: detecting a contrast level from the first illumination source; comparing the contrast level to a second threshold value calculated as an averaged value of a plurality of autocorrelation values for only non-edge pixels obtained from a captured image of the surface external to the input device; when the contrast level is less than the second threshold value, using a second illumination source for the input device; and otherwise, when the contrast level is greater than the second threshold value, using the first illumination source for the input device.