An extended Perona-Malik model based on probabilistic models