Android bitmap binarization with Niblack's method and its derivatives