How can I easily tell if a cellphone sensor or lens is damaged?
wipe the lens and take some pictures closeup and far away and see how they look.
To check of the plastic lens parts are warped by heat, take an image of a checker board and see if the warp is smooth pincussion or barrel .
Sensor damage is easy to see by just snapping images.
For minor defects, Take an image of a clear sky or white wall and check the smoothness.
If you have focused on the Sun or on a spotlight for long, you will end up sensor pixels burnt out. This is easy to test. Make these two photos:
- Put a paper tissue in front of the lens (working as a light diffuser) and make a photo in a well lit room. You should have a homogenous light gray image.
- Cover the sensor well, so it sees complete darkness. Make another photo. This should be a black image, with some thermal noise.
Now, do the following for each image:
- Take the image to Photoshop,
- create another layer,
- pick the light gray or black color value,
- fill the new layer,
- do a Substract operation on the new layer.
- Then if you do threshold, and if you see values above e.g. 10 or below -10 or so, you have a burnt pixel. (You will see some distribution, as the light gray may be a bit not homogenous, and the black image will have noise, so that is why you need thresholding. The offending pixels will be way off (e.g. showing up as red pixels in the black image - been there, seen that).
It is easy to find those ones:
- after thresholding, you basically end up with some single pixels not matching the rest of the image. Make a copy of this image layer, and now
- do a Gaussian blur of e.g. 20 pixel - this creates a 20 pixel circle around the failing pixels
- do another Threshold. The circles will be well visible now.
- Find their centers
- Those are the failing pixels. Check them carefully. If they are not false positive, they are the actual failing pixels.
The lens itself will not be damaged from extended exposure to sun. The glue there will not necessarily like extended UV exposure, and increased heat, but if it seems to work, focuses, etc. then it works.