NikonGear'23

Gear Talk => What the Nerds Do => Topic started by: Bernard Delley on April 10, 2023, 17:40:54

Title: Hot Pixel Suppression (HPS) in the D850
Post by: Bernard Delley on April 10, 2023, 17:40:54
another salvaged thread from DPReview:
Hot pixels are damaged sensor pixels which result in very bright  image pixels that do not correspond to imaged objects. Such damage is known to happen by cosmic rays. It cannot be avoided in practice. The sensor may have tens of such hot pixels, which usually go unnoticed in most photographic work.

The HPS schemes try as

Step 1)  to identify such false data in the image  from a hot pixel  on the fly.  And in

Step 2) substitute a non-objectionable  value for the hot pixel to repair the damaged image.

HPS schemes have been criticised for being to aggressive in removing valid image data and because the substitute data implied image damage: for example, rather than false stars from the hot pixels, the corrected image had missing stars.

Analyzing black frame images confirms that in the D850 HPS is active for exposure times greater or equal to 1/4s . The HPS scheme is also active in the D850 for ISO 6400 and up. It cannot be turned off by the user. "Long exposure NR" is off for the analysis below.

Analyzing the black frame data in detail, a very clever hot pixel recognition criterion emerges for Step 1)  in the D850:

D_threshold = parameter1 * D_max_24  + parameter2

I define the net digital pixel value D_ = DN - D_black  with the read out raw digital raw number DN before correction by the black level D_black

If the actual D_ of the center pixel exceed the D_threshold value, it is declared as hot pixel. D_max_24 is the maximum occurring on any of the other 24 other pixels in the 5x5 patch surrounding the pixel being examined.  Analysis for D850 black frame shows without exception that parameter1 =2 and parameter2=400,  (and D_black=400).

The value of parameter1 makes a lot of sense. It implies that a lens producing such an unreasonably sharp image would exceed MTF50 > 100lp/mm. No such lens is expected to be in use for D850. None may ever  be available for covering FX .

The value of parameter2 also makes a lot of sense. It implies that the read noise should not trigger a false hot pixel identification. A similar argument goes for D_black. The value of parameter2 can be gleaned from the black frame data at higher ISO where false hits appear. Nikon engineers chose to turn the HPS on for higher ISO values than this: from ISO 6400 HPS is always on for the D850.

Because of the particular parameter values, it is very possible that the threshold criterion is actually implemented as

DN_threshold = 2 * DN_max_24

I have not yet gleaned the precise scheme for Step 2) .  The substituted value at the hot pixel appears always to fall between DN_max_24 and 2 * DN_max_24 .  This is a moderately bright pixel value, in reasonable relation with neighbor pixel values.  It is a very acceptable guess of the noise or image brightness that should have appeared at the hot pixel site with a real lens.

graph 1: HPS is ON. A few pixels have a value just 1 below the threshold values for HPS . (it is on also for ISO greater than 5080)
graph 2: HPS is OFF till 1/5 s exposure and of up to ISO 5080. Without HPS there are lots of pixel values above the HPS threshold: plotted bold.
Title: Re: Hot Pixel Suppression (HPS) in the D850
Post by: Bernard Delley on April 10, 2023, 17:47:07
Executive summary: If a recurring false bright spot bothers you in your images, then activate "Clean sensor now" once and its gone for good.

Detailed comments:

Hot pixels are defects that produce false very high pixel values. This is not very difficult to detect in dark patches of higher ISO images. Sometimes such pixels are misnamed as dead or stuck pixels, which is misleading. A hot pixel produces high pixel values, typically a different value in each image. The name is inspired by its acting as if it were running sick hot. It is sick, but not literally hot.

Since the hot pixels are quasi permanent and 'easy' to detect, they can be registered and treated. The camera manual does not say so, but the function 'Clean image sensor now' also does this hot pixel mapping along side with the sensor vibrating dust cleaning.

The treatment (step 2) in this case consists in substituting a median or average value determined from the neighborhood of the hot pixel from then on. This makes the hot pixel practically non-detectable.

The effect of remapping can be illustrated by the graphs below:  'number of pixels with value up to a D_ value (= complementary cumulative distribution histogram)  plotted versus that raw number D_ .

graph 1: D850 ISO 1600 1/4 s black frame DSC_3433.NEF , before "Clean sensor now" , after one year of not doing this.
graph 2:  D850 ISO 1600 1/4s black frame DSC_3434.NEF taken after after "Clean sensor now"
Title: Re: Hot Pixel Suppression (HPS) in the D850
Post by: Erik Lund on April 11, 2023, 13:14:30
Executive summary: If a recurring false bright spot bothers you in your images, then activate "Clean sensor now" once and its gone for good.

Always very nice with a short version when dealing with complex issues ;) Thank you!
Title: Re: Hot Pixel Suppression (HPS) in the D850
Post by: Thomas Stellwag on April 11, 2023, 14:37:40
Bernard, thanks for your explanations - didnĀ“t know that sensor cleaning as well means "sensor healing"