I set up this page mainly to explain the modification to
hdrprep to the script's author, i.e. Axel Jacobs and the pfs*/hugin
Therefore this a very bare webpage, developer-oriented.
This software is published, as hdrprep, under the GNU General Public
Furthermore this software is to be intended as alpha/unstable, and a
work in progress; in other words USE IT AT YOUR OWN RISK, and make a
backup of your picture set beforehand.
This feature is useful in thoses cases when you don't have a tripod
and/or a remote shutter control.
I changed the command line interface in order to make it possible to
use two "alignment engines", the first one is the original hdrprep one,
i.e. "ale", while the second one makes use of the sift features and
therefore depends on a different software package, i.e. autopano-sift
and hugin. (only the autooptimiser executable from the hugin package is
used). See the usage section below for more details.
In my tests the ale engine performs better, and you need to satisfy the
hugin/autopano-sift dependencies only if you want to use the sift
running "hdrprep_modified -h" now gives the following output:
hdrprep : Align digicam images and fix EXIF information.
Prerequisites : ALE, Anti-Lamenessing Engine (only for ale engine), hugin and autopano-sift (for sift engine), Perl::Image::ExifTool
-h|--help : print this help message and exit -v|--verbose : verbose output -a|--align ale|sift : align images -r|--redo ale|sift : re-create aligned images, requires -a to be run first -e|--exif : fix exposure tags in EXIF header -k|--keep : don't remove intermediate ALE output -d|--directory : directory for storing the aligned images in (default: aligned) -q|--quality : quality setting for aligned images (default: 80) -n|--noorder : do not order my exposure (default: order)
Mainly my modifications include the specification of a "aligning
engine", i.e. you have to specify on the command line either "-a sift"
or "-a ale".
Another small modification: I also made the "sorting by exposure" step
optional: default choice if you do not specify anything is to be
backward compatible, i.e. to sort by exposure. WARNING!!!!
I am not a perl coder (I guess "monger" is the word I should use) at
all. Actually I had to learn just a little bit of perl only to modify
hdrprep, therefore I had to code a piece of the algorithm in octave. A
consequence is that, for now, you need to have the find_offset.m
file in the "present working directory" so that hdrprep can find it.
Usually you can accomplish this by giving the command:
~$ ln -s path/to/find_offset.m .
Hopefully someone else more skilled can fix this problem.
My modifications comprise of the modified hdrprep perl script and the
exectuable octave script "find_offset.m".
You can find them here:
octave script: find_offset.m
modified hdrprep: hdrprep_modified
How it works.
Firstly the script gets the horizontal/vertical shifts and rotations
from either ale or sift (absolute values, i.e. relative to base image),
then we call an octave script to find the cropping values, i.e. the
values that enable us to crop out the region common to all the images.
This octave step makes use of affine matrices to map the four corner
points of each image to the "base image's space", then it uses a pretty
naive algorithm to maximize the common area.
Details in the sourcecode ;-)
My name is Giuseppe Rota, and I guess that for this project all
interested parties can contact me via the pfs*/hugin google groups.