Mathematical proof of our thresholding method