Lens Correction not fixing Vignetting

Hello Todd, have you created a bug report at github on this issue?

Or has anyone else created a bug report? Otherwise, I would create one.

I see the same issue for the images created with my Nikon Z6ii and my Nikkor Z 24-120 f/4. My camera and my lens use the latest Nikon firmware.

The issue occurs in darktable 4.4.0 and 4.4.2, since the “image information” on the left side of the darkroom view reports a focus distance of 0.01. In consequence, the lens correction does not apply the vignetting compensation.

This was different in darktable 4.2.1. With this version, the “image information” reports a focus distance of “-“. With this “undefined” focus distance, the lens correction works as expected.

The source code https://github.com/darktable-org/darktable/blob/darktable-4.2.x/src/common/exif.cc#L1036 shows that darktable 4.2 did not read the Exif.NikonLd4.FocusDistance tag at all. This resulted in a better behavior than the current approach https://github.com/darktable-org/darktable/blob/master/src/common/exif.cc#L1187, which seems to read the wrong tag if a Nikkor Z-mount lens is used (w/o FTZ adapter).

Shall I create a bug report at github? Or does it already exist?

Hey Matthias,

I have not created a bug report. Once I learned that I could manually assign a distance value in the Lens Correction module I’ve been doing so as a work-around. For me the issue appeared after upgrading from 4.4.1 to 4.4.2.

Hi Todd,

yes, I have seen that it’s possible to manually assign a distance value in the Lens Correction module. But I have noticed that all of my existing images, which I have processed with darktable 4.2 and before, lose their vignetting correction if I process them with darktable 4.4. This means that I have to manually open all of my old images with darktable 4.4 and adjust the value.

Since this issue seems to occur for all Nikon Z cameras (we already have the Z5, Z50, and Z6ii in this discussion), it would make sense to have an appropriate fix in the exif.cc module.

Therefore, I will create bug report.

Thank you for your immediate response!

This is the link to the issue at GitHub:

1 Like

Please help test the proposed fix: exif: fix focus distance parsing for Nikon Z bodies by kmilos · Pull Request #15030 · darktable-org/darktable · GitHub

Would be interesting to check both against exiv2 0.28.0 (e.g. Arch or Tumbleweed) and >= 0.27.4 series.

same issue with EndeavourOS exiv2= 0.28.0 and all native Z lenses