In order to reduce visually inconsistent results caused by sudden change of pixel values between patches
a novel image completion method based on dynamic-scale patch matching and layer-wise optimization was proposed.During patch searching
the number of candidate patches for the current layer was calculated through the analysis of prior knowledge and structure features;meanwhile
a multi-scale patch searching model was given to obtain the best candidate patches.Those patches constituted the feasible solution space for image completion.With the intrinsic characteristics and relevance of adjacent patches taken into consideration
image completion was abstracted as a chain optimization problem.The layer-wise chain optimization model was established and solved through dynamic programming.The optimal patches for the current layer were obtained and the image was repaired from the outside to the inside layer by layer.Experimental results demonstrate both the effectiveness and efficiency of the proposed algorithm for various natural images.