A fast automatic algorithm for image denoising by a regularization method