Tôi gặp sự cố khi chạy công cụ tesseract-ocr trên Linux. Tôi đã tải xuống dữ liệu ngôn ngữ RUS và đặt nó vào thư mục tessdata (/ usr/local/share/tessdata). Khi tôi đang cố gắng để chạy Tesseract với lệnh tesseract blob.jpg out -l rus
, nó sẽ hiển thị một lỗi:Lỗi chạy Tesseract
Error opening data file /usr/local/share/tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory.
Failed loading language eng
Tesseract couldn't load any languages!
Could not initialize tesseract.
Theo compiling guide, tôi sử dụng export TESSDATA_PREFIX='/usr/local/share/'
để chỉ thư mục tessdata của tôi. Có lẽ tôi nên chỉnh sửa bất kỳ tệp cấu hình nào? Tesseract cố tải các tệp dữ liệu 'eng' thay vì 'rus'.
Ảnh chụp màn hình: http://i.stack.imgur.com/I0Guc.png
Đây là mã C++ ... – DarkSkull
@DarkSkull, vâng, đây là mã C++ được thử nghiệm trong Debian GNU/Linux. Như bạn thấy, Russel Crowe có vấn đề với chức năng TessAPI :: Init (NULL, "rus"). Có nghĩa là kiểm tra mã nguồn Tesseract (phương pháp lớp TessAPI). –