my tess4j in java with a error "Failed loading language 'osd'"

 public static void main(String[] args) throws TesseractException {     ITesseract instance = new Tesseract();     instance.setLanguage("osd");     instance.setDatapath("/usr/local/Cellar/tesseract/3.04.01_1/share/");     String tent = instance.doOCR(new File("/Users/qwf/Desktop/111.jpg"));     System.out.println(tent); } 

when i run the code ,there is 2 error:

Failed loading language 'osd'

Tesseract couldn't load any languages!

i don't konw how tess4j find there is any languages can be use

and when i run the "tesseract --list-langs" in iterm

the result is "eng osd"

i think the tesseract works well but why tess4j don't work

i have set the TESSDATA_PREFIX environment variable

echo $TESSDATA_PREFIX
output : /Users/qwf/tessdata/3.04.01_1/

i install tessdata by homebrew

Replay

Category: tesseract Time: 2016-07-29 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.132 (s). 12 q(s)