因为centos自带的低版本TESSERACT无法识别中文,所以我们来说说如何在centos下编译安装TESSERACT的最新版本。
1.首先我们来安装TESSERACT所需要的依赖库leptonica
wget https://leptonica.googlecode.com/files/leptonica-1.69.tar.gz
tar -zxvf leptonica-1.69.tar.gz
cd leptonica-1.69
./configure; make; make install
2.编译安装TESSERACT的最新版本
cd ..
wget https://tesseract-ocr.googlecod...
使用该自动脚本之前,需要先安装TESSERACT和ImageMagick,安装使用教程请看如何在Centos下识别图片中的文字并存储到txt中。
#!/bin/bash
# Script name: image2text.sh
# Author: lxy.me (http://lxy.me )
# URL: http://lxy.me/centos-remote-picture-identification-text-script.html
# Description: this script will use tesseract and ImageMagick to convert an image to text.
# Script usage:...