Started implementing Kittler&Illingworth thresholding method