Python implementation of basic and Otsu thresholding algorithms.