scala application for image binarization