使用tesseract进行OCR解析不返回正确的数据。我使用以下链接安装了tesseract-ocr-3.02.02.tar.gz:
http://miphol.com/muse/2013/05/install-tesseract-ocr-on-ubunt.html
tesseract已正确安装,我使用命令行进行了相同的测试。
/usr/local/bin/tesseract /var/www/html/xxx/test/test.jpg /var/www/html/xxx/test/output1 -l eng
or
/usr/local/bin/tesseract /var/www/html/xxx/test/test.jpg /var/www/html/xxx/test/output1
但它显示的结果如下:
-M
NATURAL WORKS
LOMFANV
mvmc: nu amer number: anon
Kev one Detils
uduln mm
u-dun-5: Nm1n,1mn
sin‘-.nm..u 34Wnt1¢IuD-EYSDANHY
nufi-.n..u.u
my-=um.=—zu.uum
u.u-u.._.n £1149
Iuynunnntni smawxmwawan
ram lhn: Bnan
xmams
am: manam-grmsusqn m m
Ana. mg 1 Sn lmgfidd avail:
ua._ we 2
any Enrllllh-Em
um Anaaamm
v-an an: 514 mu
Ia-my mm m-gum. (Great Enlam)
khan-. nmmsum
nu.-no) Axum:
Bnan nmaws
Sn lulfidd swung
um-r-gt-am
Amagmm
314 mu
umai w:-gown (Gas! Enlam)
unum Works unmullli
vo Em 1rm1
Eurllllh-Em
wst Mdards
m mx
urn.
Ema .m@...auua».nasm-ruamm .a
wax»; www mmanwmmaruamm m
mam
Sm lad:-euun:
Q-mivluine n.._.n
ham
:1:
224
Mntrahs muss-m Mn: Vua Babylmm
1 mm mm
m..«y-.:ay-u-name
Bflmal: us:
umanasnn: mm
nmnuumsnn mm
um-.musnman: us:
9-pp-v-;a..m..iu-1 an
nhl nus
对于图像: enter image description here
我将使用shell_exec(PHP)来读取文本并在linux平台上工作。请告诉我错误的地方。