run with dark_on_light be both 0 and 1 and merge the text result
calculating extremal region using floodfill
SLIC0 code with OpenCV wrapper