Nikon HE* decoder

chroma seems solved, yet hardcoded and not derived from values in the headers, this will be the next step to look where to find the correction values in the file

2 Likes

Current color rendering in darktable. Looks promising.

Missing:

  • Derive color correction from header or whitebalance metadata (still unclear)
  • Stone color / overall color seems still off to me
  • The Adobe DNG looks smoother so some deblocking is missing it seems
  • Decoding artifacts still present in the form of black/white dotted areas (all comps) and colored stripes (come from comp3)
  • Top looks smeared

1 Like

Could anyone with access to a HE* camera and a color target shoot a neutral grey patch for me? Or best multiple color patches that include neutral grey as well? Thanks a lot! @martinus

Practical requirements for the shot:

  • HE* compression mode (obviously)
  • Flat, even lighting — avoid specular on the target surface
  • Keep the target reasonably large in frame so each patch spans several precincts
  • Shoot at base ISO to minimise noise in the Cr/Cb channels
  • Include a shot in HE (uncompressed or lossless) of the same target if your camera supports it — that would give us a direct before/after comparison of what the Nikon ICT does to the codec values, which is the most direct way to characterise the transform
2 Likes

I am currently on the road, could you give an visual example of what you are looking for?

something like https://www.xrite.com/de/categories/calibration-profiling/colorchecker-targets

I can see what I can do. As I am traveling right now I don’t have the option of getting them right now, unfortunately.

1 Like

now look at those beauties. I finally cracked the gains table. Banding is now completely gone

6 Likes

Awesome job!!

1 Like

I feel like Claude is my baby now, constantly telling it what not to do :smiley:

2 Likes

Add it to the instructions so it “remembers”.

it’s a bit hard when you’re juggling a few free ones but I’ll manage :smiley:

Does anyone have an idea what they could have done to avoid this?

This is a 400% crop. The reference dng is much smoother and has more detail. Wavelet reconstruction seems fine so far so I must be missing something else. Or the wavelet reconstruction is still missing some formulas/indices I am not seeing.

Maybe some individual channels have too much / not enough intensity. So many degrees of freedom still unfortunately. Or the bayer grid is incorrectly assembled, or or…

I now have a calibration script for color. The more diverse images I have, the better. If you can’t upload them somewhere, let me know and I’ll make some room in my nextcloud

Additionally to those I’d be interested in

  • Same focal length, varied ISO (e.g. same lens at ISO 100, 400, 1600, 6400)
  • Same ISO, varied focal length (e.g. ISO 400 at 24mm, 50mm, 200mm, 400mm)
  • Same exposure, varied WB/color temperature (tungsten vs daylight vs cloudy)
  • A few shots at extreme apertures (f/1.4 or f/2 at one end, f/16 or f/22 at the other)

@martinus can you help with that maybe? Currently I’m stuck because I only have 7 samples to work on. As for subjects it does not really matter for the correlation analysis.

Yes I can, I am hoping to get a couple sample this weekend.

1 Like

Hello @piratenpanda

Just shot 4 pictures: Nikon Z6-III with a Nikkor Z 24-70mm f/4 S lens
Nothing special about them but I can take more “professional” stuff in case you need.
Also with a Nikon Z8 and various lens…

Here is the dropbox link (NO password or registration required to download them):
Nef_high_compression

Just tested with RawTherapee (developers builds) and, as expected, they are not supported.

With Windwos explorere (Windows 11) I can see their “preview-thumbnail” though…
Their exif data are also showed.

1 Like

thanks. The more the merrier! At the moment I just need lots of images to correlate stuff. So different settings like iso, aperture, white balance settings. Subjects don’t really matter at the moment.

But the Z6-III files read as “Nikon NEF Compressed” not “HE*” unfortunately.

Hello @piratenpanda

But the Z6-III is read as Nikon NEF Compressed not HE* unfortunately

Therefore, I suppose you only need pictures from a Z8, right?
I hope the ones with Z8 they are “fine” for you…

1 Like

Reading this https://photographylife.com/nikon-he-versus-lossless-compressed-nef-files the Z6-III should also have the HE* option. I don’t know anything about Nikon :smiley: