At present, image restoration has become a research hotspot in computer vision. The purpose of digital image restoration is to restore the lost information of the image or remove redundant objects without destroying the integrity and visual effects of the image. The operation of user interactive color migration is troublesome, resulting in low efficiency. And, when there are many kinds of colors, it is prone to errors. In response to these problems, this paper proposes automatic selection of sample color migration. Considering that the respective gray-scale histograms of the visual source image and the target image are approximately normal distributions, this paper takes the peak point as the mean value of the normal distribution to construct the objective function. We find all the required partitions according to the user’s needs and use the center points in these partitions as the initial clustering centers of the fuzzy C-means (FCM) algorithm to complete the automatic clustering of the two images. This paper selects representative pixels as sample blocks to realize automatic matching of sample blocks in the two images and complete the color migration of the entire image. We introduced the curvature into the energy functional of the p-harmonic model. According to whether there is noise in the image, a new wavelet domain image restoration model is proposed. According to the established model, the Euler–Lagrange equation is derived by the variational method, the corresponding diffusion equation is established, and the model is analyzed and numerically solved in detail to obtain the restored image. The results show that the combination of image sample texture synthesis and segmentation matching method used in this paper can effectively solve the problem of color unevenness. This not only saves the time for mural restoration but also improves the quality of murals, thereby achieving more realistic visual effects and connectivity.