SetCvImage
Is there a way to set OpenCV images directly like the one in Python Tesseract? Opencv always comes in handy for preprocessing and it would be a waste of resources to save it to a file and read it again
I haven't used OpenCV myself but I'm open for contributions if you'd like to implement it. Currently, you can just convert it into a PIL.Image object using Image.fromarray or Image.fromstring (examples here) and use tesserocr's SetImage method.
Please, can you tell us how to use OpenCV instead of PIL ? With actual settings, PIL saved image produce grey pixels around characters on black-white png.
Thanks
Perhaps you're better off asking for help on StackOverflow, how to inter-change between OpenCV and PIL objects. A quick solution would be saving the image to a file and operate on it instead of a PIL object.
On a side-note, supporting OpenCV should be more-or-less similar to what I'm doing with PIL right now. I'm just not working with imaging at the moment to work on that but I hope someone else would.
Hi
Just asked on SO: https://stackoverflow.com/questions/47833315/pil-produce-grey-pixels-in-opencv-image
How to pass a non-PIL file to tesserocr ?