You can call Lept4J's *LeptUtils* 
<http://tess4j.sourceforge.net/docs/lept4j-docs-1.6.0/net/sourceforge/lept4j/util/LeptUtils.html>
.*removeLines* 
<http://tess4j.sourceforge.net/docs/lept4j-docs-1.6.0/net/sourceforge/lept4j/util/LeptUtils.html#removeLines-net.sourceforge.lept4j.Pix->
(*Pix* 
<http://tess4j.sourceforge.net/docs/lept4j-docs-1.6.0/net/sourceforge/lept4j/Pix.html>
 pixs).

http://tess4j.sourceforge.net/docs/index.html


On Monday, July 10, 2017 at 3:24:12 AM UTC-5, GuillaumeQ wrote:

> I have in a document some text written in a table. the lines of the table 
> are pretty close to the text. when i doOCR, i dont get the text between the 
> lines. is there any way to improve this performance and read some text 
> close to lines? the image is attached
>
> my code:
>
> def ocrToStream(){
>         def imageFile = new File("path\\to.PNG")
>          ITesseract instance = new Tesseract1() // JNA Direct Mapping
>         instance.setDatapath("<parentPath>") // replace <parentPath> with 
> path to parent directory of tessdata
>         instance.setLanguage("fra")
>
>         try {
>             def result = instance.doOCR(imageFile)
>             System.out.println(result)
>         } catch (TesseractException e) {
>             System.err.println(e.getMessage())
>         } catch (IOException e) {
>             System.err.println(e.getMessage())
>         }
>     }
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/d040f7a8-9cd6-4830-b29c-7175e3be58e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to