In-camera processing of long-exposure RAW data

Started Jan 21, 2010 | Discussions
rhlpetrus Forum Pro • Posts: 25,962
Video HP?

Vahur Krouverk wrote:

I wonder whether this changed HPS algorithm is cause for Nikon's firmware fix announcement and with next D7000 firmware "old" algorithm will be used again?

http://nikoneurope-en.custhelp.com/app/answers/detail/a_id/48160/p/19,824,881/c/241/r_id/150284

"We have received reports from some users of the Nikon D7000 digital SLR camera regarding the occurrence of noticeable bright spots with movie recording under certain conditions.

Nikon believes that these bright spots are not normally noticeable, and therefore do not indicate a problem with practical use. However, with further investigation of the reports received, we have confirmed that bright spots may be noticeable when recording movies of especially dark scenes or subjects.

In order to provide our customers with better products, Nikon is currently preparing to release a firmware upgrade with measures to reduce the occurrence of these bright spots for the D7000. Further details will be announced at a later date. "

It looks related to video recording, something not related directly to HPS, if I'm not wrong.

-- hide signature --

Renato.
http://www.flickr.com/photos/rhlpedrosa/
OnExposure member
http://www.onexposure.net/

Good shooting and good luck
(after Ed Murrow)

 rhlpetrus's gear list:rhlpetrus's gear list
Leica D-Lux (Typ 109) Nikon D7000 Nikon 1 V1 Nikon AF-S DX Nikkor 12-24mm f/4G ED-IF Nikon AF Nikkor 35mm f/2D +4 more
cluna Senior Member • Posts: 1,403
Re: Green is not a special case

.....

cluna Senior Member • Posts: 1,403
Re: Green is not a special case

cluna wrote:

Marianne Oelund wrote:

cluna wrote:

Changing the sample value of Red and Blue channels affects 8 pixels, whereas green only 4

There are two independent green channels, and each is treated exactly as the red and blue channels are. Re-read the array descriptions in my original post.

Why treat i as two though in the processing? G1 and G2 are direct measurements, why make G2's output a function of G1? Is there a presumption that G1 being hot will affect the sensitivity of G2? Or that the processing is done after a read of a discrete channel? Something like :

G1=> processing=> buffer
G2=> processing=> buffer
B => processing=> buffer
R => processing=> buffer

Then integrate G1,G2,B,R into a serialized raw??

Make more sense to treat

[G1] [? ][G1]
[? ] [G2][? ]
[G1] [? ][G1]

as just:

[G][? ][G]
[? ][G][? ]
[G][? ][G]

-C

So how do you see this now per the D7000

....Opps, meant to quote this one.

-C

RBarbera Regular Member • Posts: 197
Re: Comparison example: D7000 versus old HPS algorithm

Thank you for all this work!. It's really very interesting to take a look at the fine detail of Nikon HPS algorithms.

-- hide signature --

Saludos,
Rafa Barberá

chn_andy Junior Member • Posts: 47
Re: Mode 3 and firmware versions

Marianne Oelund wrote:

Ravncat wrote:

I've not yet installed the new firmware onto my d700, should I hold off ? Or is mode 3 also killed with the new d700 firmware update?

Mode 3 was removed from the D3 at firmware ver. 2.01, from Dec. 2008; it was available through firmware ver. 2.00. This probably implies that D700 ver. 1.01 also lacks Mode 3, although its original ver. 1.00 firmware may have had it.

You should do a test to check your current firmware: Take a long-exposure black frame (lens cap on) without using long-exp. NR, then repeat using the Mode 3 method (LE NR on, but interrupt power when "JOB NR" appears on the upper LCD). If they look essentially the same, there is no Mode 3, but if the Mode 3 image has many more hot pixels - especially single ones rather than pairs - then Mode 3 works.

(aside, though im not sure i've ever been able to get into mode 3 without introducing vibration from turning it off anyway)

That actually doesn't matter, since you are moving the power switch while the camera is taking the black frame - not the image you want to keep.

So does this message means any Nikon DSLR firmware since Dec 2008 would lack a Mode 3 Workaround. Currently my D200 with latest firmware has a perfect usable mode 3, which I used every time in astrophotography.

I guess we need to collect a set of firmware with mode 3 to downgrade when necessary. And I'm going to test out my friend's D700 to see if it has a mode 3.

I remember there were astrophotographers using Nikon complaining about this HPS and raise it to Nikon Service. Ironically, Nikon simply hate us and took out mode 3. This was really bad news.

 chn_andy's gear list:chn_andy's gear list
Nikon D200 Nikon D7000 Nikon AF-S DX Nikkor 18-105mm F3.5-5.6G ED VR Nikon AF Nikkor 50mm f/1.8D Nikon AF Nikkor 180mm f/2.8D ED-IF +1 more
Bernard Delley Senior Member • Posts: 1,334
D7000 uses Moon Maid's HPS algorithm

My D7000 came in last week, and I was curious amongst other things about
hot pixels. Short summary: has NO hot pixels in raw images!

I skimmed the brightest pixels, recording coordinates and values:
Short summary, for exposures of 1/4 sec or longer pairs of "bright" pixels
are found with equal value. This is indicative of a HPS capping (decapitation)
algorithm at work.

D7000
RAW 14 bit lossless compressed
Long exp NR off
High ISO NR off
--------------------------------------
ISO : 100
Exposure Time : 1/4
selection from threshold 8
pixel coordinates, Bayer subset, DN raw number.
928 89 # g3 8
968 89 # g3 10
3071 102 # g2 12
3071 103 # b4 12
2398 202 # r1 10
2398 203 # g3 10
364 598 # r1 9
365 599 # b4 9
667 661 # b4 8
665 663 # b4 8
52 820 # r1 8
54 820 # r1 8
3879 954 # g2 8
3881 956 # g2 8
3226 1268 # r1 8
3224 1270 # r1 8
3135 1409 # b4 8
3137 1409 # b4 8
3968 1580 # r1 8
3968 1582 # r1 8
2228 1712 # r1 8
2229 1713 # b4 8
927 1886 # g2 8
928 1886 # r1 8
683 2023 # b4 8
684 2024 # r1 8
3183 2156 # g2 8
3185 2158 # g2 8
2101 2273 # b4 8
2101 2275 # b4 8
3820 3212 # r1 9
3820 3213 # g3 9
3563 3253 # b4 10
3564 3254 # r1 10
--------------------------------------
ISO : 100
Exposure Time : 1/5
all from threshold 19
1867 538 # g2 23
1179 655 # b4 21
2523 754 # g2 19
3195 906 # g2 23
3693 956 # g2 19
948 1167 # g3 21
1939 1249 # b4 27
4292 1383 # g3 21
2993 1929 # b4 21
4363 2068 # g2 20
4353 2566 # g2 20
1126 3178 # r1 22
3367 3193 # b4 21
--------------------------------------
ISO : 6400
Exposure Time : 1/4
selection from threshold 456
503 50 # g2 512
501 52 # g2 512
3082 90 # r1 888
3082 91 # g3 888
3217 200 # g2 552
3217 201 # b4 552
2636 238 # r1 512
2637 238 # g2 512
1288 269 # g3 516
1290 271 # g3 516
184 271 # g3 504
185 271 # b4 504
3083 574 # g2 476
3084 574 # r1 476
656 789 # g3 540
656 790 # r1 540
1210 794 # r1 456
1212 796 # r1 456
2479 2294 # g2 516
2477 2296 # g2 516
327 2619 # b4 524
327 2621 # b4 524
785 2623 # b4 492
786 2624 # r1 492
--------------------------------------
ISO : 6400
Exposure Time : 1/5
all from threshold 1313
3081 347 # b4 1480
290 420 # r1 1360
1179 655 # b4 1432
3195 906 # g2 1956
776 1040 # r1 1320
1939 1249 # b4 1640
4292 1383 # g3 1448
2828 1672 # r1 1392
3531 1724 # g2 1404
4773 1806 # g2 1440
1132 1905 # g3 1360
2993 1929 # b4 1576
2402 2018 # r1 1680
3730 2464 # r1 1448
1020 3084 # r1 1340
1126 3178 # r1 1508
963 3262 # g2 1428
--------------------------------------

for 1/4 sec or longer all examples obey Oelund's formula, no exception was seen
in my more complete data set. Curiously the capped pairs r1g3 and g2b4
are clearly more abundant than the other possible ones.

For exposure time 1/5 sec and shorter HPS is not active.
"Mode 3" does not work to trick out the HPS

Even at ISO 6400 30 sec the 'hottest' pair of pixels, showing up with some consistency, is only about 25% full scale.

Brighter pairs of pixels are occasionally seen once and never again. This could be
a detection of a cosmic ray.

Bernard Delley Senior Member • Posts: 1,334
oops

in the previous post, I accidentally put the hopefully interesting detail
as signature. So it seems to be hidden by default

OP Marianne Oelund Veteran Member • Posts: 7,779
HPS threshold-speed change?

Bernard Delley wrote:

My D7000 came in last week, and I was curious amongst other things about
hot pixels. Short summary: has NO hot pixels in raw images!

I skimmed the brightest pixels, recording coordinates and values:
Short summary, for exposures of 1/4 sec or longer pairs of "bright" pixels
are found with equal value. This is indicative of a HPS capping (decapitation)
algorithm at work.

That was a lot of data collection effort, Bernard! You could possibly have spared yourself the work, if you had seen my Nov. 30th post which follows.

The new D7000 HPS algorithm isn't quite the Moon Maid algorithm, though. In the presentation material for Nikon that I gave to Thom, I tried to emphasize the importance of including a headroom factor, but apparently Nikon didn't think it was necessary - or perhaps it wasn't straightforward enough to implement.

Are you sure about HPS activating at 1/4-sec. shutter speed? My D7000 (at original firmware version) doesn't use HPS until exposure time reaches 1 sec., which is the same threshold as the D3x.

Bernard Delley Senior Member • Posts: 1,334
Re: HPS threshold-speed change?

The new D7000 HPS algorithm isn't quite the Moon Maid algorithm, though. In the presentation material for Nikon that I gave to Thom, I tried to emphasize the importance of including a headroom factor, but apparently Nikon didn't think it was necessary - or perhaps it wasn't straightforward enough to implement.

Are you sure about HPS activating at 1/4-sec. shutter speed? My D7000 (at original firmware version) doesn't use HPS until exposure time reaches 1 sec., which is the same threshold as the D3x.

I missed seeing the headroom part of the algorithm in your posts. -- Maybe Nikon wants the more aggressive straight clip for general noise reduction. I strongly feel that Nikon should make it a user controlled option something like 'Long exp Noise Clipping'.

My D7000 (6073683) says firmware A 1.01 B 1.01 L 1.002.
from 1/4 sec on it does clipping, and it cannot be intercepted in "mode 3"
(Long exp NR on , time 10s up, power off during 'job nr' blinking)

Below is other evidence that a set of 16 is used in clipping. For the full set (-border 3) of 16 M pixels I (my little program) checked if a pixel value is topped in its neighborhood, if yes disregard, else if it is solitary increase count at center of matrix. If there is an equal value increase the count at the corresponding relative position in the matrix. The result for 1/4 s shows 0 at center (its never top alone) and the pattern shows the 16 sites used for clipping (+ some accidentally equals at the other sites).

A riddle about the sensor properties shows up in the numbers below:

Why are the two top value pixels particularly frequently vertical neighbors in the Bayer square rg/gb ? This little mystery also shows up in the frequency of accidental equals at 1/5 sec.

dsc_0310.nef evidence that clipping was active: 0 solitary top values
ISO2 : 6400
Exposure Time : 1/4
threshold for analysis 180 :
counts for top equaled in neighborhood
counts for solitary top value at center
r1
1 0 2 2 2 1 4
0 156 4 173 2 169 2
4 4 179 98 198 5 1
2 168 133 0 126 168 2
3 4 165 1046 179 1 3
1 172 3 176 2 156 0
0 4 1 0 3 4 1
g2
1 1 1 3 0 0 0
0 92 2 94 3 68 1
1 5 56 146 86 1 0
2 104 126 0 133 104 2
0 3 91 1162 76 5 0
2 71 2 94 5 92 0
1 2 4 2 1 3 1
g3
1 4 1 0 4 4 1
1 68 4 55 4 67 0
0 1 75 1040 92 4 0
2 63 106 0 80 63 1
0 5 86 99 56 4 1
0 68 2 56 2 68 2
0 1 0 2 1 0 1
b4
1 3 3 2 1 2 0
2 180 2 202 2 190 0
3 5 179 1159 163 3 3
1 181 80 0 106 179 2
1 1 198 146 180 5 4
0 192 4 202 4 181 1
4 0 2 3 2 1 1

dsc_0311.nef evidence of no clipping: lots of solitary top values
ISO2 : 6400
Exposure Time : 1/5
threshold for analysis 200
counts for top equaled in neighborhood
counts for solitary top value at center
r1
1 1 3 3 5 2 4
2 3 4 4 2 3 2
6 1 8 1 3 0 8
1 5 2 15260 0 5 0
4 2 0 37 3 4 8
3 3 2 4 2 3 3
7 2 2 3 4 1 5
g2
6 4 2 3 4 2 2
3 0 3 1 2 2 3
0 4 3 3 0 1 1
0 1 0 12036 2 2 1
4 1 2 28 2 3 2
2 2 2 1 3 0 1
0 3 2 3 1 5 3
g3
3 1 1 3 2 2 0
5 1 2 3 2 0 3
3 4 2 37 3 2 2
5 0 1 9932 5 0 2
1 0 0 1 3 1 0
5 0 4 3 4 0 1
2 2 4 3 2 3 5
b4
5 3 3 3 2 2 7
1 11 5 3 4 4 2
6 3 2 28 0 1 3
2 3 4 16307 1 3 5
8 2 3 3 6 4 6
3 4 2 3 2 12 5
4 1 5 3 3 3 1

OP Marianne Oelund Veteran Member • Posts: 7,779
Interesting presentation

Bernard Delley wrote:

I missed seeing the headroom part of the algorithm in your posts.

I didn't disclose alll of the features in my posts; some details were reserved for Nikon only.

-- hide signature --

Maybe Nikon wants the more aggressive straight clip for general noise reduction.

I certainly hope that was not their intent - NR applied to raw data is the last thing we want.

I strongly feel that Nikon should make it a user controlled option something like 'Long exp Noise Clipping'.

You're in good company. Unfortunately, it isn't strong enough company to sway Nikon's decisions - yet.

My D7000 (6073683) says firmware A 1.01 B 1.01 L 1.002.
from 1/4 sec on it does clipping, and it cannot be intercepted in "mode 3"
(Long exp NR on , time 10s up, power off during 'job nr' blinking)

Firmware is the difference, then. I have the original firmware and there is no HPS until 1-sec. exposure time.

Below is other evidence that a set of 16 is used in clipping. For the full set (-border 3) of 16 M pixels I (my little program) checked if a pixel value is topped in its neighborhood, if yes disregard, else if it is solitary increase count at center of matrix. If there is an equal value increase the count at the corresponding relative position in the matrix. The result for 1/4 s shows 0 at center (its never top alone) and the pattern shows the 16 sites used for clipping (+ some accidentally equals at the other sites).

That's a nice way to present the data (after a little re-formatting, of course - I wish DPR would give us some table capability!). Sometimes I resort to using a .gif image instead of text, for arrays of numbers in posts.

A riddle about the sensor properties shows up in the numbers below:

Why are the two top value pixels particularly frequently vertical neighbors in the Bayer square rg/gb ? This little mystery also shows up in the frequency of accidental equals at 1/5 sec.

Clearly, there is some electrical coupling between pairs of rows, which may or may not be intentional in the design (I suspect not).

Keyboard shortcuts:
FForum MMy threads