The advantage of the nearest neighbor interpolation method is that the calculation speed is faster because the calculation amount is small and the algorithm is relatively simple compared to the other two algorithms. However, to get the gray value of the sampling point, only the image pixel closest to the sampling point is used as the target pixel, and the effect of other adjacent pixels is not taken into account, so the gray value becomes apparent after the image is resampled. The discontinuity significantly degrades image quality, resulting in mosaic and jagged [20].