Tree [252d50] master /

File Date Author Commit
apps 2015-05-26 Torsten Bronger Torsten Bronger [bccf45] Removed debugging code.
berlios-archive 2014-04-06 Torsten Bronger Torsten Bronger [8f5e5b] Added exported tickets from Berlios as XML files.
build 2014-10-23 seebk seebk [d82264] Improved Glib2 DLL lookup on windows. DLL is on...
data 2 days ago Torsten Bronger Torsten Bronger [252d50] Added Leica D Vario-Elmar 14-150mm f/3.5-5.6 As...
docs 3 days ago Torsten Bronger Torsten Bronger [611f20] Added Contax G mount.
include 2015-06-03 Sebastian Kraft Sebastian Kraft [0b422f] Merge branch remove-ext-classes into master
libs 2015-06-20 Torsten Bronger Torsten Bronger [8945e8] Improved vignetting interpolation.
tests 2015-04-19 Sebastian Kraft Sebastian Kraft [6dbaee] Fix const char warning in tests
tools 2015-06-22 Torsten Bronger Torsten Bronger [a53232] Re-activated scaling in
.gitattributes 2014-09-30 Sebastian Kraft Sebastian Kraft [35b19f] Added gitattributes file to exclude certain fil...
.gitignore 2014-09-23 Torsten Bronger Torsten Bronger [377ae1] Removed tibs files from .gitignore.
CMakeLists.txt 2015-05-30 seebk seebk [f1da9e] Special datadir (LENSFUN_WINDOWS_DATADIR) for w...
ChangeLog 2015-05-09 Sebastian Kraft Sebastian Kraft [8e77c7] Added new cameras to the changelog
README 2015-05-23 Torsten Bronger Torsten Bronger [e5c381] Made spelling of "Lensfun" consistent.

Read Me


The goal of the Lensfun library is to provide a open source database
of photographic lenses and their characteristics. In the past there
was a effort in this direction (see,
but then author decided to take the commercial route and the database
froze at the last public stage. This database was used as the basement
on which Lensfun database grew, thanks to PTLens author which gave his
permission for this, while the code was totally rewritten from scratch
(and the database was converted to a totally new, XML-based format).

The Lensfun library not only provides a way to read the database
and search for specific things in it, but also provides a set of
algorithms for correcting images based on detailed knowledge of
lens properties. Right now Lensfun is designed to correct
distortion, transversal (also known as lateral) chromatic aberrations,
and vignetting.

The interface is defined both using C++ style and plain C.
The C interface is a wrapper around the C++ classes.


The libraries which are part of this package are licensed under the terms
of the GNU Lesser General Public License, version 3. Libraries are located
under the subdirectory libs/ of the source package. A copy of the license
is available in the file lgpl-3.0.txt which can be found in the source
archive. You can read it here:

The documentation files, including those autogenerated with Doxygen,
are covered as well by GNU Lesser General Public License, version 3.

Applications which are part of this package are licensed under the terms
of the GNU General Public License, version 3. Applications are located
under the apps/ subdirectory of the source package. A copy of the license
can be found in the file gpl-3.0.txt which can be found in the source
archive. You can read it here:

Also the build system (the contents of the build/ subdirectory plus the file) is licensed under GPL v3.

Test programs and tools are put into public domain, unless explicitly
specified otherwise in the header of the source files. Test programs
are located under the tests/ subdirectory, and tools are located in tools/.

The lens database is licensed under the Creative Commons Attribution-Share
Alike 3.0 license. The database is located under the data/ subdirectory
of the source package. You can read it here:


The build system is based on CMake ( In order to 
successfully configure and build the project the following tools are more 
or less required:

    - CMake 
    - GNU Make 
    - Doxygen in order to generate the library documentation.
    - GLib 2.0 and later which is used for low-level I/O and XML parsing.
    - libpng is required to build and run test programs.

First enter the Lensfun root folder and create a build directory.

    cd lensfun
    mkdir cmake_build

Enter the build directory and run CMake to configure your sources and create 
the build files

    cd cmake_build
    cmake ../
Run make/make install as usual
    make install

The following CMake options can be set (defaults are upper case):

    -DCMAKE_BUILD_TYPE=DEBUG|Release        select debug or release build mode
    -DINSTALL_HELPER_SCRIPTS=off|ON         install various helper scripts
    -DLENSFUN_INSTALL_PREFIX=/USR/LOCAL     install prefix 

    -DBUILD_STATIC=OFF|on       build static or shared lib
    -DBUILD_TESTS=OFF|on        build also the test programs
    -DBUILD_LENSTOOL=OFF|on     build Lensfun reference implementation
    -DBUILD_FOR_SSE=off|ON      build with SSE optimisation
    -DBUILD_FOR_SSE2=off|ON     build with SSE2 optimisaiton
    -DBUILD_DOC=OFF|on          build documentation

If you want to have more detailed output when running 'make' you can simply add 
'VERBOSE=1' to the make command line.

You can also build packages with cmake:

    command line and then "make package". (But this is not extensively tested.)

Please note that running cmake again does NOT reset all options to default or 
reconfigure all variables. To restart with a clean configuration delete all files
in your cmake_build folder.

If you prefer setting the configuration with a GUI or want to get an extensive 
overview of all available settings and cache values run cmake-gui.


The end-user documentation for the library can be built by issuing the

	make docs

Also you can read it online at any time by pointing your browser to:

The documentation on the site is updated every night from Git, so it always
contains the latest info on the library.


Here goes a full list of people who have contributed to this library:

	Andrew Zabolotny <>

	Tom Niemann: original open-source ptlens database.

	Pablo d'Angelo for the idea of a open-source lens database.
	The whole PanoTools team:</b> for all math and knowledge I have borrowed
	from PanoTools:
		Helmut Dersch - The father of most (all?) open-source panorama
		creation tools.
		Daniel M. German
		Kevin Kratzke
		Rik Littlefield
		Fulvio Senore
		Jim Watters
		Thomas Rauscher
		Pablo d'Angelo (thanks once more :)
		Bret McKee
		Robert Platt

Also I would like to thank the people that made valuable contributions to Lensfun:
	Niels Kristian Bech Jensen
	Pascal de Bruijn
	Thomas Modes
	Torsten Bronger

And of course great thanks to all the people sending profiles for the database.