Lens correction: Selecting lenses when using lens adapters

darktable
#1

Hello,

today I ran into a problem with Darktable when I was trying to post-process a RAW that was shot with a Sony Camera (Sonly Alpha 7RII) and a Sigma 150-600 with Canon EF mount. I am using the Sigma MC-11 adapter.

After some discussion on IRC we found that the only way for me to (manually) select the proper lens was to select some camera that is compatible with Canon EF, then select the lens, then switch the Camera back to the Sony. That process doesn’t sound optimal to me and given more people might be using lens adapters, I wonder if we can improve this.

While debugging, we also found that the lens string in the EXIF data doesn’t match what exactly what is in lensfun, so there might be multiple problems:

exiv2 -pv --grep lensmodel/i test.arw
0xa434 Photo        LensModel                   Ascii      46  150-600mm F5-6.3 DG OS HSM | Contemporary 015

Having the auto detection work would of course be nice as well, but being able to manually select independent of the camera type/mount or some kind of support for the adapters in that logic would be nice too.

@darix on IRC asked me to start a topic about this here.

Thanks,

Chris

0 Likes

(darix) #2

This is a fun combinations of problems

  1. does lensfun already track adapters in their data? lensfun-update-data doesnt seem to show any. given that the big 3 just forced adapters on all their customer (Canon EF-R /Nikon F-Z/ Sigma L mount) I think it would be a good idea to ship the needed informations in lensfun data directly @seebk

  2. the lens model name is not matching between lensfun and exiv2. What can be done about that? or does lensfun do a substring match? the name in the lensfun DB is: Sigma 150-600mm f/5-6.3 DG OS HSM | C @clanmills

  3. darktable/lensfun limit the user to the DBs native to their mount. and it doesnt seem to have a way around this. @Pascal_Obry @houz

0 Likes

(darix) #3

Forgot to mention: exiftool shows Sigma 150-600mm F5-6.3 DG OS HSM | C + MC-11

0 Likes

(Robin Mills) #4

I don’t know what lensfun does. Lens recognition is troublesome because the type of lens is usually not in the metadata. Lens recognition usually involves a guess using other metadata such as max/min aperture/focal length. In Exiv2 v0.26, an option was added to enable the user to overwrite the default lens recognition with a value in the file ~/.exiv2. This is documented in the exiv2 man page released with Exiv2 v0.27.

0 Likes

(darix) #5

it still seems that exiftool has some guessing code for the adapter. maybe we can share/port that?:slight_smile:

0 Likes

(Robin Mills) #6

Yes. I’ve thought of that. I added code to Exiv2 a couple of years ago to call Exiftool being deployed as a web-service. I decided not to deploy this for a variety of reasons such as performance and adopted the ~/.exiv2 work-around to enable users to override the lens definitions “burnt” into the code.

Other reasons not to adopt this included:

  1. Negotiating with Phil/Exiftool (with whom I have a friendly relationship).
  2. Hosting the web-service.
  3. I like to the idea of having a “proper language interpreter” built into exiv2 and lens recognition would be written in that language. Users could download modified “lens scripts”.
  4. I’d like to improve our test suite of images/known lenses.

Many folks have asked me to do more, however no-one has volunteered to embrace challenge.

0 Likes

(darix) #7

Well one of my pet projects right now is “improve the data collection and shipping to users for all the data needed to support new gear”

so currently collecting all the different data formats and the content of those that we need.

so maybe in the long run we can have a “camera-update-data” script that will feed exiv libs/tools, raw editors, lensfun.

Robin will you join us at the LGM in Saarbruecken?

1 Like

(Robin Mills) #8

Regret. I can’t come to LGM in Saarbruecken because on that weekend I will be in Scotland on family business that cannot be changed.

However, I’ve written 7 slides and asked Andreas Schneider to give a 5-minute lightning presentation “Exiv2 Status Update”.

The news from Team Exiv2 is positive and things are moving forward. We have 6 regular contributors and I’m very pleased to no long carry this alone. We face the same situation as every project (both open-source and commercial) by having more requests than engineers.

0 Likes