I began with a clean Debian installation.
Dependency notes:
Each build of CHDK only works for a particular firmware version on your camera. My two cameras were identical in every respect except for the firmware. Check the firmware version of each camera independently before trying to install CHDK on them.
The CHDK wiki/manual says that the default button to get into Alt mode on an A2200 is the smiley face button. On mine, it was the 'play' button.
There is no scantailor Debian package, in spite of what the documentation suggests. You have to install it yourself. First, scantailor dependencies are:
Code: Select all
sudo apt-get install build-essential cmake libqt4-dev libjpeg-dev zlib1g-dev libpng-dev libtiff4-dev libboost-all-dev libxrender-dev
Code: Select all
cmake .
make
sudo make install
I think it is easier to try to install chdkptp from source rather than trying to get the binary to work. The reason is that the binary requires the IUP/CD libraries which are themselves quite difficult to install. But if you install from source, you can turn off GUI support and don't have to worry about them.
Once you have built or downloaded chdkptp, you will want to copy both the binary and lua directory to /usr/local/lib. So you will have /usr/local/lib/lua/*.lua and /usr/local/lib/chdkptp after. This is necessary to get chdkptp to run properly with spreads later. But it won't let you run chdkptp from the command line yourself. So I would copy all of the lua files into /usr/local/lib/lua/5.2 as well (assuming you are using lua 5.2). With two complete copies of the lua files, you will be able to use chdkptp manually and this is useful later.
Since you want to use the built-in autorotate plugin for Spreads, you will need to install the jpegtran module. Installing the libjpeg-dev apt package isn't sufficient because that doesn't export python bindings. After much searching, I found that there are a bunch of dependencies to install:
Code: Select all
sudo apt-get install python-dev libffi-dev libjpeg-dev
sudo pip install pycparser
sudo pip install cffi
sudo pip install jpegtran-cffi
Spreads notes:
The current pip package of Spreads is broken, claiming that you are missing 'plugins'. So you want to install Spreads from the repository. Here is the command for doing that (make sure git is installed already):
Code: Select all
sudo pip install git+git://github.com/DIYBookScanner/spreads.git
You need to add a chdkptp_path as shown in the example configuration. But the path should be /usr/local/lib/ instead of what is in the example because the sample is incorrect. You will also want to add in scantailor preferences to your file by hand because those are not automatically added by the configuration. Any other device preferences except focus need to be added by hand to this file as well.
Another problem I ran into is that when I first plugged in the cameras, Spreads kept failing to connect to them. I found out that the connect primitive was returning a device busy error and Spreads was failing to parse that because it was expecting a normal return value. That failure caused an exception so Spreads never retried. A workaround I found is to run chdkptp in another console. Whenever I plug in or turn on a camera, I run 'list' in the chdkptp console and it triggers the busy message and then I can use the camera in spreads.
Once you have chdkptp_path added, you can run spread configure again to assign odd/even cameras. Make sure only one camera is on and connected to the computer at a time. If you have busy problems like I did before, just make sure to run list in chdkptp whenever you plug in a camera. You can also run the focus configuration option. Note that Spreads does not have a separate focus for each camera. It assumes that they are both approximately the same distance from the opposing page.
To take some test pictures, just run 'spread capture testdir' and after taking a couple of shots, look at the results. If you need to adjust configuration settings, just Ctrl-C and re-run. Spreads will not overwrite your pictures, just keep adding to the end. So you can compare results.
If your pages are well-lit, then the default settings will mean that your first test pages are all white. Spreads does not allow you to adjust aperture size (the F number), so you will want to dim the light by making the shutter speed faster. I found that 1/800th of a second was a good exposure time for my A2200 cameras and lighting.
Open issues:
I've installed pdfbeads and selected the pdfbeads module. But it doesn't appear in the allowed items for listing the order of plugins, and the postprocess step does not yield any pdfs.