Improve the reliability of the threshold selection, especially in the chip's edges