Added some thresholding code, (both adaptive and Otsu binarization