include global/adaptive thresholding