# Image Inpainting Based on Multi-Patch Match with Adaptive Size
## 4 Experimental Results
### Image Restoration  
#### 4.1.1 Instance Test  
We first show our inpainting results qualitatively and quantitatively by making a few instance tests. To make a comparison, several previous patch-based methods are also applied to our experiment, including [PERSON]'s exemplar-based inpainting method [10], [PERSON]'s method based on structure tensor [17], and [PERSON]'s method using adaptive size based on gradient histograms [18]. One of the most representative diffusion-based methods, CDD model [4] proposed by [PERSON] et al., is also involved in our test (3 k iterations employed). These instances include a portrait: [PERSON] (\(512\times 512\)); two natural scenes: House (\(512\times 512\)), Sculpture (\(256\times 256\)); along with two pure texture images: Irregular pattern Texture I (\(640\times 640\)) and regular pattern Texture II (\(640\times 640\)) from [PERSON] dataset [21; 22]. These images are masked with black color that represents for missing areas. Both subjective and objective evaluation are compared among the proposed and previous methods mentioned above, where the subjective evaluation is the visual effects of completed images, as shown in Figures 7-11. Figure 6: Illustration of a multi-patch match in single iteration. Figure 8: Comparison of inpainting results for House (\(512\times 512\)): (**a**) Ground truth; (**b**) incomplete image; (**c**) CDD model [4]; (**d**) [PERSON]’s method [10]; (**e**) [PERSON]’s method [17]; (**f**) [PERSON]’s method [18]; (**g**) proposed method. Figure 10: Comparison of inpainting results for irregular pattern Texture I (\(640\times 640\)): (**a**) Ground truth; (**b**) incomplete image; (**c**) CDD model [4]; (**d**) [PERSON]’s method [10]; (**e**) [PERSON]’s method [17]; (**f**) [PERSON]’s method [18]; (**g**) proposed method. Figure 7: Comparison of inpainting results for Lena (\(512\times 512\)) (**a**) Ground truth; (**b**) incomplete image; (**c**) CDD model [4]; (**d**) [PERSON]’s method [10]; (**e**) [PERSON]’s method [17]; (**f**) [PERSON]’s method [18]; (**g**) proposed method. Subjective visual effects in Figures 7-11 show that compared with other methods, our results have obtained the least defects, and are most similar to the ground truth. As for the Lena (Figure 7), especially in those areas with rich textures and strong linear structures, such as the corner of eyes and the edge of the hat, our method will automatically generate a smaller target patch, ensuring that structures and textures are better preserved. In Reference [10], the fixed size of patch may not work well especially for areas with rich details, since the patch size can easily exceed the scale of the texture element, which could easily lead to stitching error and structure discontinuity. Reference [17] also uses a fixed size of patch, although a few of flaws still occur, benefiting from its improved priority model based on structure tensor, the algorithm has also achieved relatively good inpainting results. Reference [18] utilizes an adaptive size of patch based on gradient histogram; however, this method will generate a larger patch when connecting strong edges, as discussed above, this may lead to incorrect propagation of structures. Different from patch-based methods, Reference [4] does not copy patches from elsewhere, and performs better when dealing with such slim scratches by diffusion. As for the House (Figure 8), previous patch-based methods have occurred mismatch marked in red circles. This is because in the process of finding the best sample patch, both References [10] and [18] search the sample patch from the entire source region without filtering, and they are easier to match an inappropriate candidate if the match metric does not work well.