How does RawTherapee detect the lens name?

Some months ago I bought a new lens: the “Olympus M.Zuiko Digital ED 12-45mm F4.0 Pro”.

Since the lens was not included in lensfun I created my own profile and I submitted it to lensfun.
The profile worked correctly with RawTherapee 5.8 under Windows and I used the lens name that I saw when opening an image in RT: “OLYMPUS M.12-45mm F4.0”. That’s the lens name embedded in raw files.

Now the people at lensfun are reviewing my submission but they have a problem with the lens name. They tested it with Darktable and it uses Exiv2 to get the lens name. As a result the lens name is different from the one that I get with RawTherapee and the profile is not applied.

Here you can read the discussion:

If I change the lens name to make Exiv2 happy will still RawTherapee correctly detect the lens?
Does RT use Exiv2 to detect the lens name and did it use the name embedded in the raw file as a fallback solution since the lens was not recognized by the included copy of Exiv2?

Thanks in advance.

Fulvio Senore

1 Like

RawTherapee will also switch to exiv2 in the future, but for now we use our own metadata code. The lens you mention should be recognized by RT:

Whether it also matches properly against lensfun I do not know - I don’t understand the mechanism.

Thank you for your answer.
I tested with RawTherapee 5.8 and the lens was not recognized with that name.

Can you confirm that this lens support was added after the 5.8 release? If this is the case I can change the name in the profile and it will work with both RawTherapee and DarkTable.

Yes, indeed, it was added on February 27, 2020. Almost a month after the 5.8 release.

Note that if you want to override the name exiv2 provides, you can use the ~/.exiv2 file to do that. In order for lensfun to apply correction, you must match the name it provides.

There is a problem. It looks like the RawTherapee name of the lens is

“Olympus M.Zuiko Digital ED 12-45mm f/4.0 Pro”

and the Exiv2 name of the same lens is

“Olympus M.Zuiko Digital ED 12-45mm F4.0 Pro”

Since the names are slightly different I suppose that a lensfun profile cannot work at the same time with RawTherapee and with DarkTable that uses EXiv2 to detect the lens.

I looked at the Olympus site and it looks like the official lens name is the same as the Exiv2 name, so it looks like a solution would be changing the RawTherapee name to the Exiv2 one.

EDIT: I looked closely at the Olympus site and the lens name is different from both:

“M.Zuiko Digital ED 12‑45mm F4 PRO”

so I really don’t know how to solve this problem.

Oh, wow I bought this lens right before Christmas and realized that it was not yet supported by Lensfun. Thanks for creating the profile. I had a look at several tutorials for creating Lensfun profiles but I found it pretty difficult.

How do I use the profile data that you created?

Edit: RT and art do not seem to recognize the lens. Works nicely in darktable, but it does not seem to reduce CA.

The lensfun guy pointed me to this web page:

So it looks like he is right: their name is the correct one. I updated my profile to use this name: now I suppose that RawTherapee ought to use that name as well in order to make the lensfun profile work.
Of course I might be missing something.