Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lens correction module cannot detect lens from EXIF data in RAW.NEF from Nikon z6 #10053

Closed
audioscavenger opened this issue Sep 22, 2021 · 4 comments · Fixed by #10067
Closed
Milestone

Comments

@audioscavenger
Copy link

audioscavenger commented Sep 22, 2021

Describe the bug/issue
lens correction module cannot detect lens from EXIF data in RAW.NEF from Nikon z6

To Reproduce

  1. Go to lighttable
  2. Click on add to catalog
  3. choose a NEF from Nikon z6
  4. open picture in darktable
  5. access lens correction module
  6. camera found: Nikon, Z6
  7. camera/lens not found... please select manually

Expected behavior
camera/lens found.
The same lens on a Nikon d5300 is found from the EXIF data correctly

Platform
Win10x64
Z6 firmware 3.31

  • darktable version : latest release 3.6.0.1
  • OS : Win10 20H2 x64

Additional context

  • Can you reproduce with a RAW or Jpeg or both? both
  • Are the steps above reproducible with a fresh edit (i.e. after discarding history)? yes
  • Is the issue still present using an empty/new config-dir (e.g. start darktable with --configdir "/tmp")? yes

Additional information
_correctly detected lens from a RAW made on a d5300:

Filename - DSC_1542.NEF
ImageWidth - 160
ImageLength - 120
BitsPerSample - 8 8 8 
Compression - 1 (None)
PhotometricInterpretation - 2
Make - NIKON CORPORATION
Model - NIKON D5300
StripOffset - 176640
Orientation - Top left
SamplesPerPixel - 3
RowsPerStrip - 120
StripByteCount - 57600
XResolution - 300
YResolution - 300
PlanarConfiguration - 1
ResolutionUnit - Inch
Software - Ver.1.03
DateTime - 2021:07:05 09:27:29
ReferenceBlackWhite - 0
ExifOffset - 2544
DateTimeOriginal - 2021:07:05 09:27:29
ExposureTime - 1/350 seconds
FNumber - 9.50
ExposureProgram - Normal program
ISOSpeedRatings - 200
DateTimeOriginal - 2021:07:05 09:27:29
DateTimeDigitized - 2021:07:05 09:27:29
ExposureBiasValue - 0.00
MaxApertureValue - F 3.48
MeteringMode - Multi-segment
LightSource - Auto
Flash - Not fired
FocalLength - 18.00 mm
UserComment - 
SubsecTime - 80
SubsecTimeOriginal - 80
SubsecTimeDigitized - 80
SensingMethod - One-chip color area sensor
FileSource - DSC - Digital still camera
SceneType - A directly photographed image
CustomRendered - Normal process
ExposureMode - Auto
White Balance - Auto
DigitalZoomRatio - 1 x
FocalLengthIn35mmFilm - 27 mm
SceneCaptureType - Standard
GainControl - None
Contrast - Normal
Saturation - Normal
Sharpness - Hard
SubjectDistanceRange - Unknown

GPS information: - 
GPSVersionID - 2.3.0.0

Maker Note (Vendor): - 
Data version - 1120 (825307696)
ISO Setting - 200
Image Quality - RAW
White Balance - AUTO
Focus Mode - AF-A
Flash Setting - 
Flash Mode - 
White Balance Adjustment - 0
White Balance RB - 838
Exposure Difference - 0.0
Thumbnail IFD offset - 23954
Flash Compensation - 393472
ISO 2 - 200
Serial number - 2845530
Colorspace - Adobe RGB
Active D-Lighting - Extra High
Picture control - Version - 0100
Picture control - Name - VIVID
Picture control - Base - VIVID
Picture control - Adjust - Full Control
Picture control - Quick Adjust - Not available
Picture control - Sharpness - +8
Picture control - Contrast - Normal
Picture control - Brightness - Normal
Picture control - Saturation - +1
Picture control - Hue Adjustment - Normal
ISO 3 - 200
ISO Expansion - Off
Lens type - G VR
Lens - 18.00
Flash Used - Not fired
Shooting Mode - 33
Contrast Curve - I0
Noise Reduction - OFF
Lens info - 0204
Total pictures - 6620
Vari Program - Not defined
AF info 2 - version - 0100
Contrast Detect AF - Off

_same lens, undetected, EXIF in a RAW from a Z6:

Filename - 20210917_0001_100.NEF
ImageWidth - 160
ImageLength - 120
BitsPerSample - 8 8 8 
Compression - 1 (None)
PhotometricInterpretation - 2
Make - NIKON CORPORATION
Model - NIKON Z 6
StripOffset - 166812
Orientation - Top left
SamplesPerPixel - 3
RowsPerStrip - 120
StripByteCount - 57600
XResolution - 300
YResolution - 300
PlanarConfiguration - 1
ResolutionUnit - Inch
Software - Ver.03.31
DateTime - 2021:09:17 12:33:09
Artist - Eric DeLaRewonko
ReferenceBlackWhite - 0
Copyright - DeLaRewonko Photography
ExifOffset - 12916
DateTimeOriginal - 2021:09:17 12:33:09
ExposureTime - 1/250 seconds
FNumber - 5.60
ExposureProgram - Normal program
ISOSpeedRatings - 200
Recommended Exposure Index - 200
DateTimeOriginal - 2021:09:17 12:33:09
DateTimeDigitized - 2021:09:17 12:33:09
OffsetTime - -07:00
OffsetTimeOriginal - -07:00
OffsetTimeDigitized - -07:00
ExposureBiasValue - 0.00
MeteringMode - Multi-segment
LightSource - Auto
Flash - Not fired
FocalLength - 140.00 mm
UserComment - 
SubsecTime - 00
SubsecTimeOriginal - 00
SubsecTimeDigitized - 00
SensingMethod - One-chip color area sensor
FileSource - DSC - Digital still camera
SceneType - A directly photographed image
CustomRendered - Custom process
ExposureMode - Auto
White Balance - Auto
FocalLengthIn35mmFilm - 210 mm
SceneCaptureType - Standard
GainControl - None
Contrast - Normal
Saturation - Normal
Sharpness - Normal
SubjectDistanceRange - Unknown
Serial Number - 3037808
Lens Info - 18.00  140.00  3.50  5.60
Lens Make - 
Lens Model - 
Lens Serial Number - 

GPS information: - 
GPSVersionID - 2.3.0.0

Maker Note (Vendor): - 
Data version - 1120 (825307696)
Image Quality - RAW
White Balance - AUTO1
Focus Mode - FSHIFT
Flash Setting - 
Flash Mode - 
White Balance Adjustment - 0
White Balance RB - 994
Exposure Difference - 0.0
Thumbnail IFD offset - 62490
Serial number - 3037808
Colorspace - Adobe RGB
Active D-Lighting - Extra High
Picture control - Version - 0300
Picture control - Name - 0300AUTO
Picture control - Base - 
Picture control - Adjust - Default
Picture control - Quick Adjust - +-126
Picture control - Sharpness - Auto
Picture control - Contrast - Auto
Picture control - Brightness - Auto
Picture control - Saturation - Normal
Picture control - Hue Adjustment - +-127
ISO 3 - 200
ISO Expansion - Off
Lens type - G VR
Lens - 18.00
Flash Used - Not fired
Shooting Mode - 32
Contrast Curve - I0
Noise Reduction - OFF
Lens info - 0801
Total pictures - 18151
Vari Program - Not defined
AF info 2 - version - 0300
Contrast Detect AF - On
AF ImageWidth - 0
AF ImageHeight - 0
AF Area X-Position - 0
AF Area Y-Position - 0
AF AreaWidth - 0
AF AreaHeight - 0
@MStraeten
Copy link
Collaborator

If exif infos aren’t properly detected, you’d also check if that’s a known issue at https://github.com/Exiv2/exiv2. If not, then file an issue there.
you might also check https://github.com/darktable-org/darktable/wiki/User's-portal#my-lens-is-wrongly-identified for a workaround …

@kmilos
Copy link
Contributor

kmilos commented Sep 22, 2021

Can you please run exiv2 -Pkv -g Lens on both files? It's possible the FTZ adapter makes the difference here...

If the ID w/ the adapter is different, just add it to your configuration file.

Looks like it is related to the adapter and the MakerNotes changes in the Z series. Can you try to check if there is indeed something in this LensData tag using exiftool (might be that exiv2 is not yet aware of it)?

@kmilos
Copy link
Contributor

kmilos commented Sep 23, 2021

@audioscavenger Btw, support for the Z mount and the updated LensData structure (seems also to be produced by newer bodies like D6, D780, i.e. all based on latest EXPEED 6) was added to exiv2 0.27.4, so it would be great to have some output from it in the case of the FTZ adapter (or a NEF sample please; I can get samples w/ Z lenses from RPU to compare).

I now think we do indeed have a missing feature in dt: the lens detection for Nikon has to now be special-cased (like e.g. Canon and Olympus) since the Z mount and FTZ came into play...

@audioscavenger
Copy link
Author

Can you please run exiv2 -Pkv -g Lens on both files? It's possible the FTZ adapter makes the difference here...

sorry for the late reply. exiftool seems to be able to correctly identify the lens!

-------------------------------------- exiv2 -Pkv -g Lens "S:\Pictures\20210927_0001_100.NEF"
Exif.Nikon3.LensType                          6
Exif.Nikon3.Lens                              500/10 500/10 140/100 140/100
Exif.Nikon3.LensFStops                        84 1 12 0
Exif.NikonLd4.LensIDNumber                    160
Exif.NikonLd4.LensFStops                      84
Exif.NikonLd4.LensID                          0
Exif.Photo.LensSpecification                  500/10 500/10 140/100 140/100
Exif.Photo.LensMake
Exif.Photo.LensModel
Exif.Photo.LensSerialNumber
-------------------------------------- exiftool "S:\Pictures\20210927_0001_100.NEF" -a -G1 -s "-*lens*"
[NikonSettings] LensControlRing                 : Focus (M/A)
[Nikon]         LensType                        : G
[Nikon]         Lens                            : 50mm f/1.4
[Nikon]         LensFStops                      : 7.00
[Nikon]         LensDataVersion                 : 0801
[Nikon]         LensIDNumber                    : 160
[Nikon]         LensFStops                      : 7.00
[ExifIFD]       LensInfo                        : 50mm f/1.4
[ExifIFD]       LensMake                        :
[ExifIFD]       LensModel                       :
[ExifIFD]       LensSerialNumber                :
[Composite]     LensID                          : AF-S Nikkor 50mm f/1.4G
[Composite]     LensSpec                        : 50mm f/1.4 G

@johnny-bit johnny-bit added this to the 3.8 milestone Oct 2, 2021
@kmilos kmilos mentioned this issue Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants