Fixed threshold of binarization. Fixed format of rect.
Changes for archiving