An auxiliary function that finds a region of significance in the local correlation map by thresholding.
Thresholding(localCorr, m, n, sz)is all local correlations
is the number of rows of localCorr
is the number of columns of localCorr
is the sample size of original data (which may not equal m or n in case of repeating data).
R is a binary matrix of size m and n, with 1's indicating the significant region.