Lens Correction

Rawtoaces automatically corrects the following lens phenomena:

  • Chromatic Aberration

  • Geometric Distortion

  • Vignetting

To apply lens correction, Rawtoaces requires two key pieces of information:

  • Lens and Shot Information

  • Lens Profile

Lens and shot information (including lens make and model, as well as aperture, focal length, and distance values) is typically extracted automatically from the raw image file’s EXIF metadata. If any required information is missing, rawtoaces utilizes ExifTool to attempt to retrieve the missing data. Alternatively, you can provide the information manually using command-line Lens Correction Options or programmatically through the properties of the rta::util::ImageConverter::Settings object.

Lens profiles are managed by the Lensfun project. If the Lensfun library cannot automatically locate the Lensfun database, you may need to specify the path using the RAWTOACES_LENSFUNDB_PATH environment variable.

Basic usage:

Request correction of geometric distortion and vignetting:

rawtoaces --lens-correction dv <INPUT_PATH>

Request all supported types of lens correction, make the correction mandatory, override all camera/lens info used for correction:

rawtoaces                                    \
--lens-correction a                          \
--require-lens-correction                    \
--custom-camera-make "Canon"                 \
--custom-camera-model "EOS R5"               \
--custom-lens-make "Canon"                   \
--custom-lens-model "RF 24-105mm F4L IS USM" \
--custom-aperture 4.0                        \
--custom-focal-length 35.0                   \
--custom-focus-distance 240.0                \
<INPUT_PATH>

Note

Overriding the camera make and model affects both lens correction and spectral colour space conversion mode.