In this paper, the most common pepper noise in grayscale image noise is investigated in depth in the median filtering algorithm, and the improved median filtering algorithm, adaptive switching median filtering algorithm, and adaptive polar median filtering algorithm are applied to the OTSU algorithm. Two improved OTSU algorithms such as the adaptive switched median filter-based OTSU algorithm and the polar adaptive median filter-based OTSU algorithm are obtained. The experimental results show that the algorithm can better cope with grayscale images contaminated by pretzel noise, and the segmented grayscale images are not only clear but also can better retain the detailed features of grayscale images. A genetic algorithm is a kind of search algorithm with high adaptive, fast operation speed, and good global space finding ability, and it will have a good effect when applied to the threshold finding of the OTSU algorithm. However, the traditional genetic algorithm will fall into the local optimal solution in different degrees when finding the optimal threshold. The advantages of the two interpolation methods proposed in this paper are that one is the edge grayscale image interpolation algorithm using OTSU threshold adaptive segmentation and the other is the edge grayscale image interpolation algorithm using local adaptive threshold segmentation, which can accurately divide the grayscale image region according to the characteristics of different grayscale images and effectively improve the loss of grayscale image edge detail information and jagged blur caused by the classical interpolation algorithm. The visual effect of grayscale images is enhanced by selecting grayscale images from the standard grayscale image test set and interpolating them with bilinear interpolation, bucolic interpolation, NEDI interpolation, and FEOI interpolation for interpolation simulation validation. The subjective evaluation and objective evaluation, as well as the running time, are compared, respectively, showing that the method of this paper can effectively improve the quality of grayscale image interpolation.