## 4 Some Illustrations of the Effects of Parameters \(p\) and \(\lambda\)
### Algorithmic Formulation of the Mathematical Model
#### 4.1.2 Towards an Adaptive Model  
In the literature, the parameter \(p\) is often treated as static in the studies of this model. Otherwise, in our study, we propose to adapt parameter \(\lambda\) in order to control the smoothing effects due to parameter \(p\). The aim is to take account of the details in the image. \(\lambda\)_model evaluation process to control the \(p\) effects_: the parameters \(p\) and \(\lambda\) play a crucial role in the dynamical smoothing process. Therefore, we calculate the difference in colour between a pixel and its neighbours in the following way. The gradient was chosen in accordance with the objective that had to be achieved. _Implementation of the parameter control process_: In a preliminary step, we calculate the gradient of the image in order to detect prominent areas as well as noise. The idea is to vary the parameters in relation to the gradient in order to preserve details (areas of interest) and smooth out other areas. However, since the gradient is a local operator, it is sensitive to noise and also generates very large anomalous values that alter the process. For this reason, it is advisable to check the values obtained in each pixel in order to reduce the effect of the noise. _Efficient interval for the gradient_: the three following types of pixels are focused on:  
* Noise-affected pixels;
* Noise-unaffected pixels;
* Outline pixels. We would like to point out that the gradient values should be found by taking into account pixels (i.e., noise-affected and contour pixels which have the least effect on neighbouring pixels) that affect the process as little as possible. Thanks to these values, we will be able to create intervals that will allow us to select relevant values of the gradient. To do this, these intervals, defined by the interquartile deviation of the gradient distribution, are given by the statistical theory of data dispersion (see [17]) in the series according to the following formula  
\[\left[Q_{1}-k(Q_{3}-Q_{1})\right.,\,Q_{3}+k(Q_{3}-Q_{1})\right] \tag{28}\]where \(Q_{1}\) and \(Q_{3}\) are the first quartile and the third quartile, respectively. The positive constant \(k\) chosen as either 1.5 or 3 was discussed by [PERSON] et al. in in [18]. These authors concluded for \(k\) that 1.5 is a suitable value for most situations. According to them, there are cases where 3 may be an appropriate compromise. Thus, the following intervals were chosen:  
\[I_{1.5}=[Q_{1}-1.5(Q_{3}-Q_{1})\,,\,Q_{3}+1.5(Q_{3}-Q_{1})] \tag{29}\]  
and  
\[I_{3}=[Q_{1}-3(Q_{3}-Q_{1})\,,\,Q_{3}+3(Q_{3}-Q_{1})] \tag{30}\]  
For the interval \(I_{1.5}\), the outer values correspond to major aberrant values (such as noise). _Study of the sturdiness of these criteria_: After a series of tests on an image database, we found that the interval \(I_{1.5}\) is noise-sensitive and allows one to consider areas to be smoothed. Algorithm 2 implements the process, and Figure 3 shows the effects of such a choice on two images. Figure 3: Illustration of the interval \(I_{1.5}\) effects. The (**first line**) shows the original images, the (**second line**) shows the result of the edge and noise detection, and the last line shows the result of the proposed classification. More specifically, the pixels that have a gradient value in the interval are shown in red and the pixels with a value outside of this interval are shown in green. Pixels that participate in the dynamic processing are shown in red. They will be submitted to variations in \(p\) and \(\lambda\) depending on the gradient value. Pixels that will not be modified are shown in green. Their values are located in the highest gradient areas. The \(\lambda\) values force the smoothing process to be neutralised. The adaptive model effects are shown in Figure 4.  
We can see that the areas that are considered to be visually homogeneous ([PERSON]'s skin texture, for example) are smoothed in order to further standardise the colours. On the contrary, the contours with a high gradient are preserved.