While this almost has nothing to do with opencv, i thought id post this here in case someone has a good solution.
So i came up with some code for using tesseract with opencv, and it works pretty well. But, only black letters on white background. I tried doing a bit flip_not(src,dst) but that, while it works, obviously just swaps the situation.
Is there a way to invert the color conditionally? Say, invert when black letters on white and not invert when white on black ? Or threshold it ?
Thanks, Alef