# Inpainting in Discrete Sobolev Spaces: Structural Information for Uncertainty Reduction
## 8 Conclusions  
In this paper, we have introduced a new functional to investigate the inpainting problem: it is strictly connected with the definition of Sobolev spaces but formalized in discrete setting. We have replaced the usual MSE-like metric (mean square error) with a more precise one, in the Sobolev spaces sense, for the determination of the correct values to inpaint. The results we achieved show that the new functional, taking into account finite differences, provides reconstructions of good quality. The improvement is, on one hand, theoretically predictable (functions being equal, or similar, for higher order derivatives \"resemble\" more each other), and, on the other hand we provided effective practical examples. In particular, the new introduced functional formulation carries, in the reconstructed area, precise structural information, depending on the size and shape of the neighborhood, which strongly conditions the final quality of the reconstructions. An application proof of this behavior stands in the capability of the new method to reproduce and connect isophotes, even in complex cases, not necessarily privileging the propagation along straight lines. Moreover, the new formulation plays two complementary roles: on one hand it speeds up the convergence toward a minimum value; on the other hand, it reduces the number of local minima, lowering the probability to end the process in one of them. To explain the role of the neighborhood in the inpainting process, we have introduced a statistical model, thanks to which we have proved that considering only the principal directions is not sufficient to achieve correct reconstructions. In addition, from our investigation of the role played by the causality condition, we have shown it represents a starting point in the direction of the uncertainty reduction of the entire process: this role has never been explicitly considered before in the literature of the exemplar-based inpainting-by-patch procedures. Following in the direction of this reduction, we formalized a new priority index, giving an applicative explanation of the roles played by each one of its terms: the inpainting energy \(E_{T}\), the trustability \(C\), and the finite differences \(D_{M}\). We proved that all of them concur together to the uncertainty reduction. Figure 28: Inpainting of textures from [50] (a) ink; (b) marble; (c) paper; (d) metal. From left to right: the pristine image; the image to inpaint (\(\Omega\) in black); the inpainted result; the used training set (same scale of the images). In addition, we proposed and implemented a new dynamic for the update of the priority, with the introduction of the completely new concept of the error redistribution among neighbor points. The numerous numerical results, both on synthetic and on natural images, have confirmed the expectations: in terms of the mathematical model, in terms of the values we calculated, and in terms of the parameters in the applications. Again, we remark that our method is not parameter-dependent, the values of the parameters having been explicitly determined exploiting uncertainty assumptions. Our work shows that a deeper understanding of the exemplar-based inpainting-by-patch procedure effectively brings to a reduction in the needed information to achieve correct results, compared with the algorithms of the same class. Thanks to our new model, we proved a meaningful reduction of the number of neighbor points needed for the reconstruction, when compared with some well known state of the art algorithms using the same inpainting approach. Our new proposed method reduces the uncertainty in the inpainting process, boosting the amount of information that can be inferred from the training set. We obtained better results (also reducing the training set) than the ones achieved merely increasing the size of the neighborhood in the direction of a more efficient use of the known information hidden in what we referred to as the _structure_ of the given image.