Menu

#85 Pentax-DA 18-135mm recognition

wont-fix
None
2019-04-20
2017-08-13
No

I am using Darktable 2.2.5 on Ubuntu 16.04, exiv2 0.25-2.1ubuntu16.04.1pmjdebruijn1~xenial (darktable ppa), lensfun 0.2.8-3pmjdebruijn2~xenial (darktable ppa).
The issue is that Darktable doesn't recognize my camera lens in the pictures.

$ dpkg -L liblensfun-data | grep 'Pentax-DA 18-135' /usr/share/lensfun/*.xml
/usr/share/lensfun/slr-pentax.xml: <model>smc Pentax-DA 18-135mm f/3.5-5.6 ED AL IF DC WR</model>

$ exiv2 -pt IMGP6606.DNG | grep 'PENTAX-DA'
Exif.PentaxDng.LensType Byte 4 smc PENTAX-DA 18-135mm F3.5-5.6 ED AL [IF] DC WR

I contacted darktable's guys but they said that parentheses and upper/lower case is ignored while matching so should be fine, but it doesn't work.

Here you can download the RAW file if you need it https://www.dropbox.com/s/ib1mqrazgnr0892/IMGP6703.DNG?dl=0

Thanks!

Discussion

  • Torsten Bronger

    Torsten Bronger - 2017-08-13

    Frankly, I don't really know what's going on but it works for me with current Lensfun. I tested Lensfun master, but you should test against Lensfun 0.3.2. Note that you have to re-compile DT after having updated Lensfun!

     
  • Kyle Dickerson

    Kyle Dickerson - 2018-02-18

    I'm having this same issue (same lens) in Darktable 2.4.1 from the PPA which uses Lensfun 2.8-3.

    The lens lookup works correctly in Lensfun 0.3.2. I ran a test case in test_database.cpp which successfully passes (My body is a K-7, so I added that in case it was the interaction causing the failure):

    const lfCamera **cameras = lfFix->db->FindCameras("Pentax", "Pentax K-7");
        g_assert_nonnull(cameras);
        g_assert_cmpstr(cameras[0]->Maker, ==, "Pentax");
        g_assert_cmpstr(cameras[0]->Model, ==, "Pentax K-7");
        lenses = lfFix->db->FindLenses (cameras[0], "Pentax", "smc PENTAX-DA 18-135mm F3.5-5.6 ED AL [IF] DC WR");
        g_assert_nonnull(lenses);
        g_assert_cmpstr(lenses[0]->Model, ==, "smc Pentax-DA 18-135mm f/3.5-5.6 ED AL IF DC WR");
        lf_free (lenses);
        lf_free (cameras);
    

    I hacked a similar test into the 2.8 codebase and it failed the match because of the brackets around IF. That is to say, the lookup works correctly on the String

    smc PENTAX-DA 18-135mm F3.5-5.6 ED AL IF DC WR
    

    but fails on any of the following:

    smc PENTAX-DA 18-135mm F3.5-5.6 ED AL [IF DC WR
    smc PENTAX-DA 18-135mm F3.5-5.6 ED AL IF] DC WR
    smc PENTAX-DA 18-135mm F3.5-5.6 ED AL [IF] DC WR
    

    In the end, we need Darktable to integrate the newer Lensfun, but I do have a workaround. I edited /usr/share/lensfun/slr-pentax.xml and modified the entry for this lens from:

    <lens>
            <maker>Pentax</maker>
            <model>smc Pentax-DA 18-135mm f/3.5-5.6 ED AL IF DC WR</model>
            <model lang="en">smc PENTAX-DA 18-135mm f/3.5-5.6 ED AL IF DC WR</model>
            <mount>Pentax K</mount>
            ...
    </lens>
    

    to:

    <lens>
            <maker>Pentax</maker>
            <model>smc Pentax-DA 18-135mm f/3.5-5.6 ED AL [IF] DC WR</model>
            <model lang="en">smc PENTAX-DA 18-135mm f/3.5-5.6 ED AL IF DC WR</model>
            <mount>Pentax K</mount>
            ...
    </lens>
    

    And now the lens detection is correct.

     
  • Torsten Bronger

    Torsten Bronger - 2019-04-20
    • assigned_to: Torsten Bronger
     
  • Torsten Bronger

    Torsten Bronger - 2019-04-20
    • status: open --> wont-fix
     
MongoDB Logo MongoDB