Retinex image processing attempts to imitate the lightness and color perception of human vision. The image is first mapped to a logarithmic scale, then a Gaussian blurred copy is subtracted as in unsharp masking. The resulting logarithmic values are then scaled to the range of visible image values.

Retinex is best suited for rescuing underexposed or badly color balanced images, or for extracting detail for scientific or technical purposes. It is not always useful for enhancement of well-exposed naturalistic images. For this, histogram equalization, adaptive contrast, or high-radius unsharp masking may be superior. Related techniques include the shadows/highlights and exposure/gamma controls. (And don’t forget auto levels and curves.)

The filter is based on the Very High Radius Unsharp Mask filter, and uses the same Gaussian blur technique which is suitable for very large images.

• The Radius setting (sometimes called “Scale”) is a percent of the image diagonal, so it is independent of the actual image size. The apparent and preview-scaled radii in pixels are also displayed. Lower values produce visible halos, which fade at higher values. There is a tradeoff between dynamic range compression at small radii, and improved tonal rendition at large radii. Three radii are actually used (multiscale retinex; the number is sometimes called “Scale division”); the image is processed three times at three different radii (2 pixels, the indicated radius, and 2× the latter), and the three images averaged together. This tends to result in increased sharpness, “clarity,” and uniformity, but may also increase noise. Multi is the weight of the multiscale effect; setting this to zero results in single-scale retinex.

• Contrast (sometimes called “Dynamic”; equivalent to “gain” in the literature) stretches the output histogram. It determines how many standard deviations of pixels are included in the range of image values (the default is 1.5 s.d. on each side of the mean), and is thus adapted to each image. Brightness (equivalent to “offset” in the literature) shifts the histogram to the left or right.

• Unlike most of the filters, the luminosity and color components of the retinex effect are independently adjustable. If the only effect desired is color balance, for example, set Luminosity to zero and adjust Color. For grayscale images, Luminosity is renamed to a simple Amount control.

• Vibrance preferentially increases the saturation of less-saturated areas of the image.

• CR refers to color restoration. It often has surprisingly little effect; it is included based on the literature.

• To map the logarithmic values back to a linear scale, use Linear mode (the Log/Linear button). The filter is then called homomorphic, not retinex. Linear values sometimes have better tonal rendition, but not as good color correction. Color restoration does not work with linear values and is not applied.

• Raise the lower black slider in Blend Ranges to gradually fade the sharpening effect in the shadows; lower the upper white slider to similarly fade the highlights. A large color difference between the original and processed image may affect the results.

• Hue, Chroma, or Luma histograms may be selected. The white histogram (background) is the original image; the black one (foreground) is the processed image.

The plugin works with 8- or 16-bit RGB and grayscale images.

Improvements to version 1.2:

• independent adjustment of the luminosity and color components
• an improved progress bar
• fixed a bug in the radius adjustment

The unregistered filters will save images up to 720 pixels in width and/or height. Please purchase a registration key for $9.00 which unlocks all of the RC Filters. Use the PayPal link below and I will e-mail you a text file (RCFKey.txt) to copy into your plugins folder. Be sure to use a valid e-mail address (I don’t sell or give them away). If you previously paid for any of the RC Filters, message me and I will send you a registration key. The filters come with a demo key; if properly installed, the dialog will say “Demo key” when you click the About button. Questions . . . .

The filters, the help files, and the registration key all go into the
same folder.
It may help to make an RC Filters subfolder. Each filter has a link back to the plugin folder on the About dialog for easy access.