The status of the lensfun code in UFRaw
One of the most interesting feature that was added to UFRaw recently is the use of the lensfun library. This allows the user to correct lens distortions, making straight lines straight. Moreover, lensfun also includes a large database of lenses with the parameters required to fix their distortions. This makes the process of applying the lensfun corrections almost automatic.
Still, this code in UFRaw is in experimental condition and should not be
used unless the user understands the cavities involved in using the code.
If you are building UFRaw from source, read this page and decide for
yourself if you want to enable this feature
(./configure --with-lensfun
).
For distributed packages, it is not recommended to enable
lensfun, since most users would not be aware of the problems involved in
using this feature.
Personally, as the distributed of the win32 version of UFRaw I am
not planning to enable this feature for MS-Windows users.
The cavities in the current code (as of UFRaw 0.14 and 0.15) are:
- The lensfun parameters are not written to UFRaw ID files. This means that if you create an ID file and use it to convert a batch of photos, no lensfun corrections will be applied. Also, reprocessing an image with its original ID file should generate the same output as the last time the image was converted. This is not the case if you apply lensfun corrections as those would disappear. Lastly, the option "Send to Gimp" also relies on the ID file. Therefore images sent to Gimp will loose the lensfun corrections.
- At the moment the lensfun correction is applied at the wrong point during the image conversion workflow. It should be applied on the linear data before the ICC profile, but at the moment it is applied afterwards. In many cases the difference in the output is academic, still I believe in doing things the right way (tm). In some cases this leads to strange behaviors. For example, applying chromatic aberration correction to a grayscale images causes color artifacts. Another problem is that the parameters used for vignetting corrections are difference if you apply the correction before or after the ICC profile. This means that users that would add those parameters to the lensfun database based on the current implementation in UFRaw would get the wrong results after UFRaw will be fixed.
UFRaw requires the latest code from lensfun SVN. It is not healthy to distribute code that cannot be mapped to a specific released version of a library.(lensfun 0.2.3 was released)- The lensfun feature almost doubled the number of controls in UFRaw's GUI. Therefore it will take a while to fix all the bugs in the GUI to get a smooth and predictable behaviour.