The digital image is one of the discoveries that play an important role in various aspects of modern human life. These findings are useful in various fields, including defense (military and non-military), security, health, education, and others. In practice, the image acquisition process often suffers from problems, both in the process of capturing and transmitting images. Among the problems is the appearance of noise which results in the degradation of information in the image and thus disrupts further processes of image processing. One type of noise that damages digital images is salt and pepper noise which randomly changes the pixel values to 0 (black) or 255 (white). Researchers have proposed several methods to deal with this type of noise, including median filter, adaptive mean filter, switching median filter, modified decision based unsymmetric trimmed median filter, and different applied median filter. However, this method suffers from a decrease in performance when applied to images with high-intensity noise. Therefore, in this research, a new filtering method is proposed that can improve the image by randomly exploring pixels, then collecting the surrounding pixel data from the processed pixels (kernel). The kernel will be enlarged if there are no free-noise pixels in the kernel. Furthermore, the damaged pixels will be replaced using the mean data centering statistic. Images enhanced using the proposed method have better quality than the previous methods, both quantitatively (SSIM and PSNR) and qualitatively.