lensfun  0.3.2.0
Adding new lenses to the database

There are several levels of detalization you can use when adding a new lens into the database. First, you could just add the basic identification information to the database, just to let the database know that such a lens exist. Then, you might try to find out the mathematical model for the distortion of the lens. Finally, you might try to find out the vignetting and transversal chromatic aberration parameters of the lens and get a complete lens description in database.

A simple lens database entry would look something like:

    <lens>
        <maker>Pentax</maker>
        <model>smc Pentax-DA 12-24mm f/4 ED AL IF</model>
        <mount>Pentax KAF2</mount>
    </lens>

The above code just tells Lensfun that there exist a lens called “smc Pentax-DA 12-24mm f/4 ED AL IF” manufactured by Pentax and it uses the Pentax KAF2 mount. This is not very useful except to make user happy that there's at least one other person in the world owning his lens.

A better lens database entry would contain at least some data about how to correct lens distortion. This data can be calculated from test shots. Some special program should be used for this, or you could try to manually adjust the coefficients until you get decent results.

Computing math model coefficients for distortion, tca, vignetting is a separate very complex matter. It is out of the scope of this manual to give even a short brief about this. There's a tutorial on Lensfun site that will teach you how to create a complete lens entry using just Hugin.