Image denoising with geometrical thresholds