Thresholding function

An auxiliary function that finds a region of significance in the local correlation map by thresholding.