8.38. Retinex
| 8. The “Colors” Menu |

### 8.38. Retinex

#### 8.38.1. Overview

Figure 15.189. “Retinex” example

Original image

“Retinex” filter applied. Note new details in the upper right corner.

Retinex improves visual rendering of an image when lighting conditions are not good. While our eye can see colors correctly when light is low, cameras and video cams can't manage this well. The MSRCR (MultiScale Retinex with Color Restoration) algorithm, which is at the root of the Retinex filter, is inspired by the eye biological mechanisms to adapt itself to these conditions. Retinex stands for Retina + cortex.

Besides digital photography, Retinex algorithm is used to make the information in astronomical photos visible and detect, in medicine, poorly visible structures in X-rays or scanners.

#### 8.38.2. Activate the filter

This filter is found in the image window menu under Colors → Retinex.

#### 8.38.3. Options

Figure 15.190. “Retinex” filter options

These options call for notions that only mathematicians and imagery engineers can understand. In actual practice, the user has to grope about for the best setting. However, the following explanations should help out the experimented GIMP user.

Level

  Here is what the plug-in author writes on his site [PLUGIN-RETINEX]: “To characterize color variations and the lightor, we make a difference between (gaussian) filters responses at different scales. These parameters allow to specify how to allocate scale values between min scale (sigma 2.0) and max (sigma equal to the image size)”...

  Uniform

    Uniform tends to treat both low and high intensity areas fairly.

  Low

    As a rule of thumb, low does “flare up” the lower intensity areas on the image.

  High

    High tends to “bury” the lower intensity areas in favor of a better rendering of the clearer areas of the image.

Scale

  Determines the depth of the Retinex scale. Minimum value is 16, a value providing gross, unrefined filtering. Maximum value is 250. Optimal and default value is 240.

Scale division

  Determines the number of iterations in the multiscale Retinex filter. The minimum required, and the recommended value is three. Only one or two scale divisions removes the multiscale aspect and falls back to a single scale Retinex filtering. A value that is too high tends to introduce noise in the picture.

Dynamic

  As the MSR algorithm tends to make the image lighter, this slider allows you to adjust color saturation contamination around the new average color. A higher value means less color saturation. This is definitely the parameter you want to tweak for optimal results, because its effect is extremely image-dependent.

8.37. Max RGB |  | 9. The “Tools” Menu