Exiv2 / exiv2

Image metadata library and tools
http://www.exiv2.org/
Other
934 stars 281 forks source link

Nikon Z8, Nikon F and 3rd-party lenses not being identified in Darktable #2980

Closed Dusenberg closed 5 months ago

Dusenberg commented 5 months ago

Describe the bug

Lens data for the all F-mount lenses is either missing or is wrong for all Z8 NEF files I have processed in darktable.

All the F-mount lenses have been used on a Nikon D810, D850, and the Nikon Z7 (FTZII adapter) without this issue manifesting. Although the Tokina and Tamron lenses needed entries in a .exiv2 parameter file to be recognised correctly in darktable; and Focus Distance was not correctly reported for the Z7.

~/.exiv2 file contents:
    [Nikon]
    137=Tokina AT-X 24-70mm f/2.8 PRO FX
    229=Tamron SP 85mm f/1.8 Di VC USD

Darktable output information for each test image

Z8 + FTZII + Tamron SP 85mm f/1.8 Di VC USD raw file: 20240523_Z8LensDataTest_800_0052.NEF i) Darktable: lightable 'image information'
a) lens: 'VR 85mm f/1.8E' no Maker and incomplete spec b) aperture: 'f/8.0' correct c) focal length: '85.0mm' correct d) focus distance: '-' missing ii) Darktable 'lens correction' module lens information a) Lens: 'VR 85mm f/1.8E' incorrect NO CORRECTION DATA Can manually select 'Tamron SP 85mm f/1.8 Di VC USD' and correct correction data is presented including b) Focus distance: 1000 looks correct but maybe a default value
NB: the ~/.exiv2 corrections do not seem to be applied as they were doing on Z7 et al

Z8 + FTZII + Tokina AT-X 24-70mm f/2.8 PRO FX @ 70mm raw file: 20240523_Z8LensDataTest_800_0053.NEF i) Darktable: lightable 'image information'
a) lens: '24-70mm f/2.8G' no Maker and incomplete spec b) aperture: 'f/8.0' correct c) focal length: '70.0mm' correct d) focus distance: '-' missing ii) Darktable 'lens correction' module lens information a) Lens: 'Nikon, Nikkor AF-S 24-70mm f/2.8G ED' incorrect - wrong lens, wrong correction data b) Focus distance: 1000 incorrect

Z8 + FTZII + Sigma 50mm F1.4 DG HSM Art raw file: 20240523_Z8LensDataTest_800_0055.NEF i) Darktable: lightable 'image information'
a) lens: '50mm f/1.4G' no Maker and incomplete spec b) aperture: 'f/8.0' correct c) focal length: '50.0mm' correct d) focus distance: '-' missing ii) Darktable 'lens correction' module lens information a) Lens: 'NIKKOR AF-S 50mm f/1.4G' incorrect - wrong lens, wrong correction data b) Focus distance: 1000 incorrect

Z8 + FTZII + Sigma 35mm F1.4 DG HSM Art raw file: 20240523_Z8LensDataTest_800_0056.NEF i) Darktable: lightable 'image information'
a) lens: '35mm f/1.4G' no Maker and incomplete spec b) aperture: 'f/8.0' correct c) focal length: '35.0mm' correct d) focus distance: '-' missing ii) Darktable 'lens correction' module lens information a) Lens: '35mm f/1.4G' incorrect - no correction data Can manually select 'Sigma 35mm F1.4 DG HSM' and correct correction data is presented including b) Focus distance: 1000 looks correct but maybe a default value

Z8 + FTZII + Nikkor AF-S 70-200mm f/4G VR IF-ED @ 85mm raw file: 20240523_Z8LensDataTest_800_0057.NEF i) Darktable: lightable 'image information'
a) lens: 'VR 70-200mm f/4G' no Maker and incomplete spec, but see 'lens correction' below b) aperture: 'f/8.0' correct c) focal length: '86.0mm' correct d) focus distance: '-' missing ii) Darktable 'lens correction' module lens information a) Lens: 'NIKKOR AF-S 70-200mm f/4G IF-ED VR' correct, and correction data is presented including b) Focus distance: 1000 incorrect **

Z8 + NIKKOR Z 24-200mm f/4-6.3 VR @ 85mm raw file: 20240523_Z8LensDataTest_800_0058.NEF i) Darktable: lightable 'image information'
a) lens: 'Nikkor Z 24-200mm f/4-6.3 VR' correct b) aperture: 'f/8.0' correct c) focal length: '86.0mm' correct d) focus distance: '-' missing ii) Darktable 'lens correction' module lens information a) Lens: 'NIKKOR Z 24-200mm f/4-6.3 VR' correct and correction data is presented including b) Focus distance: 1000 looks correct but maybe a default value **

To Reproduce

Steps to reproduce the behavior:

I couldn't attach the 6 raw files for some reason. I will try again once the issue is raised

  1. Provide the file with which you observed the issue (commonly named PoC). Explain the status of the file (e.g., direct from camera, edited with darktable), whether you own the copyright and if you allow the file to be added to exiv2 under the project's license
  2. List the exact commands/functions to reproduce the issue and include any related output
  3. Mention the branch and commit in which you observed the issue (e.g., main, commit 9f721b40, 0.27-maintenance, latest)

Expected behavior

Correct lens identification and data in darktable and reported by eviv2 cli

Desktop (please complete the following information):

Linux Mint 21 Vanessa base: Ubuntu 22.04 jammy
Kernel: 5.15.0-56-generic
darktable 4.6.1 from repository
exiv2 --version exiv2 0.27.5
exiftool -ver 12.59

Additional context

There are no shooting issues with the lenses on the Z8, just the lens metadata.

kmilos commented 5 months ago

These should already be working w/ more recent exiv2 versions, like 0.27.7 (for identification) or 0.28.2 (for corrected focus distance).

Please re-test and feel free to re-open if needed.

Dusenberg commented 5 months ago

Thanks so much, great news! Could you point me to where I can get 0.27.7 from for my system?

kmilos commented 5 months ago

0.27.6 at least to be precise: https://github.com/Exiv2/exiv2/pull/2291

You'll have to seek help in the user support forums for your distribution, or https://discuss.pixls.us/c/software/darktable/19