Lens calibration data (lensfun, version 1) are not recognized by DT 4.0 automatically

Thank you for the detailed information, Glenn! I understand that things are not straightforward, although that (Viltrox) lens’ maker and the lens designation (model) are sufficient to search the lens data in the .xml files. Those data come from Exif as confirmed by exiv2 and exiftool both. In addition, the camera model is also known. A search algorithm can handle this task very quickly.

As I correctly understood, exiv2 implemented in DT extracts camera and lens data from the raw file and DT looks for the corresponding lens correction data in the lensfun database.

It is unsatisfying for me not being able to proceed and find a solution at moment. I appreciate any hint to make a progress.

It appears from the previous discussion that lensfun does not have an APS-C version of the distortion correction for that lens. You have the option of submitting measured data following the lensfun instructions. That would be the solution. If you choose not to pursue that, then I’d say you need to figure out how to be satisfied with your choice…

Yes, it’s not the easiest thing in the world to figure out, but you would learn a bit in the process…

At first step I thought I can take lens data for Nikon Z6 and add them to lensfun database manually to see as a test whether this will function. At the second step, I would take pictures and submit them to get the right and complete lens correction data incl. vignetting compensation.

When I encounter at the first step that difficulty of the unidentified lens, how can you be sure that at second step it will function?

Those lens data from Viltrox lens for Nikon are just numbers. How can we argument that those belong to a full frame camera and DT may not recognize as a consequence.

How do you think the rest of the data in the lensfun database got there? Do the procedure, submit the data, and the repo maintainers will make sure it gets to the proper place. With that, you won’t have to worry about XML formatting and content…

1 Like

Even if you perform the calibration for the APS-C crop, the fallback string AF 85/1.8 II XF currently used by dt on the camera body in question will not be sufficient to identify this lens automatically.

What’s missing?

“Viltrox” in front. (Or any other vendor as this string as it stands might not be unique.)

Lensfun will ignore spaces and case when matching, but won’t do a partial match, I think…

Glenn, frankly I do not know what is missing in order the lense will be identified. The fact is DT does not identify the Viltrox lens automatically. I entered the data exiv2 delivered into .xml file of lensfun database as shown above.

The ~/.exiv2 file already mentioned can tell dt the correct information to pass to lensfun.

True, but only if there is a numerical LensID/LensType to perform the mapping.

The OP still hasn’t shown all the relevant Exif and MakerNote data.

I believe this would function. I am Windows user and DT runs under Windows. I could not find any reliable information what should be the contents of that file and where to locate in Windows system.

I attached a RAW file taken with Fujifilm X-S10 with attached Viltrox 85 mm lens. You can get all the information out of it.
_DSF3267.RAF (25.2 MB)

So the Fujifilm MakerNote doesn’t include the LensID/LensType numerical tag like e.g. Canon or Nikon do, so not sure how the exiv2.ini mapping would work in this case. I’ll have to take a closer look at the exiv2 and dt code when I find some time…

Thank you for your interest in trying to help me. It is not urgent. I think the key point is how DT handles the lensfun database.

I think DT should use the lens corrections embedded in metadata.

Has someone reverse engineered and posted how that metadata works?

Perhaps @agriggio ?

Sorry, what is the question exactly?

Have you reverse engineered and implemented lens correction where the correction data stored in the raw file is used?

Yep, Fujifilm MakerNotes are not bypassed by exiv2.ini (like Minolta, Olympus, Nikon, Canon, etc), so that route is a dead end.

So have to think on the dt side how to improve the detection for Fujifilm cameras. Blindly using LensMaker + LensModel might break currently working things…