A Tristate Filter for Image Denoising Processing