Bug introduced in 11.0 and persisting through 11.3
From this answer, I doubt the capability to work on single character. So I give some test to verify this possibility. You can get my test imgs
by this code
imgs = Binarize[
Import[#]] & /@ {"https://i.stack.imgur.com/PvuFe.png",
"https://i.stack.imgur.com/bXHyv.png",
"https://i.stack.imgur.com/6Uxpo.png"};
Note the TextRecognize[#, "Character"] & /@ imgs
will get nothing. We can get a example from the documentation in Examples/Applications, that indicate the appropriate mask maybe can improve the performance to get a character, but I don't very like this method. Because it is hard to build a mask for characters "i"
,"j"
like
TextRecognize[#,
Masking -> MorphologicalTransform[#, "BoundingBoxes", Infinity],
RecognitionPrior -> "Character"] & /@ imgs
{{H,1,O},{m,Y},{d,d}}
Question
- Any workaround that can improve the recognition quality when
TextRecognize
work on single character
Or
- If we want to improve the recognition quality by mask, how to build correct mask?
I desire to make my this answer better by TextRecognize
.
TextRecognize[#, "Character"] &
is not recognized syntax, as indicated by the stream of errors it generates. Furthermore, there is no indication in the documentation of that usage. Why do you suppose that it should work? $\endgroup$