Pixel classification algorithms for noise removal and signal preservation in low-pass filtering for contrast enhancement