## 2 Visual Saliency Estimation
### Multi-Scale Saliency  
The estimation of the visual saliency of a point on the surface depends on the points used as reference, and in particular on the possible presence of salient points in the reference considered, as mentioned in the previous section. Another important parameter is the scale of observation, which is even more the case when analysing the appearance of surfaces,  
Figure 8: Multi-level saliency map estimated with the statistics descriptors calculated from an RTI acquisition of the watch dial: Saliency map multi-level \(SP_{100\%}\), \(SP_{99.95\%}\), \(SP_{99.5\%}\), \(SP_{99\%}\). Figure 7: Level factor saliency map estimated with the statistics descriptors calculated from an RTI acquisition of a watch dial with micro-scratches: **(a)** Saliency map \(SP_{100\%}\); **(b)** Saliency map \(SP_{99.95\%}\); **(c)** Saliency map \(SP_{99.95\%}\); **(d)** Saliency map \(SP_{99\%}\). where it is well known that scale effects are particularly important in perception. Thus, an anomaly may appear more or less salient when the surface is observed locally or as a whole, and the saliency must therefore integrate these scale factors. For example, many small and weak surface anomalies can be attenuated by the presence of large anomalies in the neighbors or their presence among the reference surface points. Conversely, changing the scale of observation by varying the size of the neighborhood around the calculation point can increase the saliency value of the weakest anomalies and facilitate their detection/evaluation. The calculation of the scale factor saliency makes it possible to solve this problem using a sliding window, as described in Equation (4) and illustrated in Figure 9.  
\[x_{(t,i,j)} =x_{(i^{\prime},j^{\prime})},i^{\prime}\in[i-t/2;i+t/2],j^{\prime} \in[j-t/2;j+t/2], \tag{4}\] \[\mathit{Mahal}^{*}_{(t,i,j)}(Y,X) \equiv\mathit{Mahal}^{*}(Y_{(t,i,j)},X_{(t,i,j)}),\]  
where \(X_{(r,i,j)}\) corresponds to the sliding window centered on pixel \((i,j)\) of size \(t\times t\) pixels and \((i^{\prime},j^{\prime})\) are the coordinates of the pixels in the sliding window. At each sliding window position, the saliency of the points contained in the window is calculated by taking these same points as a reference. However, in order to take into account that the salience varies with the distance from the considered neighborhood, the calculation is weighted using a 2D Gaussian function, thus allocating more weight in the estimation of the salience to the points close to the calculation point. At each saliency calculation, a weight matrix is filled with the Gaussian function when moving the sliding window. The different parameters of the algorithm are then the size of the window \(Si\), the translation step of the window \(Tr\), and the standard deviation of the Gaussian function \(St\). The result of the scale factor salience can be seen in Figure 10. It can be seen that the number of small anomalies increases when the size of the sliding window decreases. Moreover, we observe that the area and the level of salience of anomalies detected with a small window seems to decrease. This reduction is due to the proportionality (or not) of salient points inside the sliding window. Indeed, when taking the whole of the surface, the surface anomalies are proportionally less numerous than the other points of the surface. However, by decreasing the observation scale, the surface anomalies become proportionally more numerous when they are inside the observation window. Figure 9: Diagram of scale factor visual saliency. Similar to multi-level saliency, it is possible to calculate multi-scale saliency from several scale factor saliency measurements, as described in Equation (5) and shown in Figure 11.  
\[Mahal^{*}_{(T,i,j)}(Y,X)\equiv\frac{1}{\sum_{k=0}^{N}w_{k}}\sum_{k=0}^{N}Mahal^{*} (Y_{(T_{k},i,j)},X_{(T_{k},i,j)})\times w_{k}, \tag{5}\]  
where \(\left\{ \begin{array}{l}T\text{ is the vector of factors scale}\\ w\text{ is the vector of weight associate to }T\\ N\text{ is the length of }T\text{ and }w\end{array}