convert findBorders from bmp to mat