Download and Install Decapod 0.3

Introduction

Decapod 0.3 is a "source release" meaning that you will need to download and install the source code manually. In the future we plan to have a simpler method of deploying Decapod.

Decapod itself is composed of multiple parts, and takes advantage of other open source projects available for Linux:

  • Decapod Server: Executes user actions such as supporting the cameras, image manipulation, and generating PDF files.
  • Decapod Client: Provides a user interface for the Decapod Server. It is accessible from within Firefox 3.6 and takes advantage of JavaScript to offer a pleasant user experience.
  • Decapod Scripts: Helps provide functionality for PDF generation and image manipulation and processing.
  • Ocropus: For PDF generation, character recognition, layout detection, and font generation. Much of Ocropus' functionality is not available in this release, but will be in the future.
  • ImageMagick, tiffcp: For image conversions required to generate a PDF file.

This guide helps you acquire and install these parts to get Decapod 0.3 running.

Before Starting

This documentation makes a few assumptions:

  1. Ubuntu 9.10 and Firefox 3.6 have been installed, and your system meets the recommended requirements for this release.
  2. You are reasonably comfortable with downloading, compiling, and installing Ubuntu packages and other software in Linux.

By the end of the project, we hope to make distribution and installation much easier.

Complete Install Script

If you prefer getting all the commands listed to install Decapod 0.3 without extra explanation, please see the Decapod 0.3 Installation Script.

Packages

The following are generally useful, and some things rely on them:

  • mercurial
  • scons
  • hardinfo
  • hwinfo
  • subversion
  • cvs
  • python-tk
  • swig
  • checkinstall
  • python-cherrypy3
  • python-numpy
  • python-imaging
  • python-scipy
  • python-matplotlib
  • python-reportlab
  • python-opencv
  • valgrind
  • python-gnome2
  • python-simplejson

To install the above packages:

sudo apt-get install mercurial scons hardinfo hwinfo python-simplejson
sudo apt-get install subversion cvs python-tk swig checkinstall
sudo apt-get install python-cherrypy3 python-numpy python-imaging
sudo apt-get install python-scipy python-matplotlib python-reportlab
sudo apt-get install python-opencv valgrind python-gnome2

Note: the above is split into multiple lines to improve formatting on this wiki page.

Install gphoto2

Before installing gphoto2, the following packages must be installed:

  • autoconf
  • libtool
  • gettext
  • libusb-dev
  • libpopt-dev

Install the above packages by running:

sudo apt-get install autoconf libtool gettext libusb-dev libpopt-dev

Now you are ready to download and install gphoto2 by running the following commands:

### Install libgphoto2 v2.4.8 and gphoto2 v2.4.7

mkdir gphoto2
cd gphoto2

# Install libgphoto2 v2.4.8

wget http://sourceforge.net/projects/gphoto/files/libgphoto/2.4.8/libgphoto2-2.4.8.tar.gz/download
tar -zxvf libgphoto2-2.4.8.tar.gz
cd libgphoto2-2.4.8
./configure
make
sudo make install
sudo ldconfig
cd ..

# Install gphoto2 v2.4.7

wget http://sourceforge.net/projects/gphoto/files/gphoto/2.4.7/gphoto2-2.4.7.tar.gz/download
tar -zxvf gphoto2-2.4.7.tar.gz
cd gphoto2-2.4.7
./configure
make
sudo make install
sudo ldconfig

cd ../..

Confirm that gphoto2 is working by running the following commands:

gphoto2 -v
gphoto2 --list-ports

### If cameras are attached, run the following commands:
gphoto2 --auto-detect
gphoto2 --capture-image-and-download

gphoto2 -v should list 2.4.7 as the gphoto2 version, and 2.4.8 as the libgphoto2 version.

Possible issues:

  • wrong version listed - uninstall any previous version. Confirm that the correct gphoto2 is being used by typing which gphoto2
  • command not found - move the gphoto2 binary into /usr/bin or create an appropriate symbolic link.

gphoto2 Installation Notes and Tips

Notes:

  • Decapod 0.3 is developed and tested using gphoto2 2.4.7 and libgphoto2 2.4.8. If you have difficulty controlling your supported cameras, you may need a different version of gphoto2 and/or libgphoto2.
  • Run ldconfig to flush the library cache after installing each of libgphoto2 and gphoto2, otherwise you may get an error when trying to run gphoto2.

Tips:

  • Uninstall any previous version of gphoto2 and libgphoto2 before starting
  • Decapod does not require memory cards to be installed in cameras. In fact, not having memory cards in the camera will help prevent problems where the operating system attempts to mount and lock the memory card for its own use.
  • If your camera is listed as supported, but does not appear to be working, you may want to try switching the USB mode to PTP in the camera's built-in menu.

Install Ocropus

It is recommended that you create an ocropus directory first before following the link below. Do this by:

mkdir ocropus
cd ocropus

Now, download and install Ocropus by following the instructions here: http://code.google.com/p/ocropus/wiki/InstallTranscript. Once you have completed those steps, return here and continue with "Install Decapod" below.

Important: Use Ocropus 0.4.4

Use the Ocropus 0.4.4 release. Any other release has been untested with Decapod 0.3 and may not install properly.

Install Decapod

Before installing Decapod, ensure that the following packages are installed.

libtiff-tools
imagemagick

Install these packages by running:

sudo apt-get install libtiff-tools imagemagick

In the 0.3 release, Decapod comes in two parts:

  1. supporting Decapod scripts
  2. the Decapod server
### Download Trunk Version of Decapod Server

hg clone https://ui.decapod.googlecode.com/hg/ -r decapod-0.3 decapod-0.3
cd decapod-0.3/
svn co https://source.fluidproject.org/svn/fluid/infusion/tags/infusion-1.2/ infusion
cd ..

### Install Decapod PDF Generation Script

cd decapod-0.3/
hg clone https://genpdf.decapod.googlecode.com/hg/ decapod-genpdf
cd decapod-genpdf/src/
hg update -C decapod-0.3
hg update decapod-0.3
sudo scons -j 4 install
sudo python setup.py install
cd ../..

# *Note:* If you get "ocropus not found" type error, please go back to
# the Ocropus install script (http://code.google.com/p/ocropus/wiki/InstallTranscript)
# and perform the "Compile Ocropus" section.

### Install Decapod Stitching script

hg clone https://stitching.decapod.googlecode.com/hg/ decapod-stitching
cd decapod-stitching/
hg update decapod-0.3
sudo python setup.py install
cd ../..

Post-Install Checklist

  • Installed gphoto2 2.4.7 and libgphoto2 2.4.8
  • Installed ocropus
  • Installed decapod server and supporting scripts
  • Installed any missing packages.
  • confirmed that cameras can capture images using the gphoto2 --capture-image-and-download command. (optional)

Running Decapod

Before starting Decapod, you will need to edit the ./decapod/components/server/dserver.conf file to match your local directory:

[/]
#Modify this path to point to where decapod lives on your system
tools.staticdir.root = "/home/user_name/decapod"

Once tools.staticdir.root has been modified, you can start the Decapod Server:

cd decapod/components/server
python dserver.py

Then open Firefox 3.6 and in the location bar open:

http://localhost:8080/

Where to go from here, and getting help

If all went well, you should see the Decapod interface. At this point you can check out the Decapod 0.3 User Guide.

If you had problems installing Decapod 0.3, here is a good recommended course of action:

  • Go through this guide again and ensure all the necessary software components are installed properly.
  • Make sure Ocropus 0.4.4 is properly installed and the correct version used.

If you need further assistance, you can contact the Decapod team by: