Median filtering
Median filtering evaluates a small neighborhood around each pixel and uses a middle value instead of allowing an unusually bright or dark sample to dominate. This makes it useful for isolated specks and salt-and-pepper noise. As the filtering effect increases, larger image structures may remain recognizable while fine lines, tiny highlights, and narrow texture patterns are simplified or removed.