my adaptive thresholding code output