For each unknown pixel in the synthetic texture, the nearest neighborhoods in the sample texture are found. That is, the neighborhoods in the original image, that are similar to the neighborhood of the current unknown pixel in the synthetic texture, are used to pick the intensity of the current unknown pixel. Refer to the paper for more information. This implementation presents two versions of the synthesis technique. The ﬁrst one is to grow a larger patch, and the second one is to ﬁll holes in an image.
Efros, Alexei A., and Thomas K. Leung. "Texture synthesis by non-parametric sampling." Computer Vision, 1999. The Proceedings of the Seventh IEEE International Conference on. Vol. 2. IEEE, 1999.
Mahmoud Afifi (2019). Texture Synthesis by Non-parametric Sampling (https://www.mathworks.com/matlabcentral/fileexchange/62624-texture-synthesis-by-non-parametric-sampling), MATLAB Central File Exchange. Retrieved .