If we compute the average of many photographs from the same camera instance, the average image should be smoothly varying. This is the prior that we use. Bad pixels -- pixels that behave differently from their neighbors -- would stand out in the average image and so can be easily identified.
(a) Contrast enhanced luminance of the average of 1,186 photographs from a particular Canon S1IS camera. (b) Zoomed in portions of the image in (a) in which we can clearly see bad pixels. (c) A comparative study of the number of bad detector pixels in a particular camera instance for three different camera models.