Matrix Binary Image Dataset Preprocessing