Can someone help me convert the lens profile?

I like and use darktable very much. It has a lot of features and it produces very beautiful photos.
One disappointment, however, is that it does not have the lens profiles that I use.
I found out that I can convert Adobe LCP files using “lensfun-convert-lcp”, but I could not use this command on my Mac.
I heard that Linux can do it, so I installed Ubuntu using UTM and tried to run it, but I got a “command not found” error when I ran the “lensfun-convert-lcp” command. I could not do it.

I have looked into it, but I don’t know what to do and I am at a loss.

The lens I am using is the FE50mm F1.2 GM. I would appreciate it if someone could convert the attached Adobe LCP file into an XML file that can be read by darktable.

Thank you in advance.

私はdarktableをとても気に入って使っています。たくさんの機能があり、とても綺麗に写真が仕上がるからです。
ただ、一つ残念なことがあり、私が使っているレンズプロファイルがないことです。
AdobeのLCPファイルを「lensfun‑convert‑lcp」を使って変換できることを知ったのですが、私が使っているMacではこのコマンドを使用することができませんでした。
Linuxならできるらしいので、UTMを使いUbuntuをインストールして実行してみましたが、「lensfun‑convert‑lcp」コマンドを実行しても「command not found」エラーが出てできませんでした。

それからも色々調べてみましたが、よくわからずお手上げ状態です。

私が使っているレンズはFE50mm F1.2 GMです。どなたか、添付したAdobeのLCPファイルをdarktableで読み込めるXMLファイルに変換していただけると助かります。

よろしくお願いします。

lensprofile.zip (2.4 KB)

Hmmm, yep, lensfun-convert-lcp is not in the Ubuntu package…

I don’t know how well this would work, but lensfun-convert-lcp is a Python script you may be able to run by itself, either natively on your Mac or in the Ubuntu VM. You can get a copy of it here:

https://raw.githubusercontent.com/lensfun/lensfun/master/apps/lensfun-convert-lcp

I would say don’t bother about converting from Adobe profiles, because it will not work in darktable if you don’t compile darktable/latest lensfun. Adobe has also stopped using TCA correction in its profiles.

There is a development about using Sony EXIF corrections, but not finished yet Manufacturer lens correction module for Darktable

So, what is left is to create a decent Lensfun profile yourself. You have a prime lens, so it will be easy and quick. I have written this Create your own lens correction data for Lensfun – Kameratrollet

There is a VirtualBox with Ubuntu pre-installed with the scripts needed for generating TCA and vignetting profiles. For distortion correction you will need Hugin.

If you want the profile already now you can can just upload raw samples and I can create it for you.

  1. (Distortion) Three raw files of straight lines, around 8 meters or more away.

  2. (TCA) One picture of a grey fence at f/8 and also some distance away.

  3. (Vignetting) You will need a diffuser to put in front of the lens. Take raw samples at f/1.2, f/1.4, f/1.6, f/1.8, f/2, f/2.2 f/2.8, f/3.2, f/3.5, f/4, f/5.6, f/8, f/12, f/16 at focus distances 0,4 meter, 0,8 meter, 2.4 meter and at infinity (focus on objects far away, for example clouds).

Thank you for your reply.

I took your advice and created a .py file and ran it in the Mac terminal.
However, I had to abort because it seemed to have fallen into some kind of infinite loop.
It seems to have been difficult for me with my limited programming knowledge.

Thank you very much.

I see that even if I convert the LCP file, I can’t use it in darktable. That was a blind spot.
I watched the video on the link you gave me to create my own lens profile.
I think I might be able to do this myself, so I will give it a shot.
If I can’t do it by any means, I will send you the RAW data and you may create it for me.

1 Like

For Sony E mount there is a script to read the lens correction data from the raw files developed by uchrisu. You can find lf_fitexif on GitHub.

1 Like

Wow, that sounds great! I would like to try that.

The same map structure with 1 tca and 1 distortion focused on infinity, and then a lot of vignetting samples focused at different distances? And lens cap could even be on now when it just read the EXIF, I assume?

You just need the map structure and the hardware settings (aperture, zoom). It does not play a role what the images actually contain. The correction data are taken from the meta data added to the raw by the camera.

I was pointed to the script by Joachim Daehnke when I provided images for the lensfun project.

Just to be clear, the focus distance must also be of importance, because Lensfun only register 1 focus distance/focal length for distortion and tca.

So focusing at 0.4 meter and extracting the distortion data from the script will give wrong correction next time you focus at 8 meter.

For vignetting correction as many f-stop at different focus distances most be better.

Yes, you need to set the right hardware settings. I forgot to mention focus because you do not vary this for lensfun calibration. Howvwer, according to this site the focal distance should be at least 5 meters. So, infinity might work best.

1 Like