>moria.de >Image sensors: Bad pixel detection

Image sensors: Bad pixel detection

There is much to read on bad pixels, categorizing the individual faults and naming them. But various simple minded attempts to detect them are subject to missing some kinds of pixel defects or even identify false positives due to interactions with cosmic particles. So what works reliably?

Static faults

A simple answer lies in the question: What's bad? Usually a pixel is assumed to work rather linear:

$$\text"pixel" = \text"gain" ยท \text"photons" + \text"blacklevel"$$

It is obvious to call a pixel bad if it shows a significant deviation in either gain or blacklevel that cannot or should not be compensated using dark frames or flat frames. There is a tradeoff between SNR and loss of information, because few pixels are entirely broken.

Determining this requires averaged images of an exposure series over the intended exposure time range to get rid of photon noise and energetic particle interactions. Should pixels have a bad dark current and you only ever use short exposures, they can still work fine for that. The sensor should be illuminated with diffuse light for not confusing dust with bad pixels. That means the images taken for noise analysis are perfect to find bad pixels as well, given that the intended exposure range is met.

For each pixel a linear regression of brightness over exposure time determines gain and blacklevel. The difference between the regression result for the pixel and the sensor average for the sensor is divided by the sensor standard deviation and that is used as score.

This diagram shows how the slopes and offsets of the pixel photoresponse for my QHY5 compatible camera deviate from the average photoresponse. There are only a few really broken pixels, all of them more bright than the average, but a fair number that works worse than average. The sensor is fairly old by now, so it is not sure if it was manufactured like that or degraded by age.

Diagram

Dark frames and flat frames can compensate some deviation. In the end it is up to the user to decide where to stop compensation and drop pixel data, e.g. if a pixel differs by 5 or more standard deviations.

Dynamic faults

The read out noise of a pixel is often treated as gaussian and overall constant. The enlightening paper Random Telegraph Signal in CMOS Image Sensor Pixels shows there are some pixels that have a significantly higher noise than others. For this investigation, 400 images were taken with the firmware limited minimum exposure of 1 ms, an increased offset to make sure nothing is cut off, and a cap on the camera. This is the diagram at gain 1:

Diagram

As expected, the peak agrees with the average readout noise, but there are pixels that exceed it by twice the noise. At over 30 ke-, 40 e- are not that much really. Things get way more interesting at larger gain factors. This is gain 8.0:

Diagram

Using more gain improves the read out noise peak some, but the maximum value does not change much, as expected for pixel flaws. That is acknowledged by the worst pixel positions not changing. This diagram shows histograms of the actual pixel values for certain standard deviation values (ignore the differing pixel offset values):

Diagram

Clearly, the worst pixels shows not only a higher standard deviation, but random telegraph noise with three peaks. A solution could be dithering (taking multiple images with a slight sensor displacement) and excluding the most noisy pixels like static bad pixels to improve the SNR. While the global SNR is not influenced significantly, the local SNR may be quite bad in faint spots, and in particular much worse than anticipated from the photon noise. That is both visually not pleasing and not great for photometry.

I have not yet come up with a satisfying way to characterize this property for comparison. This is an attempt by showing the percentage of pixels exceeding a given standard deviation.

Diagram