2008年12月26日 星期五

OCRopus安裝測試

安裝流程(Ubuntu 7.04)


1.安裝前準備


libpng (with headers)

libjpeg (with headers)

libtiff (with headers)

分別下指令

sudo apt-get install libpng

sudo apt-get instal libjpeg

sudo apt-get instal libtiff


#安裝OpenFst(OpenFst-beta-20080408)

下載壓縮擋,解壓縮後進入資料夾目錄

下指令make all


2.安裝iulib


下載壓縮擋,解壓縮後進入資料夾目錄

執行./configure

接著make

最後make install


3.安裝tesseract (OCR軟體,Ubuntusynaptic內可以安裝)


下載壓縮檔,tessdata有兩個檔案一個是主檔另外一個是支援的

語系檔

執行./configure

接著make

最後make install

#安裝遇到java出問題


缺少3jar需要自己補上

luajava-1.1.jar

piccolo-1.2.jar

piccolox-1.2.jar


4.最後安裝OCRopus


下載壓縮擋,解壓縮後進入資料夾目錄

執行./configure

會出現讀不到OpenFst 小弟有將編譯號的OpenFst丟進/usr/local/include 不過還是有檔案Loss

因此你可以執行下列程式略過OPenFst

執行./configure --without-fst

這時又會出現新的錯誤會LossLeptonica

小弟重新編譯安裝leptonica還是搞不定,所以我也給他略過

執行./configure --without-leptonica

configure完成

接著make

最後make install

安裝完成


5 . 實作


打開terminal在您的想要辨識圖片的資料夾下執行

> ocroscript recognize sample.jpg > out.html

上面這句話的意思就是將samlpe.jpg ORC後產出out.html


最重要的是結果: 打開out.html 沒東西=.= <<<失敗了>>>

我有測試一下支援的檔案 目前 jpg,png都可以不過都產生空白的html

看起來是沒有錯誤..很怪還要再研究,也許跟上面disable兩個套件有關...


ps.上去國外網站看OCRopus的容易使用度竟然只有1/5....難怪那麼難搞=.=


參考網址:

http://sites.google.com/site/ocropus/install-0-3

http://code.google.com/p/ocropus/

http://209.85.175.132/search?q=cache:uUk7hkAMUywJ:ocrocourse.iupr.com/introduction-to-ocropus+run+OCRopus&hl=zh-TW&ct=clnk&cd=1&gl=tw&client=firefox-a

沒有留言:

張貼留言