An algorithm to suppress Gaussian noise is presented, based on clustering (grouping) gray levels. The histogram of a window sliding across the image is divided into clusters, and the algorithm outputs the mean level of the group containing the central pixel of the window. This filter restores well the majority of noisy pixels, leaving only few of them very deviated, that can be finally restored with a common filter for impulsive noise, such as a median filter. In this paper the clustering filter gp is described, analysed and compared with other similar filters.