Thursday, March 3, 2011

Decapod for RoBook Scanner(Phase II)


Introductions:

Welcome back brethren,here once again we'll re figure out the application of Decapod.Its been a long time since the team had paused their development,and I cant wait to tweak the current version simply because most of the program flavor or add-ons are changing so quick .Through these, I needed to recompile Decapod for a chance to enhance its application to its changing flavors(add-ons).


Objectives:
Recompile /install Decapod with its new release add-ons
Debugging a Decapod scripts
Debugging the Decapod source code

Requirements:

sudo apt-get install
libaa1                           ascii art library 
libc6                             Embedded GNU C Library: Shared lib
libcdk5                         C-based curses widget library
libexif12                       library to parse EXIF files
libgphoto2-2                 gphoto2 digital camera library 
libgphoto2-port0          gphoto2 digital camera port library 
libjpeg62                      The Independent JPEG Group's JPEG 
libncurses5                  shared libraries for terminal hand 
libpopt0                        lib for parsing cmdline parameters
libreadline5                  GNU readline and history libraries 

Note : These are the release packages available as the date of writings; other libraries are also with their latest version
Decapod verion. 4.0
libgphoto2 version 10.1
gphoto2-10 version
Ocropus packages:
openfst-1.2.7.tar.gz
iulib-0.4.tgz

Methodology:
Download and Install
Re evaluate the integration of a new compiled Decapod
Test Cameras

root@localhost# sudo apt-get remove libgphoto2-*
root@localhost# sudo apt-get remove gphoto2
root@localhost# sudo apt-get install build-essential
root#localhost# sudo apt-get sudo apt-get install libpopt* libexif*

#for libgphoto2
root@localhost# wget http://sourceforge.net/projects/gphoto/files/libgphoto/2.4.10.1/libgphoto2-2.4.10.1.tar.gz
root@localhost# tar -xvf libgphoto2-2.4.10.1.tar.gz
root@localhost# cd libgphoto2-2.4.10.1/
root@localhost# ./configure
root@localhost# make
root@localhost# sudo make install
root@localhost# cd ..
root@localhost# rm -Rf libgphoto2-2.4.10.1/


# for gphoto2
wget http://sourceforge.net/projects/gphoto/files/gphoto/2.4.10/gphoto2-2.4.10.tar.gz
tar -zxvf gphoto2-2.4.10.tar.gz
cd gphoto2-2.4.10/
./configure
make
sudo make install
cd ..
rm -Rf gphoto2-2.4.10/
rm -f gphoto2-2.4.10.tar.bz2

1)A basic OCRopus installations
root@localhost# hg clone $release https://iulib.googlecode.com/hg/ iulib
root@localhost# hg clone $release https://ocropus.googlecode.com/hg/ ocropus
root@localhost# hg clone $release https://ocroswig.ocropus.googlecode.com/hg/ ocroswig
root@localhost# hg clone $release https://ocropy.ocropus.googlecode.com/hg/ ocropy
root@localhost$# wget -nd http://openfst.cs.nyu.edu/twiki/pub/FST/FstDownload/openfst-1.2.7.tar.gz openfst-1.2.7.tar.gz
root@localhost# hg clone $release https://pyopenfst.googlecode.com/hg/ pyopenfst
date;

2)Or,from Decapod-4.0 package modify "decapod-ocropus.sh" script to replace contents from line 56 to bottom
clone_and_install_ocropus_lib https://iulib.googlecode.com/hg/ iulib
clone_and_install_ocropus_lib https://ocropus.googlecode.com/hg/ ocropus
download_and_install http://openfst.cs.nyu.edu/twiki/pub/FST/FstDownload/openfst-1.2.7.tar.gz openfst-1.2.7.tar.gz openfst-1.2.7 openfst 1.2.7
clone_and_make_ocropus_lib https://pyopenfst.googlecode.com/hg/ pyopenfst
clone_and_make_ocropus_lib https://ocroswig.ocropus.googlecode.com/hg/ ocroswig
clone_and_install_python_lib https://ocropy.ocropus.googlecode.com/hg/ ocropy

# compile iulib
cd iulib
sudo sh uninstall
sudo sh ubuntu-packages
scons -j 4 sdl=1
sudo scons -j 4 sdl=1 install
cd ..
date;

# compile ocropus
cd ocropus
sudo sh uninstall
sudo sh ubuntu-packages
scons -j 4 omp=1
sudo scons -j 4 omp=1 install
cd ..
date;

# compile openfst
tar -zxvf openfst-1.2.7.tar.gz
cd openfst-1.1
./configure
make -j 4
sudo make install
cd ..
date;

# compile ocroswig
cd ocroswig
make
cd ..
date;

# compile ocropy
cd ocropy
sudo python setup.py install
cd ..
date;

# compile Python bindings for openfst
cd pyopenfst
make
cd ..
date;

Detail(1) Libgphoto2 and gphoto2 file dependencies-flow chart


Detail(2) Decapod stereo capture


Detail(3)
Detail(4)

Remarks:

Hints:
1)If you have a G10 which has an older version firmware and you want to update it. Please go to this website and input the serial number of your G10,do it carefully by reading the instruction manual (PDF) to avoid damage in your camera
http://www.canon.co.jp/imaging/dcp/firm-e/psg10/download.html?Submit=Go+to+the+download+page

2) Remove the SD Card of your G10 camera it is necessary to avoid the mounting of G10 memory card drive (it will cause conflict in USB ID and ports).

3)If you can not use a mercurial downloader "hg clone" and its connection is being aborted to that google.code server -one thing is certain. You dont have the certificate to access its "https://" host server.Better install openssl first in your computer so that you can work smoothly to a mercurial copy or downloading.
root@localhost# sudo apt-get openssl
Warning!
if you would change your proxy then (1) reinstall your openssl , (2) delete the ssl certificate; otherwise you can't get the host server (for security reasons).
Conclusions:

No comments:

Post a Comment