Image Denoising by a Local Clustering Framework