I'm trying to read an image with mathematical equations using tess4j in java. However, I think its overlapping the characters and not able to combine English with Equations. Is this a trained data issue? How can I fix this. Below is my code .
ITesseract tess = new Tesseract();
try {
tess.setLanguage("eng+equ");
String imageURL = "http://www.blah.com/images/test-exercises/exercises.png";
URL url = new URL(imageURL);
BufferedImage img = ImageIO.read(url);
String result = tess.doOCR(img);
System.out.println(result);
} catch (TesseractException e) {
e.printStackTrace();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Output that I get
a) ↥⊝≍⋉↥⋮↥↸⊣⊽≍ k) ↥⋅⊈⋉⇣≁⇃⋅↸≍⋉⇣⋮↸⋅∠⊽≁≍
⊔ ⇃⋅↸
3x ↸≍ ↸ e
7 4:7, ≓ ≓ z, 77
b) 1+ 1 1 1) 3” z») ∙≁−−
↥ ↥ ⋅
r) 17:71:3770 m) ≩∅⊣⇇⋜∅≁↥≻⊣∅≁⊈⋗⋉↖⋮↼↴
3 .
d) ↼↴≍⊣⋜⋮↥↥≍⋉↥∘ n) ⊈⇉≁≍⋮≹⋜⋉⊢⇃⋅∖⊢⊢≩≍≻
9) Liz: o) ⇇⋜↨≍≁⊈⋅↸⋮↥∘⋅−≁⊈⋉↥≟≍