But I see that (like tesseract) it cannot recognize different styles (italics, bold, monospace...) - not only it seems to just translate into pure (UTF) characters, it shows confusion on terms in alternative styling.
But I see that (like tesseract) it cannot recognize different styles (italics, bold, monospace...) - not only it seems to just translate into pure (UTF) characters, it shows confusion on terms in alternative styling.
- for instance, take the cropped bitmap of the term and compare it with the renderings of the styled variants of the recognized word and see what is more similar, and/or, check the thicknesses, spacing, slanting in the bitmap of the word...
I think it would be intriguing to develop it.
Better techniques are required than the raw one I used: for example, finding the best overlapping of the two bitmaps, maybe with some sort of gradient descent over a few pixels distance in panning and scaling - this should give a near to 100% correspondence in the correct case (regular vs italics vs bold vs monospaced vs BI, BM, IM, BIM), but only if the font used for the comparison is the same.
By the way: in the fact that while adjusting the overlapping the computed difference should increase with the gradient when the style corresponds (R on R), but may be random in other cases (R on I, R on M, though not R on B), there could be another key in the heuristic.