@antimatter15 any recommendations for optimizing Tesseract?
Then it just binarizes the image by whether the internal histogram is larger than the corresponding value of the color on the external histogram.
It's a strategy that works quite well on machine-printed text, but probably less effective than existing strategies when it comes to scans or photographs.