Open yanhom1314 opened 6 years ago
老铁,我也是 mac,你遇到了下面这样的问题吗?
获取图片成功/Users/XXX/projects/test/MillionHero/target/classes/20180110140809.png
Failed loading language 'chi_sim'
Tesseract couldn't load any languages!
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000000136923ea8, pid=89440, tid=0x0000000000002603
#
# JRE version: Java(TM) SE Runtime Environment (8.0_144-b01) (build 1.8.0_144-b01)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.144-b01 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [libtesseract.dylib+0x12ea8] _ZN9tesseract9Tesseract15recog_all_wordsEP8PAGE_RESP10ETEXT_DESCPK4TBOXPKci+0xaa
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/zyd/projects/test/MillionHero/hs_err_pid89440.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
@Lnybb https://github.com/nguyenq/tess4j/issues/34 官方回复是没做过macos的兼容测试,我没找到解决方案
执行这个
brew install tesseract
如果还有问题多多交流
@Lnybb 我也遇到了这个问题,你解决了没?
我也遇到了这个问题,解决了么?
@ZbkSou 执行brew安装tesseract之后还是同样的问题
MAC 上安装tesseract 并下载了全部 语言文件 到 tessdata 目录后,问题依旧。但是,如果将识别语言设置为 “eng” ,运行正常。没明白问题到底出在了哪里,在 https://github.com/nguyenq/tess4j/issues/26 这个问题中,虽然问题是关注状态,但是后面几个伙计的问题跟这个一样一样的,也是将被识别语言设置为 chi-sim 后无法正常执行,
@CnPeng 改成eng后,出现文字识别乱码,有遇到同样的问题吗?
MAC好像暂时不支持,建议使用百度OCR,具体使用参考wiki里面的步骤介绍
这个是权限的问题,最简单的方式是通过sudo运行,就可以了
Mac上老是报错:Unable to load library 'tesseract': Native library ... 其实,是因为在Mac上需要安装tesseract,解决办法查看官方wiki,https://github.com/tesseract-ocr/tesseract/wiki 可以使用brew安装,brew install tesseract,安装成功后,就可以运行代码了