Pulse-coupled neural network for denoising salt and pepper noise