implemented toledos algorithm for binarisation separately.