The curvature filtering algorithm optimizes the variational model quickly by constructing a filter operator
but the total variational curvature filtering and Gaussian curvature filtering are easy to cause over smooth denoising with poor salt and pepper noise removal. A weighted curvature filtering algorithm based on image median gray similarity function is proposed
in which the variance of the median gray similarity function depends on the highest frequency subband coefficient of wavelet transform
which can prevent the image from being too smooth and improve the ability of removing salt and pepper noise. Therefore
the local Gaussian curvature projection operator and the local total variational curvature projection operator are weighted by the median gray level similarity function
and the local weighted Gaussian curvature projection operator and the local weighted total variational curvature projection operator are iterated respectively until the total energy of the output image gradient meets the stop condition. Experimental results show that the denoising effect of weighted total variation curvature filter and weighted Gaussian curvature filter based on image median gray similarity function is better than the traditional total variation curvature filter and Gaussian curvature filter.