Image Restoration by Spatial Clustering