Lens Identification in Rawstudio

Lens identification is a very tricky thing. First of all, there is not a standard for how to store lens information in RAW files. This makes identifying a single lens quite difficult, and potentially it could be identified wrong.

When we see a new lens, we make a unique identifier, so we are able to recognize it in the future. In some cases, like new Canon and Panasonic cameras, the lens used is actually stored as i string in the RAW file Рthere are some border cases, like 3rd party lenses on Canon cameras, but in general this is pretty bullet proof.  In other cases the ID is based on the minimum and maximum focal length and maximum and minimum aperture values.

When the lens is identified, you can then match your lens with the Lensfun database, for it to be able do lens corrections. This works perfectly for most lenses, but there are some zoom lenses that change the value of their max/min aperture based on the actual focal length, which will make it show up several times in our lens database and lens editor.

Below you can see my Tamon 18-270mm lens. Since it is a third party lens, it doesn’t have a string identifier, and it is shown multiple times because the minimum and maximum aperture value changes for different focal lengths.

Before fixing. We see the same lens represented several times.

It is primarily a¬†problem for the mentioned lenses and at least primes and fixed aperture zooms won’t have the problem. But we now have a way of handling this problem. Rawstudio now includes a XML file where we can search for a lens with the lens id and min/max focal length and set the “correct” aperture values. We will be adding all the lenses we can find information on, but some of them we will need a few sample images from. So if you have seen this problem with a lens, please send the info back to us so we can add it to the correction database.

After fixing, now it only shows up once as you’d expect.

I still need a lens profile for this lens. I will make a lens profile guide in the near future and use this lens as example.

Comments (6)

6 responses to “Lens Identification in Rawstudio”

  1. Please put this lens do lens database:
    Tokina 11-16mm f/2.8 AT-X 116 Pro DX

    • akv says:

      I will need the identifier from ~/.rawstudio/lens-database.xml before I can add it.

      • CChiappa says:

        Here’s what I have for the Tokina 11-16mm f/2.8 on Canon mount:

        ID:160 maxF:16 minF:11 maxF:2.8 minF:23
        Canon EOS 40D

  2. Christof Douma says:

    I was searching how to get my Tamron 18-270 lens correction working with rawstudio. Reading the issue mentioned here, I noticed that rawstudio 2.0 (debian package 2.0-1) still mentions my lens multiple times. At least I have got 3 entries for the same lens in my lens database (starting from an empty one). I was wondering if this blog entry is about a newer version then I have.

    In case you are interested. I have found a lens correction file from:


    And fixed it so that lensfun accepted the xml file.

  3. manu says:

    here is what I have in ~/.rawstudio/lens-database.xml for Nikon AF-S DX Nikkor 35mm f/1.8G (http://www.lensdatabase.net/index.php?nav0=database&nav1=view&id=9)

    ID:130 maxF:35 minF:35 maxF:1.8 minF:2
    NIKON D70

    I can’t see it in the lens database of rawstudio
    does it helps ?

Leave a Reply

Anders Kvist on January 8, 2011

RSS feed