Patent ID: 8073236

Claim:
A method for detecting blemishes on an image sensor package, comprising: initializing a suspected blemish standard mean value range and a blemish standard deviation value; capturing an image produced by the image sensor package and acquiring brightness values of each of pixels of the image; calculating differences of the brightness values of a selected pixel and selected other pixels surrounding the pixel and a mean value of the differences; judging if the mean value is inside the suspected blemish standard mean value range; marking the pixel as suspected blemish if the mean value is inside the suspected blemish standard mean value range; calculating a standard deviation of brightness values of the suspected blemish and selected other pixels surrounding the suspected blemish; judging if the standard deviation is larger than the blemish standard deviation value; and marking the suspected blemish as a blemish if the standard deviation is larger than the blemish standard deviation value; wherein initializing the suspected blemish standard mean value range comprises; providing a light source which emits uniform white light; providing a standard image sensor package; capturing an image of the light source produced by the standard image sensor package and acquiring brightness values of each of pixels of the image; calculating differences of a selected pixel and selected other pixels surrounding the pixel; calculating a mean value of the differences; and adding a lower and an upper limit for the mean value to acquire the suspected blemish standard mean value range.