Contrast enhancement with the noise removal by a discriminative filtering process