DStretch, image enhancement for rock art

0
4194
Imagen destacada: realce de arte rupestre de Villar del Humo con DStretch

DStretch is a tool developed by Jon Harman around 2005 as a plugin for ImageJ, the well-known image analysis environment. It is based on decorrelation stretching techniques—commonly used in remote sensing to amplify subtle chromatic differences and generate false-color images.

What does DStretch contribute to the study of rock art

DStretch is designed to enhance barely perceptible tone differences in photographs of rock art, especially in pictographs with reddish or yellowish pigments. The result can make very faint motifs more visible and help guide the analysis of a site.

Like any digital enhancement technique, it must be used with caution: the processed image does not replace the original documentation nor does it, by itself, constitute proof of the existence of a motif. It is advisable to always keep the original file, record the applied adjustments, and compare the result with direct observation and the archaeological context.

Pinturas rupestres del abrigo de Villar del Humo antes del procesado con DStretch

How it works

In simplified terms, DStretch applies a transformation based on the Karhunen-Loeve transform (KLT), closely related to principal component analysis. The process decorrelates the color channels, amplifies chromatic differences, and then applies the inverse transform to obtain a new representation of the image. This technique is common in image coding and pattern recognition.

The plugin applies the transformation to all pixels of the image and allows selecting different color spaces. Some are well known, such as RGB or Lab; others are variants defined by the author—YDS, YBR, YBK, LDS, and LRE—based on the YUV or Lab spaces. As a general guideline:

  • YDS and LDS usually work better with yellow pigments.
  • YBR and LRE tend to enhance reds.
  • YBK can help distinguish black, blue, and yellow tones.
  • The YXX and LXX options allow configuring custom color spaces.

These settings are starting points, not universal recipes: it is advisable to compare several transformations and avoid interpreting artifacts or noise introduced by processing as pigment.

Resultado del realce cromático de pinturas rupestres de Villar del Humo con DStretch

Installation and basic use

DStretch works as a plugin for ImageJ and requires RGB images, the usual format of digital cameras. According to the official DStretch documentation, the plugin is requested from the author and currently requires a contribution; availability and conditions may change, so it is advisable to check them on its website before installing.

Once the DStretch_.zip file is obtained, it must be copied into the Plugins folder of ImageJ. After restarting the program, the DStretch options will appear in the Plugins menu. To start, open a photograph and run Plugins > DStretch > DStretch… Run.

If a warning appears indicating that an RGB image is required, it is likely that a multichannel image or a stack has been opened. In compatible cases, it can be converted via Image > Color > Stack to RGB. This conversion creates a derived version, so it is recommended to keep the original file unmodified.

You can see examples of DStretch in use in the article “Some examples with DStretch: shelters of the Sierra del Albarracín”.