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.
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).
If you want to know more about the tool, please read this tutorial. It's still 100% applicable.
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.