nguyenq / tess4j

Java JNA wrapper for Tesseract OCR API
Apache License 2.0
1.59k stars 372 forks source link

Error when removing lines from image #177

Closed Degubi closed 4 years ago

Degubi commented 4 years ago

I get no image output/any errors in console when using this code with my own image. Works fine with dave-orig.png from the test code or scanned-table.jpg from https://github.com/nguyenq/lept4j/issues/12

Code:

 var file = Leptonica1.pixRead("bordered.png");
 var pixs1 = LeptUtils.removeLines(file);
 var pixs2 = Leptonica1.pixRotate90(pixs1, 1);
 var pixs3 = LeptUtils.removeLines(pixs2);
 var pixs4 = Leptonica1.pixRotate90(pixs3, -1);

 Leptonica1.pixWrite("result.png", pixs4, ILeptonica.IFF_PNG);

Image: bordered

Degubi commented 4 years ago

Posted to wrong repo...