1) download ไฟล์จาก http://www.leptonica.org/source/leptonlib-1.67.tar.gz
2) ทำการแตกไฟล์แล้วเปิด terminal ขึ้นมา เสร็จแล้วเข้าไปในไดเร็คทอรี่โดยใช้คำสั่ง cd
3) รันคำสั่งด้านล่างทีล่ะคำสั่ง
./configure sudo make sudo make install sudo ldconfig
ทำการติดตั้ง tesseract โดยโหลดไฟล์ที่จำเป็นดังต่อไปนี้จาก http://notesalexp.net/lucid/main/t/tesseract/
tesseract-ocr-eng_3.02.02+svn814-1ppa1~lucid1_all.deb libtesseract3_3.02.02+svn814-1ppa1~lucid1_i386.deb tesseract-ocr_3.02.02+svn814-1ppa1~lucid1_i386.deb libtesseract-dev_3.02.02+svn814-1ppa1~lucid1_i386.deb
ทำการติดตั้ง tesseract โดยรันคำสั่งด้านล่างทีล่ะคำสั่ง
sudo dpkg -i tesseract-ocr-eng_3.02.02+svn814-1ppa1~lucid1_all.deb sudo dpkg -i libtesseract3_3.02.02+svn814-1ppa1~lucid1_i386.deb sudo dpkg -i tesseract-ocr_3.02.02+svn814-1ppa1~lucid1_i386.deb sudo dpkg -i libtesseract-dev_3.02.02+svn814-1ppa1~lucid1_i386.deb
ข้อควรจำ: header ของ tesseract จะถูกเก็บไว้ที่ /usr/include/tesseract
ส่วน header ของ leptonica จะถูกเก็บไว้ที่ /usr/local/include/leptonica
ดูตัวอย่างการใช้งาน tesseract ได้ที่เว็บ http://www.sk-spell.sk.cx/simple-example-how-to-call-use-tesseract-library
ในกรณ๊ที่เราใช้ eclipse เป็น editor ให้ทำการคอนฟิก linker โดยคลิ๊กขวาที่โปรเจค properties -> C/C++ Build -> Setting -> GCC C++ Linker -> Libraries ที่ Libraries (-l) ให้เพิ่ม library ดังต่อไปนี้เข้าไป
tesseract lept
No comments:
Post a Comment