## 5 Methodology
### Recuperation of Altar and Presbytery Murals Using Digital Image Processing
#### 5.2.2 Proposed Work Process for Recovering Highly Deteriorative Murnals
DStretch(r) Digital Image Processing and Analysis  
DStretch(r) is a piece of software originally created for rock art research that brings out faint pictographs and unclear details using digital image processing [22]. The successful results obtained when recording rock art engravings and paintings led to the software becoming widely used throughout the scientific community in several countries [54; 55; 56; 57; 58; 59]. DStretch(r) is a plugin for ImageJ. This plugin is a piece of opensource software for digitally processing scientific images. It is distributed by Donationware licensing, which is a licencing model that supplies fully operational unrestricted software to the user and requests a donation be paid to the developer. DStretch(r) uses decorrelation stretching, a technique commonly used for remote sensing tasks that artificially enhances the colour separation of an image, thus producing a second image referred to as a false-colour image [60]. This technique combines contrast stretching with decorrelation techniques. The primary purpose of these techniques is to enhance the colour differences of highly correlated images, thereby making it easier to visualise the different elements within an image. In highly correlated images the digital level of the different colour spaces is very close; put simply, the colours of neighbouring pixels are very similar [61], making it difficult to distinguish between the different elements within an image. DStretch(r) starts by applying the Principal Component Analysis--Karhunen-Loeve Transform transformation technique (PCA-KLT). The longest standing and probably most well-known multivariate analysis technique is PCA. It was discovered by [PERSON] [62] and later developed by [PERSON] [63] and [PERSON] [64]. In Engineering, PCA is normally known as the Karhunen-Loeve Transform, hence the abbreviation PCA-KLT. This technique provides the best linear estimate for any given vector range. This transform is commonly used in image coding systems and even more so in shape and object recognition strategies, i.e., face recognition, finger print recognition, written characters, etc. DStretch(r) allows users to enhance colours (stretch) and to even out variations. It uses inverse transform to map or correlate colours back to an approximation of the original. DStretch(r) produces a transformation matrix that is applied to all of the colours in the image. The software supports several default colourspace options for users to choose from: (a) standard colourspaces (RGB or LAB); (b) customised colourspaces created by Harman (YDS, YBR, YBK, LDS, LRE) that are based on LAB colourspaces. These are simply the three hues of RGB light measured under specific lighting conditions in combination with particular colours: L (light, black-white), A (red-green), B (yellow-blue). As such, the YDS colourspace enhances yellow pigments better, YBR and LRE the reds, and YBK the blacks, blues and yellows; (c) colourspaces that users can tailor to their own needs (YXX and LXX) [30,65]. In conclusion, DStretch(r) contains a wide array of filters that can be applied to digital images, either directly or in combination, in order to enhance certain colours. The result is a false-colour image that reveals motifs that are nearly invisible to the naked eye, differences in colour pigments, and differences in superposition. User Interface and Technical Requirements for Original Image  
On the PC, the end-user firstly has to install ImageJ and then add the DStretch(r) plugin file. To start processing images the end-user then needs to open ImageJ. Once opened, the program asks the end-user which image they would like to analyse. The image is then viewed in the user interface (see Figure 8). DStretch(r) colour enhancements can be easily selected using the default colourspaces buttons displayed in the user interface beneath the image. When a button is selected, the corresponding decorrelation stretch algorithm for that colourspace is applied.