Lensfun - getting it to work with darktable

I am assuming that darktable and lensfun are correctly installed.

When I am trying to use the lenscorrection in darktable 3.2.1 for the Sony A900 I can’t select the Sony 50mm F1.4 lens.
When looking at the slr-sony.xml file of lensfun I can see that the Sony 50mm F1.4 is calibrated with a cropped camera, not a full-frame.

It is possible to convert Adobe lensprofiles using the ‘lensfun-convert-lcp’ command. This is a Python script located in ‘/usr/bin/’ in Linux. I have no idea if it gets installed in Windows.
These converted lcp-files are placed as lensfun XML-files in ‘/home/user/.local/share/lensfun’ (Linux) and automatically recognized by darktable.
More info at lensfun: Converting Adobe LCP files to Lensfun: lensfun‑convert‑lcp

When converting the Adobe file ‘SONY (Sony 50mm F1.4) - RAW.lcp’ I get the following lensfun profile:

<lens>
    <maker>Sony</maker>
    <model>Sony 50mm f/1.4</model>
    <mount>Sony Alpha</mount>
    <cropfactor>1.000907</cropfactor>
    <calibration>
        <distortion focal="50.0" model="acm" k1="-0.127915" k2="0.062124" k3="0.074677" />
        <vignetting focal="50" model="acm" aperture="2" distance="3" alpha1="-0.457701" alpha2="-18.945898" alpha3="53.020477" />
        <vignetting focal="50" model="acm" aperture="2.970854" distance="3" alpha1="-0.81574" alpha2="0.136947" alpha3="-39.9128" />
        <vignetting focal="50" model="acm" aperture="4" distance="3" alpha1="-1.648876" alpha2="16.216277" alpha3="-87.079721" />
        <vignetting focal="50" model="acm" aperture="4.970854" distance="3" alpha1="-1.32658" alpha2="5.220153" alpha3="-18.940988" />
        <vignetting focal="50" model="acm" aperture="6" distance="3" alpha1="-1.376185" alpha2="4.828291" alpha3="-13.938702" />
        <vignetting focal="50" model="acm" aperture="6.918863" distance="3" alpha1="-1.358987" alpha2="4.670938" alpha3="-13.790161" />
        <vignetting focal="50" model="acm" aperture="8.918863" distance="3" alpha1="-1.363447" alpha2="4.626719" alpha3="-14.433083" />
    </calibration>
</lens>

This new profile works together with the Sony A900 in darktable.

2 Likes