Variations of images to increase their visibility

The calculus of variations applied to the image processing requires some numerical models able to perform the variations of images and the extremization of appropriate actions. To produce the variations of images, there are several possibilities based on the brightness maps. Before a numerical model, I propose an experimental approach, based on a tool of Gimp, GNU Image Manipulation Program, in order to visualize how the image variations can be. After the discussion of this tool, which is able to strongly increase the visibility of images, the variations and a possible functional for the visibility are proposed in the framework of a numerical model. The visibility functional is analogous to the fringe visibility of the optical interference.

In image processing, the calculus of variations is used for the image reconstruction, for instance denoising and deblurring, and for segmentations [1]. The calculus then requires some numerical models able to create the variations of images and then the minimization of some appropriate actions. To produce the variations of images, there are several possibilities based on the brightness map of the image. Before a numerical calculus, I propose an experimental approach, based on a tool of Gimp, GNU Image Manipulation Program [3], in order to visualize the image variations. After the discussion of this tool, which is able to increase strongly the visibility of images, the variations and a possible functional for the visibility are discussed with a numerical model.

The "Curves" tool.
Let us consider the simple case where the variation of the image is obtained by changing its brightness (more complex variations could be obtained changing shape and position of the objects in the image frame, but this is beyond the aim of this paper). To visualize how the variation can be implemented, let us use the "Curves" tool of the Gimp. "Curves" is used to control brightness, contrast and colour balance quite freely. To open this tool, the path is the following: <Image> Tools > Colour Tools > Curves. A window such as that in the right part of Fig.2 appears. As we open Curves, we see a panel reporting the histogram of the image and a straight line. Note that x-and y-axes have the grey tones as scales. The curve defines how to change the intensity of the image, with respect the diagonal that means the image as it is. Dragging the curve above the diagonal, the intensity is increased; dragging below, the intensity decreased. It is then possible to adjust the channel "Value", which will brighten or darken the image, moving the line up or down. It is also possible to adjust the Red, Blue, Green, and Alpha channels, separately. The curve is also able to redistribute contrast, because a steeper curve gives more contrast, and flat curve ranges look duller. Fig.2 shows an example of the curve manipulation. The original image has only four tones: black, white and two greys. Note the variation of the image on the left, because of the variation of the curve, shown on the right. These curves look like the paths in Fig.1. Let us consider an example of the use of this tool of Gimp, based on the images of two geoglyphs in the Nazca Desert, Peru (Fig.3). The Nazca geoglyphs, known as the Nazca Lines, are the most famous negative geoglyphs of Peru [4]. Included among the UNESCO World Heritage Sites in 1994, the Lines are located in the Nazca Desert, a large region between the towns of Nazca and Palpa. The figures range in size up to several hundred meters and therefore can be better recognized from the air or in satellite imagery. On the Nazca plane, the geoglyphs were made by removing the uppermost surface, exposing the underlying ground, which has a different colour. This technique produces a "negative" geoglyph. The original images, obtained from the Google Maps (see Fig.3), are grey and flat, but adjusting and redistributing the contrast, the geoglyphs becomes quite visible. Therefore, these images show an interesting application of the tool of Gimp in archaeological investigations, in particular for the processing of the satellite images. As demonstrated by several discoveries, the satellites are becoming a fundamental tool for archaeological survey. Sometimes, even the freely available images, such as those of Google Maps, directly or after a suitable processing, can provide some specific information on archaeological remains [5][6][7].

Increasing the visibility
After we have seen how variations of images can be obtained with the curves of the Gimp tool, let us try to define a functional of these curves. That is, we consider the curves of Gimp as the analogous of the paths in Fig.1. Let us indicate them with the index γ. Consider a curve γ as obtained from the panel of the tool: the brightness of the original image changes accordingly and then For each curve γ, we have a brightness distribution b γ (x,y). The average of this brightness is given by: where N x ,N y are the dimensions of the image.
We can define the variance as a functional in the following way: V γ depends on curve γ. This is a functional because Eq.(3) provides a map from curve γ to a real number. To see the behaviour of this functional as γ is varied, let us use again an image of another Nazca geoglyph. The original aerial image, quite grey ad dull is shown at the upper left corner of Fig.4. This is the geoglyph of the Condor, recorded by Raymond Ostertag [8]. The value of the functional is the number reported in the corresponding image. Dragging the curve above or below the diagonal line simply brighten or darken the image: the output images have smaller values V γ . If a flexural point is created in the curve, as shown in the panel at the upper right corner, V γ increases with respect of that of the original image. Moreover, the visibility of the image is strongly increased. The mean value (2) and variance (3) are statistical quantities, that are extensively used in parameterise the images, for applications in several research fields. For instance, as discussed in [9][10][11], a study of these parameters applied to the textural changes in the images of liquid crystalline cells, allows determining new phases and transitions.

To define the visibility
As shown by Fig.4, the functional V γ increases as the visibility of the geoglyph increases. Of course, a high variance V γ is not always corresponding to an increase of visibility. Let us imagine, for instance, changing a grey-tone image in a black and white one: the variance is strongly increased but a large part of details cancelled, and, therefore, their visibility. We know very well that increasing the contrast of images too much, means that several details are lost. We have then to try to find another possible functional which can be a measure of the visibility of details. Here I propose a functional modelled on the problem of the visibility of interference fringes [12]. This physical quantity is also known as the "interference visibility" or "fringe visibility". The interference of waves produces a pattern of the intensities, created by bright and dark fringes. Supposing I max the intensity of the bright and I min that of the dark fringe, the visibility is defined as: min max min max To use this visibility in the image processing, we can define the analogue of the quantities max I , min I in the following manner. We consider the mean value as defined in (2), to separate the pixels in two subsets: one set contains the pixels having brightness greater or equal the mean value, the other has the pixels with b γ less or equal the mean value. Each set has numbers ≥ N , ≤ N of pixels, respectively. For each subset, the following mean values are evaluated: Therefore, the analogous to the intensities are two mean values of the two subsets of the image pixels. In (5), the dependence on γ is explicitly written. Let us define the visibility, analogous to the fringe visibility, as: Assuming this V γ as a functional measuring of the image contrast, and therefore of its visibility, we could try to arrange some calculations in order to maximize it. We could for instance assume a theoretical variation of the brightness of the grey tones in the following manner: where b are the brightness of the original image, and find the parameters a 1 , a 2 , α and β, which maximize (6). These four parameters can span some suitable ranges. In the numerical calculation, I avoided those parameters giving brightness b γ greater than 255 or lower than 0. α and β range from 0.1 to 1.0, a 1 from 0 to 5 and a 2 from 0 to 3.
Let me show you how the variations (7) and the extremization (maximization) of (6) work on the image of the Nazca geoglyph used for Fig.4. Using a grey-tone version, we can have the image in Fig.5. The parameters of the variation giving the maximum value of visibility (6) are α=0.3, β=0.5, a 1 =4.5 , and a 2 = 1.2 . This result is limited to the variations having brightness in the range 0,255. Note that, with respect to the original image (see Fig.4 and [8]), the visibility of the details is strongly increased.

Conclusion
Of course, other functions instead of (7) can be devised and used to create the image variations, and other functionals can be proposed to measure the image visibility. Future papers will be devoted to the discussion of functions and functionals. Here, the aim of the paper was that of illustrating the calculus of variations with an experimental approach. For this approach, I used a tool of Gimp, in order to visualize how the image variations can be. After the discussion of this tool, which is able to strongly increase the visibility of images (quite interesting for archaeological survey), I have proposed a visibility functional analogous to the fringe visibility of optical interference. This approach seems to give good results.