To keep the preview fast, RawTherapee uses the preview image of the current zoom level when applying these transformations. Because of this, the preview image can become soft. Lets assume you are editing a Nikon D700 image: 4256×2832px (that's 12.1 megapixels), and the preview image's size is 600x400px. Rotating it 5° will not be the same as rotating the full 12.1Mp image and then scaling it down to 600x400px. The former will be softer than the latter, though rotating the former will take less time than rotating the latter, which is why RawTherapee does that. But don't worry, when saving the image RawTherapee uses the full resolution image, so it will be sharp. If you zoom the preview in, then RawTherapee will use this higher resolution preview image when calculating the transformation, so to see what the saved file will look like, just zoom in to 100% .
- 1 Lens Hood
- 2 Auto-Fill
- 3 Auto-Crop
- 4 Rotate
- 5 Perspective
- 6 Profiled Lens Correction
- 7 Distortion Correction
- 8 Chromatic Aberration Correction
- 9 Vignetting Correction
1 Lens Hood
Do not confuse vignetting with a blurry lens hood being visible in the corners of your image. Some cameras, typically small ones - compacts, bridge-type and even mirrorless - will capture parts of the lens hood or lens mechanism in the corners of the frame. Typically the same cameras have lenses which suffer from strong distortion. The way these cameras deal with these two problems is by correcting the distortion, as a result of which the corners of the image get "pushed out" beyond the frame, thereby hiding the corners darkened by the lens or lens hood. When you view a JPEG image from these cameras the distortion has already been corrected in-camera, so owners are often unaware that the problem existed in the first place and are surprised to find that the raw image shows these dark corners.
It is not possible to fix the dark corner issue by using vignetting correction - there is no information about the scene in those corners, the scene is occluded by the lens mechanism/lens hood. Do as the camera does: correct the distortion, and the dark corners disappear
This option will upscale or downscale the photo to the extent that the whole image fits within the image boundaries with no black borders visible.
When correcting images that suffer from barrel distortion, "Auto-fill" will perform downscaling to fit as much of the re-projected image as possible into the image boundaries, so that you don't unnecessarily lose any parts of the image. Conversely if the image suffers from pincushion distortion, "Auto-Fill" will upscale the corrected image to fill the frame without black borders around the periphery.
" Auto-Crop" is available when "Auto-fill" is disabled. When activated, it will not cause image interpolation, but instead will crop away the empty space left by the distortion correction or image rotation.
Rotate the image between -45° and +45°. Use the " Select Straight Line" button to set either a vertical or a horizontal image alignment. Use the mouse to draw this line - click and hold mouse to start, move to draw a new vertical or horizontal axis and release to engage image rotation.
- When your picture was taken while you were slightly off-center of the object, you can correct this (within certain limits) with the horizontal slider.
- Very useful to correct 'falling lines', e.g. when photographing architecture. Higher values for both sliders produce heavy distortion, so use with care. Or don't care at all and have fun!
6 Profiled Lens Correction
As of RawTherapee 5.3, lens distortion, vignetting and chromatic aberration can be corrected using one of two systems: Lensfun or Adobe LCP. Both rely on a profile which contains the parameters for correcting lens distortion, vignetting and chromatic aberration.
Lensfun is an open-source project which contains a database of lens parameters. You can find more information about it in the Lensfun FAQ.
The tools "Profiled Lens Correction" and "Perspective" rely on data from Lensfun to simplify and automate the work of specifying the right camera/lens information and finding the optimal correction parameters.
In order for RawTherapee to be able to automatically query the Lensfun database, RawTherapee needs to know which camera and lens was used to take a given photo. This information is decoded from the photo's metadata (currently using a home-made solution, and in the future using Exiv2). To check whether the camera and lens names are decoded correctly, open a photo and in the Editor tab hit the " Quick info" button. The info panel should show your camera and lens names. If it does not, then RawTherapee failed to decode this information correctly. For the time being, there is nothing you can do about this but wait for a new version of RawTherapee. This will hopefully change in RawTherapee 6.0 which will use Exiv2.
If your camera and lens cannot be decoded from the photo's metadata, you may still be able to specify them manually, depending on the tool.
6.1.1 How to check whether your Lensfun database is intact
To find out whether RawTherapee can query the Lensfun database at all, look at the "Camera" and "Lens" drop-downs in the Profiled Lens Correction tool. If you click on either drop-down, it should contain a long list of entries. If it does not, then your RawTherapee installation is buggy - try reinstalling, and if the problem persists then seek help via the forum.
6.1.2 How to check whether your Lensfun database contains information about your camera/lens
To find out whether your Lensfun database contains data for your camera and lens, open a raw file and look at the "Camera" and "Lens" drop-downs in the "Profiled Lens Correction" tool. They should both automatically show the correct camera and lens.
Common causes of failure to auto-detect a profile include:
- RawTherapee could not decode the camera and lens make and model.
- A profile for your camera/lens combination does not exist in your version of the Lensfun database.
- A profile for your camera/lens combination does exist, but it uses names and parameters which differ enough to confuse the matching algorithm, for example "Pentax" vs "Ricoh Pentax", or "F4.0" vs "f/4".
You can try manually looking through each drop-down list to select the right camera and lens.
If you do not find your camera or lens in the drop-downs, then your version of the Lensfun database does not contain this data. Update your Lensfun database. If it still does not contain your camera or lens, then play your part in the open-source world and contribute this information - see the Lensfun documentation to find out how to measure the parameters and contribute them for everyone's benefit.
6.1.3 Updating your Lensfun database in Linux
Run the executable
lensfun-update-data to download the latest version of the Lensfun database. Restart RawTherapee.
Alternatively, you could copy and paste the relevant section from the Lensfun database (which could be taken from one of the files in
/usr/share/lensfun/) into a new file
$HOME/.local/share/lensfun/myLensfun and modify the relevant parameter to match the metadata from your photos. You can find the camera and lens name and parameters contained in your photos by viewing the " Quick info" panel.
Note that while editing the Lensfun database in
/usr/share/lensfun/ directly may be possible, this is not recommended because you could lose your changes during an update.
Should you need to use a Lensfun database in a custom location, you can point RawTherapee to it by editing the
options file and setting the
DBDirectory key's value to the absolute path of the custom Lensfun database file.
6.1.4 Updating your Lensfun database in Windows
- Close RawTherapee while doing this.
- Download the Lensfun database. Either get the appropriate XML file from https://github.com/lensfun/lensfun/tree/master/data/db or download the latest release zip from https://github.com/lensfun/lensfun/releases and find all XML files in the
- Move these XML files to the Lensfun database folder on your computer, which could be in
Adobe provides and offers tools to create and share what are called Lens Correction Profiles. These are text files which describe the distortion, vignetting and chromatic aberrations (CA) of a lens, so that simply loading this file in LCP-capable software such as RawTherapee will correct these issues. Select an Adobe LCP file (read the guide on how to get LCP profiles) to automatically correct geometric distortion, vignetting and lateral chromatic aberrations.
The Lens Correction Profile tool's distortion correction feature can be used together with the manual Distortion Correction tool, and the vignetting correction feature can be used together with the manual Vignetting Correction tool. This lets you use the manual controls in addition to the LCP profile for artistic reasons or if the LCP fails to sufficiently correct a parameter (which happens on some extreme distortion occasions, like with some heavily distorting compact cameras). Be careful that you don't overdo the distortion and vignetting correction by forgetting to turn the manual tools off if you use the LCP equivalents. The vignetting correction feature however is linked to the Flat Field tool, so that when you select a flat-field image then the LCP's vignetting correction will have no effect.
The following restrictions apply:
- Distortion, vignetting and chromatic aberration correction are all supported in raw files, but only distortion correction is supported in non-raw files.
- While distortion correction is visible in the full image preview, chromatic aberration and distortion correction are not reflected in the detail crop windows, only in the fully processed result image. Auto-filling is also not supported.
- Chromatic aberration correction is only supported if the Exif information contains the focus distance (e.g. in DNGs from Nikon files).
- Auto-Fill is disabled when an LCP with distortion correction is enabled, otherwise the preview may become distorted - see bug 1791.
- To keep the preview fast and responsive, the main preview image is used to show the effects of the LCP. As this image is small (exactly the size you see), fixing the distortions will make it appear a little blurry. This has no effect on your saved image, which will be sharp, and so will the zoomed-to-100% preview. Only the zoomed-out preview that will look soft. See feature request 2186.
As with any other tool, you can apply an LCP to multiple images either by including it in the processing profile (see Creating processing profiles for general use), or by selecting multiple images where the same lens was used (you can use the Metadata Filter in the File Browser tab to make this easier) and applying the LCP from the File Browser tab.
7 Distortion Correction
Corrects lens distortion. A negative number corrects barrel distortion, a positive value will correct pincushion distortion. You can place a grid over the image by activating Crop (without cropping) and using "Guide Type > Grid". This may serve as a guide to correct lens distortion.
The "Automatic" button only works if your camera corrected the distortion of the JPEG image embedded in the raw file (most cameras embed a JPEG image in every raw file, and some cameras correct the distortion of that image too). What this feature does is it looks at the JPEG image and, if it was corrected, tries to fix distortion in the raw image by making it match the JPEG image. There are two limitations:
- If the JPEG image was not distortion-corrected by your camera, this button will have no effect.
- If the JPEG image is insufficiently corrected or over-corrected, so will the results be, but as the computed correction will be shown on the Amount slider, you can further refine it manually.
8 Chromatic Aberration Correction
This "Chromatic Aberration Correction" tool in the Transform tab works on the image after demosaicing. The Chromatic Aberration tool in the Raw tab works on the image before demosaicing.
Chromatic aberration can be corrected by using the "Red" and "Blue" sliders. Normally you won't see any chromatic aberration in the fit-to-screen preview, therefore it is highly recommended to open a detail window or to zoom the main preview in to 100% or more when you attempt this kind of correction. As in other software tools, this algorithm eliminates moderate chromatic aberration quite well. Do not expect miracles with images having extremely high chromatic aberration - garbage in, garbage out.
9 Vignetting Correction
Vignetting means light fall-off around the periphery of an image as compared to the center. One of the differences between a cheap lens and an expensive one is that the former is likely to produce stronger vignetting than the latter. The "Vignetting Correction" tool is meant to correct vignetting caused by the lens. This tool is not intended for artistic vignetting; use the Vignetting Filter tool for that.
- Setting the "Amount" slider to a positive value brightens the four edges of the images to correct the classical vignetting. Setting it to a negative value darkens them.
- Influences how much of the image beginning from the edges will be brightened or darkened. Lower values: area of darkening is bigger; higher values: area of darkening is smaller.
- Amplifies the settings of the "Amount" and "Radius" sliders. Set "Amount" to -100, "Radius" to 50 and move "Strength" from 1 to 100 to see how this works.