OBJECTIVES: In exemplar-based image inpainting algorithms, there are often issues with the calculation of patch similarity for matching, suboptimal strategies for selecting matching patches, and low inpainting speed.METHODS: This paper first uses the variable scale cross-scan block line progressive scan to solve the problem of slow scanning speed and invalid priority formula. Then, an improved weight similarity formula is used for searching to solve the problem of poor computing strategy for similar matching patches. The search range of matching patches gradually increases from small to large until globally searching for similar matching patches to improve the efficiency of inpainting. To further improve the correctness of matching patch selection, this paper uses six levels of priority matching criteria for screening.RESULTS: The experimental results show that the inpainting effect of the proposed method is significantly improved in subjective vision, and the structural similarity (SSIM), peak signal-to-noise ratio (PSNR), and inpainting speed of the inpainting results are all improved.CONCLUSION: For different types of images, the proposed method has a better inpainting effect and higher inpainting speed than the other three advanced methods.