Hugin panorama stitcher befriends open lens database

Hugin panorama stitcher befriends open lens database

The new version of Hugin, a popular free panorama stitcher, is now able to easily fix lens distorsions thanks to LensFun, an open lens database.

LensFun is by no means a new project. It was started in late 2007 by Andrey Zabolotny to provide a handy tool for 3rd party developers of free photo editing software. Indeed, the project is now used by most serious free software for digital photography, such as darktable and digiKam.

The basic math for calculating lens distorsions was derived from libpano, another existing project used by Hugin. So LensFun integration in the stitcher was only a question of time, but it took 5 years to get there.

The work on integration was done by Thomas Modes, a long-time cntributor to Hugin. He also implemented conversion between orthographic, stereographic, equisolid, and Thoby lens types in LensFun itself, of which you can read more in an earlier LensFun coverage.

Where is it used?

Two most important parts where LensFun is used are the stitcher itself and the standalone lens calibration tool that's part of the package.

In Hugin, go to "Camera and Lens" tab, select an image or multiple images and click the "Load lens..." button. This will get you this dialog to search for a lens and apply the correction data.

Load lens from LensFun library

As for the lens calibration tool, the only difference is that now you can save an XML file that you can append to an existing LensFun database (which is in XML).

Tube still image

If you want to know more about the tool, please read this tutorial. It's still 100% applicable.

Other changes

Apart from the LensFun integration the new version got several improvements:

  • cpfind utility now has a prealign matching strategy and pair-wise matching for multirow heuristic;
  • it's now possible to keep exposure fused stacks;
  • pano_modify is now capable of autocropping HDR.

Getting Hugin

Source code, as well as Mac and Windows installers are available at SourceForge. For Ubuntu users there is a PPA with packages for 11.10, 120.04 and 12.10.

Was it useful? There's more:

3 Comments

Leave a comment
  1. Do you have any examples of the actual effect on stitched images?

  2. Not close at hand, no. But it’s pretty much the same as if you did your own optimization by ‘a’, ‘b’ and ‘c’ factors with Hugin like you probably did before.

  3. When I click on the “Load lens data…” button in Hugin, it wants a “*.ini” file, yet the LensFun data seems to be in XML format (e.g. mil-Samyang.xml). What am I doing wrong?  The “About” in Hugin has build “2012.0.0.a6e4184ad538”

Tell us what you think

Submit the word you see below: