I’m having trouble fixing vignetting with the Lens Correction module in Darktable 4.4.1.
Older images, with the same lens, processed with Darktable 4.2.1 were fixed just fine with “corrections done: all” reported by the module. New images processed with 4.4.1 report “corrections done: distortion & TCA”.
My installation of Darktable was compiled from source via git. I am using Ubuntu 22.04.2. Lensfun is at 0.3.2-6. OpenCL is in use.
I’m a little confused about the messages you’re getting, because I never see anything like them.
However, I am on dt 4.4.1 and I loaded an image that I know has visible vignetting. I turned on the Lens Correction module, and the vignetting was visibly corrected. As I said, there were no messages informing me of that.
Could you supply a sample image as you have not mentioned the camera and lens and that may be where the problem lies. I know some lens I have to select manually and I had also had some lens not included in the lens correcting library.
The messages appear here near the bottom of the expanded module. And depending on the lens it changes from all, to distortion only or in the case shown here distortion & TCA
Hi Todd, thanks for finding out. Checked the lensfun database and indeed there should be vignette correction for that lens and i can reproduce the issue here.
Could you please open an issue at darktable github with
rawfile provided
lensfun version
EDIT: could you also provide the “working” xmp file?
Will take care of it.
I was able to recreate the issue. After some investigation I discover the root cause. In the module, the setting for distance to module is 0.01m. If you change it to 5.7 it correctly fixes the vignetting.
The value in darktable (in image information) for the focus distance is 0.01m
exiftool reports the Focus distance as 6.84mm
darktable uses exiv2 and exiv2 is showing two values:
Exif.NikonLd4.FocusDistance Byte 1 0.01 m
Exif.NikonLd4.FocusDistance Byte 1 6.68 m
Exif.Photo.SubjectDistanceRange Short 1 Unknown
It seems like there are two identical tags with different values per exiv2 or I’m looking at the wrong tags.
I just found the same underlying problem. Seems to be an exiv2 problem. @g-man - will you open a github issue? Likely @kmilos will know more about this …
Another idea about the focus distance reported wrongly. Todd, did you by any chance use the nikon raw developer tool (don’t remember the name) on this image? I vaguely remember that writing dubious data to the raw file …
Sorry for not beeing Todd, but it seems I also have this tag twice according to exiv2 in photos from my Z50. And I can guarantee no Nikon software touched them.
I would start an issue in Exiv2 github first. It is not clear why they report two values and how to tell them apart other than picking the largest (which might not be correct).
On all my native Z-Mount lenses the focus distance is reported as 0.01m.
My older F-Mount lenses with the FTZ adapter seem to have the correct focus distance.
So as of now I have to manually adjust the focus distance for vignetting control.
Windows11 and current dt build is 4.5.0+150~gd04c5a7fd5
Can you describe how you are manually editing the focus distance? Is this in Darktable directly or are you using another tool? My workaround of late is to use a circular mask in another Exposure instance but it is a cumbersome hack.
in the lens correction module I go to the distance to subject and just select a number and see what looks best.
I can’t really create a preset because of aperture and focal length change.