https://wiki.panotools.org/api.php?action=feedcontributions&user=BBBright&feedformat=atomPanoTools.org Wiki - User contributions [en]2024-03-29T15:03:21ZUser contributionsMediaWiki 1.35.3https://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=14819Hugin Compiling Ubuntu2013-01-25T20:12:23Z<p>BBBright: </p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 12.04. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut|Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few times, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if it does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.:<br />
<br />
<pre><br />
apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need a deeper understanding of the building process if you want to:<br />
<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
<br />
That knowledge is beyond the scope of this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''25 January 2013''': The build instructions for the most recent versions of enblend, libpano13, and hugin have been updated for 'buntu 12.04LTS. A lot of information applying to previous releases has been deleted in an effort to make the page more readable. If you're building on an earlier release, be sure to click the "View History" tab above and check the build details around the time your 'buntu version was released.<br />
<br />
'''9 May 2011''': The integration of the python_scripting development branch brings new dependencies and a new build-time configuration switch for Hugin. See changes in the documentation below. swig2.0 is officially distributed only with Natty (11.04 onwards). If you have an older Ubuntu version you will either have to forego the python scripting feature or find an alternative swig2.0 (either a PPA or build it yourself).<br />
<br />
'''2 May 2011''': If you are using an earlier version of Ubuntu than 11.04, there is a chance that your Mercurial version is too old for grabbing updates. New (non-critical security) updates to a program do not get added to old versions of Ubuntu, so any new changes will need to be added manually. When running Mercurial (pull, update, etc), you may get an error like<br />
<br />
<pre><br />
abort: requirement 'dotencode' not supported!<br />
</pre><br />
<br />
To fix this, you can use the package archive from Mercurial PPA Packagers and get the latest release:<br />
<br />
<pre><br />
sudo apt-add-repository ppa:mercurial-ppa/releases<br />
sudo apt-get update<br />
sudo apt-get install mercurial<br />
</pre><br />
<br />
'''5 March 2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you religiously follow the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install the latest unstable version of the tools. While they are likely to work in most cases, there is no guarantee and they are not recommended for a production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
== Building Environment ==<br />
<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get. In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu)), enter:<br />
<br />
<pre><br />
sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb \<br />
libc6-dev libgcc1 cmake pkg-config help2man checkinstall<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake:<br />
<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > /etc/apt/sources.list.d/debian-experimental.list<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first. To build libpano13 we need some libraries and particularly their development ("dev") packages:<br />
<br />
<pre><br />
sudo apt-get install zlib1g-dev libpng12-dev libjpeg-dev libtiff4-dev<br />
</pre><br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<br />
<pre><br />
cd libpano.hg<br />
hg pull<br />
hg up<br />
cd ..<br />
</pre><br />
<br />
Now start the building process. Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
<pre><br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<br />
<pre><br />
make<br />
</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<br />
<pre><br />
sudo make install<br />
sudo ldconfig<br />
</pre><br />
<br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-dev compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install libtiff4-dev libopenexr-dev libboost-system-dev \<br />
libboost-filesystem-dev libboost-graph-dev libboost-thread-dev \<br />
freeglut3-dev libglew-dev libxi-dev libxmu-dev libplot-dev libgsl0-dev \<br />
liblcms2-dev<br />
</pre><br />
<br />
The most recent version of Enblend (4.2) also requires version 1.9 of the VIGRA computer vision library. Unfortunately, 'buntu versions up to and including the forthcoming 13.04 (Raring Ringtail) only provide version 1.8 of the VIGRA library, so you'll have to build your own, as follows:<br />
<br />
<pre><br />
cd ~/src<br />
wget http://hci.iwr.uni-heidelberg.de/vigra/vigra-1.9.0-src.tar.gz<br />
tar -zxvf vigra-1.9.0-src.tar.gz<br />
cd vigra-1.9.0<br />
cmake .<br />
sudo checkinstall<br />
sudo ldconfig<br />
</pre><br />
<br />
The <code>''"sudo checkinstall"''</code> step will ask you a few questions (respond with the default answers), and then create and install a package which can later be removed with synaptic or dpkg -r. If you're not worried about being able to cleanly remove the VIGRA library at a later date, you can substitute <code>''"sudo make install"''</code>.<br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<br />
<pre><br />
cd enblend.hg<br />
hg pull<br />
hg update<br />
cd ..<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<br />
<pre><br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend*.deb<br />
</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in the synaptic package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev freeglut3-dev libglew-dev libboost-dev \<br />
libboost-thread-dev libboost-regex-dev libboost-filesystem-dev \<br />
libboost-iostreams-dev libboost-system-dev libboost-signals-dev \<br />
gettext liblapack-dev libxi-dev libxmu-dev libtclap-dev liblensfun-dev<br />
</pre><br />
<br />
If you want to build hugin with python scripting functionality, you will also need a copy of the python development library and swig2.0. Unfortunately, the swig2.0 package is only included in Natty (11.04) or better. If you are on Lucid or Maverick, you can obtain a swig2.0 package by enabling the Hugin PPA:<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
</pre><br />
<br />
Then (for all versions from Lucid onwards) execute:<br />
<br />
<pre><br />
sudo apt-get install python-dev swig2.0<br />
</pre><br />
<br />
You could install libpano13 on your system with the command below. But it is recommended that you build your own libpano13 (see section [[Hugin_Compiling_Ubuntu#Building_Libpano13|above]]), since the version of libpano13 in the Ubuntu repositories is probably too old. Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA. If going this last route, you can add it as shown above.<br />
<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. If you follow the instructions on this page to build ExifTool and/or Enblend, you don't need to install them this way.<br />
<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Otherwise, you need to clone the repository and decide which version/branch to build with:<br />
<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.build<br />
cd hugin.build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo \<br />
-DBUILD_HSI:BOOL=ON -DSWIG_EXECUTABLE=/usr/bin/swig2.0<br />
</pre><br />
<br />
The last line of the above cmake statement is for python scripting. The first switch activates the scripting interface (which is deactivated by default because it does not work simply out of the box on all supported platforms) and the second switch fixes a bug in the CMake script to find swig. Self-compiled swig does not need the -DSWIG_EXECUTABLE switch since it is found automatically by the CMake script.<br />
<br />
If you get an error building, try removing the last line of the above cmake statement. Another cause may be a wrong version of libpano13, even if you built it yourself. Go back and check that you are using a (newer) stable branch. Try switching to libpano13-2.9.18 (run hg update -C libpano13-2.9.18 in the proper folder), rebuild as instructed above, and try again.<br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
If you are building for install on your own machine only, -DDISABLE_DPKG=ON will significantly speed up the package generation. Do not distribute packages built this way, they don't have proper dependencies. This is primarily meant for developers doing cycles of fix-compile-install-test.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it.<br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
Point your browser to ~/src/hugin/hugin.hg/src/hugin/html/index.html and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]</div>BBBrighthttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=14818Hugin Compiling Ubuntu2013-01-25T19:58:40Z<p>BBBright: /* Building Libpano13 */</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 12.04. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut|Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few times, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if it does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.:<br />
<br />
<pre><br />
apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need a deeper understanding of the building process if you want to:<br />
<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
<br />
That knowledge is beyond the scope of this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''25 January 2013''': The build instructions for the most recent versions of enblend, libpano13, and hugin have been updated for 'buntu 12.04LTS. A lot of information applying to previous releases has been deleted in an effort to make the page more readable. If you're building on an earlier release, be sure to click the "View History" tab above and check the build details around the time your 'buntu version was released.<br />
<br />
'''9 May 2011''': The integration of the python_scripting development branch brings new dependencies and a new build-time configuration switch for Hugin. See changes in the documentation below. swig2.0 is officially distributed only with Natty (11.04 onwards). If you have an older Ubuntu version you will either have to forego the python scripting feature or find an alternative swig2.0 (either a PPA or build it yourself).<br />
<br />
'''2 May 2011''': If you are using an earlier version of Ubuntu than 11.04, there is a chance that your Mercurial version is too old for grabbing updates. New (non-critical security) updates to a program do not get added to old versions of Ubuntu, so any new changes will need to be added manually. When running Mercurial (pull, update, etc), you may get an error like<br />
<br />
<pre><br />
abort: requirement 'dotencode' not supported!<br />
</pre><br />
<br />
To fix this, you can use the package archive from Mercurial PPA Packagers and get the latest release:<br />
<br />
<pre><br />
sudo apt-add-repository ppa:mercurial-ppa/releases<br />
sudo apt-get update<br />
sudo apt-get install mercurial<br />
</pre><br />
<br />
'''5 March 2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you religiously follow the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install the latest unstable version of the tools. While they are likely to work in most cases, there is no guarantee and they are not recommended for a production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
== Building Environment ==<br />
<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get. In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu)), enter:<br />
<br />
<pre><br />
sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb \<br />
libc6-dev libgcc1 cmake pkg-config help2man checkinstall<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake:<br />
<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > /etc/apt/sources.list.d/debian-experimental.list<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first. To build libpano13 we need some libraries and particularly their development ("dev") packages:<br />
<br />
<pre><br />
sudo apt-get install zlib1g-dev libpng12-dev libjpeg-dev libtiff4-dev<br />
</pre><br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<br />
<pre><br />
cd libpano.hg<br />
hg pull<br />
hg up<br />
cd ..<br />
</pre><br />
<br />
Now start the building process. Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
<pre><br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<br />
<pre><br />
make<br />
</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<br />
<pre><br />
sudo make install<br />
sudo ldconfig<br />
</pre><br />
<br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-dev compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install libtiff4-dev libopenexr-dev libboost-system-dev \<br />
libboost-filesystem-dev libboost-graph-dev libboost-thread-dev \<br />
freeglut3-dev libglew-dev libxi-dev libxmu-dev libplot-dev libgsl0-dev \<br />
liblcms2-dev<br />
</pre><br />
<br />
The most recent version of Enblend (4.2) also requires version 1.9 of the VIGRA computer vision library. Unfortunately, 'buntu versions up to and including the forthcoming 13.04 (Raring Ringtail) only provide version 1.8 of the VIGRA library, so you'll have to build your own, as follows:<br />
<br />
<pre><br />
cd ~/src<br />
wget http://hci.iwr.uni-heidelberg.de/vigra/vigra-1.9.0-src.tar.gz<br />
tar -zxvf vigra-1.9.0-src.tar.gz<br />
cd vigra-1.9.0<br />
cmake .<br />
sudo checkinstall<br />
sudo ldconfig<br />
</pre><br />
<br />
The <code>''"sudo checkinstall"''</code> step will ask you a few questions (respond with the default answers), and then create and install a package which can later be removed with synaptic or dpkg -r. If you're not worried about being able to cleanly remove the VIGRA library at a later date, you can substitute <code>''"sudo make install"''</code>.<br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<br />
<pre><br />
cd enblend.hg<br />
hg pull<br />
hg update<br />
cd ..<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<br />
<pre><br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend*.deb<br />
</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in the synaptic package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev freeglut3-dev libglew-dev libboost-dev \<br />
libboost-thread-dev libboost-regex-dev libboost-filesystem-dev \<br />
libboost-iostreams-dev libboost-system-dev libboost-signals-dev \<br />
gettext liblapack-dev libxi-dev libxmu-dev libtclap-dev liblensfun-dev<br />
</pre><br />
<br />
If you want to build hugin with python scripting functionality, you will also need a copy of the python development library and swig2.0. Unfortunately, the swig2.0 package is only included in Natty (11.04) or better. If you are on Lucid or Maverick, you can obtain a swig2.0 package by enabling the Hugin PPA:<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
</pre><br />
<br />
Then (for all versions from Lucid onwards) execute:<br />
<br />
<pre><br />
sudo apt-get install python-dev swig2.0<br />
</pre><br />
<br />
You could install libpano13 on your system with the command below. But it is recommended that you build your own libpano13 (see section [[Hugin_Compiling_Ubuntu#Building_Libpano13|above]]), since the version of libpano13 in the Ubuntu repositories is probably too old. Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA. If going this last route, you can add it as shown above.<br />
<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. If you follow the instructions on this page to build ExifTool and/or Enblend, you don't need to install them this way.<br />
<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Otherwise, you need to clone the repository and decide which version/branch to build with:<br />
<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.build<br />
cd hugin.build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo \<br />
-DBUILD_HSI:BOOL=ON -DSWIG_EXECUTABLE=/usr/bin/swig2.0<br />
</pre><br />
<br />
The last line of the above cmake statement is for python scripting. The first switch activates the scripting interface (which is deactivated by default because it does not work simply out of the box on all supported platforms) and the second switch fixes a bug in the CMake script to find swig. Self-compiled swig does not need the -DSWIG_EXECUTABLE switch since it is found automatically by the CMake script.<br />
<br />
If you get an error building, try removing the last line of the above cmake statement. Another cause may be a wrong version of libpano13, even if you built it yourself. Go back and check that you are using a (newer) stable branch. Try switching to libpano13-2.9.18 (run hg update -C libpano13-2.9.18 in the proper folder), rebuild as instructed above, and try again.<br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
If you are building for install on your own machine only, -DDISABLE_DPKG=ON will significantly speed up the package generation. Do not distribute packages built this way, they don't have proper dependencies. This is primarily meant for developers doing cycles of fix-compile-install-test.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it.<br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]</div>BBBrighthttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=14817Hugin Compiling Ubuntu2013-01-25T19:53:14Z<p>BBBright: /* For Distributors */</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 12.04. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut|Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few times, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if it does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.:<br />
<br />
<pre><br />
apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need a deeper understanding of the building process if you want to:<br />
<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
<br />
That knowledge is beyond the scope of this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''25 January 2013''': The build instructions for the most recent versions of enblend, libpano13, and hugin have been updated for 'buntu 12.04LTS. A lot of information applying to previous releases has been deleted in an effort to make the page more readable. If you're building on an earlier release, be sure to click the "View History" tab above and check the build details around the time your 'buntu version was released.<br />
<br />
'''9 May 2011''': The integration of the python_scripting development branch brings new dependencies and a new build-time configuration switch for Hugin. See changes in the documentation below. swig2.0 is officially distributed only with Natty (11.04 onwards). If you have an older Ubuntu version you will either have to forego the python scripting feature or find an alternative swig2.0 (either a PPA or build it yourself).<br />
<br />
'''2 May 2011''': If you are using an earlier version of Ubuntu than 11.04, there is a chance that your Mercurial version is too old for grabbing updates. New (non-critical security) updates to a program do not get added to old versions of Ubuntu, so any new changes will need to be added manually. When running Mercurial (pull, update, etc), you may get an error like<br />
<br />
<pre><br />
abort: requirement 'dotencode' not supported!<br />
</pre><br />
<br />
To fix this, you can use the package archive from Mercurial PPA Packagers and get the latest release:<br />
<br />
<pre><br />
sudo apt-add-repository ppa:mercurial-ppa/releases<br />
sudo apt-get update<br />
sudo apt-get install mercurial<br />
</pre><br />
<br />
'''5 March 2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you religiously follow the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install the latest unstable version of the tools. While they are likely to work in most cases, there is no guarantee and they are not recommended for a production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
== Building Environment ==<br />
<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get. In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu)), enter:<br />
<br />
<pre><br />
sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb \<br />
libc6-dev libgcc1 cmake pkg-config help2man checkinstall<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake:<br />
<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > /etc/apt/sources.list.d/debian-experimental.list<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first. To build libpano13 we need some libraries and particularly their development ("dev") packages:<br />
<br />
<pre><br />
sudo apt-get install zlib1g-dev libpng12-dev libjpeg-dev libtiff4-dev<br />
</pre><br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<br />
<pre><br />
cd libpano.hg<br />
hg pull<br />
hg up<br />
cd ..<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<br />
<pre><br />
make<br />
</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<br />
<pre><br />
sudo make install<br />
sudo ldconfig<br />
</pre><br />
<br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-dev compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install libtiff4-dev libopenexr-dev libboost-system-dev \<br />
libboost-filesystem-dev libboost-graph-dev libboost-thread-dev \<br />
freeglut3-dev libglew-dev libxi-dev libxmu-dev libplot-dev libgsl0-dev \<br />
liblcms2-dev<br />
</pre><br />
<br />
The most recent version of Enblend (4.2) also requires version 1.9 of the VIGRA computer vision library. Unfortunately, 'buntu versions up to and including the forthcoming 13.04 (Raring Ringtail) only provide version 1.8 of the VIGRA library, so you'll have to build your own, as follows:<br />
<br />
<pre><br />
cd ~/src<br />
wget http://hci.iwr.uni-heidelberg.de/vigra/vigra-1.9.0-src.tar.gz<br />
tar -zxvf vigra-1.9.0-src.tar.gz<br />
cd vigra-1.9.0<br />
cmake .<br />
sudo checkinstall<br />
sudo ldconfig<br />
</pre><br />
<br />
The <code>''"sudo checkinstall"''</code> step will ask you a few questions (respond with the default answers), and then create and install a package which can later be removed with synaptic or dpkg -r. If you're not worried about being able to cleanly remove the VIGRA library at a later date, you can substitute <code>''"sudo make install"''</code>.<br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<br />
<pre><br />
cd enblend.hg<br />
hg pull<br />
hg update<br />
cd ..<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<br />
<pre><br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend*.deb<br />
</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in the synaptic package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev freeglut3-dev libglew-dev libboost-dev \<br />
libboost-thread-dev libboost-regex-dev libboost-filesystem-dev \<br />
libboost-iostreams-dev libboost-system-dev libboost-signals-dev \<br />
gettext liblapack-dev libxi-dev libxmu-dev libtclap-dev liblensfun-dev<br />
</pre><br />
<br />
If you want to build hugin with python scripting functionality, you will also need a copy of the python development library and swig2.0. Unfortunately, the swig2.0 package is only included in Natty (11.04) or better. If you are on Lucid or Maverick, you can obtain a swig2.0 package by enabling the Hugin PPA:<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
</pre><br />
<br />
Then (for all versions from Lucid onwards) execute:<br />
<br />
<pre><br />
sudo apt-get install python-dev swig2.0<br />
</pre><br />
<br />
You could install libpano13 on your system with the command below. But it is recommended that you build your own libpano13 (see section [[Hugin_Compiling_Ubuntu#Building_Libpano13|above]]), since the version of libpano13 in the Ubuntu repositories is probably too old. Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA. If going this last route, you can add it as shown above.<br />
<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. If you follow the instructions on this page to build ExifTool and/or Enblend, you don't need to install them this way.<br />
<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Otherwise, you need to clone the repository and decide which version/branch to build with:<br />
<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.build<br />
cd hugin.build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo \<br />
-DBUILD_HSI:BOOL=ON -DSWIG_EXECUTABLE=/usr/bin/swig2.0<br />
</pre><br />
<br />
The last line of the above cmake statement is for python scripting. The first switch activates the scripting interface (which is deactivated by default because it does not work simply out of the box on all supported platforms) and the second switch fixes a bug in the CMake script to find swig. Self-compiled swig does not need the -DSWIG_EXECUTABLE switch since it is found automatically by the CMake script.<br />
<br />
If you get an error building, try removing the last line of the above cmake statement. Another cause may be a wrong version of libpano13, even if you built it yourself. Go back and check that you are using a (newer) stable branch. Try switching to libpano13-2.9.18 (run hg update -C libpano13-2.9.18 in the proper folder), rebuild as instructed above, and try again.<br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
If you are building for install on your own machine only, -DDISABLE_DPKG=ON will significantly speed up the package generation. Do not distribute packages built this way, they don't have proper dependencies. This is primarily meant for developers doing cycles of fix-compile-install-test.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it.<br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]</div>BBBrighthttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=14812Hugin Compiling Ubuntu2013-01-25T12:48:32Z<p>BBBright: </p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 12.04. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut|Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few times, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if it does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.:<br />
<br />
<pre><br />
apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need a deeper understanding of the building process if you want to:<br />
<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
<br />
That knowledge is beyond the scope of this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''25 January 2013''': The build instructions for the most recent versions of enblend, libpano13, and hugin have been updated for 'buntu 12.04LTS. A lot of information applying to previous releases has been deleted in an effort to make the page more readable. If you're building on an earlier release, be sure to click the "View History" tab above and check the build details around the time your 'buntu version was released.<br />
<br />
'''9 May 2011''': The integration of the python_scripting development branch brings new dependencies and a new build-time configuration switch for Hugin. See changes in the documentation below. swig2.0 is officially distributed only with Natty (11.04 onwards). If you have an older Ubuntu version you will either have to forego the python scripting feature or find an alternative swig2.0 (either a PPA or build it yourself).<br />
<br />
'''2 May 2011''': If you are using an earlier version of Ubuntu than 11.04, there is a chance that your Mercurial version is too old for grabbing updates. New (non-critical security) updates to a program do not get added to old versions of Ubuntu, so any new changes will need to be added manually. When running Mercurial (pull, update, etc), you may get an error like<br />
<br />
<pre><br />
abort: requirement 'dotencode' not supported!<br />
</pre><br />
<br />
To fix this, you can use the package archive from Mercurial PPA Packagers and get the latest release:<br />
<br />
<pre><br />
sudo apt-add-repository ppa:mercurial-ppa/releases<br />
sudo apt-get update<br />
sudo apt-get install mercurial<br />
</pre><br />
<br />
'''5 March 2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you religiously follow the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install the latest unstable version of the tools. While they are likely to work in most cases, there is no guarantee and they are not recommended for a production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
== Building Environment ==<br />
<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get. In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu)), enter:<br />
<br />
<pre><br />
sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb \<br />
libc6-dev libgcc1 cmake pkg-config help2man checkinstall<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake:<br />
<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list<br />
mv debian-experimental.list /etc/apt/sources.list.d/<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first. To build libpano13 we need some libraries and particularly their development ("dev") packages:<br />
<br />
<pre><br />
sudo apt-get install zlib1g-dev libpng12-dev libjpeg-dev libtiff4-dev<br />
</pre><br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<br />
<pre><br />
cd libpano.hg<br />
hg pull<br />
hg up<br />
cd ..<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<br />
<pre><br />
make<br />
</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<br />
<pre><br />
sudo make install<br />
sudo ldconfig<br />
</pre><br />
<br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-dev compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install libtiff4-dev libopenexr-dev libboost-system-dev \<br />
libboost-filesystem-dev libboost-graph-dev libboost-thread-dev \<br />
freeglut3-dev libglew-dev libxi-dev libxmu-dev libplot-dev libgsl0-dev \<br />
liblcms2-dev<br />
</pre><br />
<br />
The most recent version of Enblend (4.2) also requires version 1.9 of the VIGRA computer vision library. Unfortunately, 'buntu versions up to and including the forthcoming 13.04 (Raring Ringtail) only provide version 1.8 of the VIGRA library, so you'll have to build your own, as follows:<br />
<br />
<pre><br />
cd ~/src<br />
wget http://hci.iwr.uni-heidelberg.de/vigra/vigra-1.9.0-src.tar.gz<br />
tar -zxvf vigra-1.9.0-src.tar.gz<br />
cd vigra-1.9.0<br />
cmake .<br />
sudo checkinstall<br />
sudo ldconfig<br />
</pre><br />
<br />
The <code>''"sudo checkinstall"''</code> step will ask you a few questions (respond with the default answers), and then create and install a package which can later be removed with synaptic or dpkg -r. If you're not worried about being able to cleanly remove the VIGRA library at a later date, you can substitute <code>''"sudo make install"''</code>.<br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<br />
<pre><br />
cd enblend.hg<br />
hg pull<br />
hg update<br />
cd ..<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<br />
<pre><br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend*.deb<br />
</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in the synaptic package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev freeglut3-dev libglew-dev libboost-dev \<br />
libboost-thread-dev libboost-regex-dev libboost-filesystem-dev \<br />
libboost-iostreams-dev libboost-system-dev libboost-signals-dev \<br />
gettext liblapack-dev libxi-dev libxmu-dev libtclap-dev liblensfun-dev<br />
</pre><br />
<br />
If you want to build hugin with python scripting functionality, you will also need a copy of the python development library and swig2.0. Unfortunately, the swig2.0 package is only included in Natty (11.04) or better. If you are on Lucid or Maverick, you can obtain a swig2.0 package by enabling the Hugin PPA:<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
</pre><br />
<br />
Then (for all versions from Lucid onwards) execute:<br />
<br />
<pre><br />
sudo apt-get install python-dev swig2.0<br />
</pre><br />
<br />
You could install libpano13 on your system with the command below. But it is recommended that you build your own libpano13 (see section [[Hugin_Compiling_Ubuntu#Building_Libpano13|above]]), since the version of libpano13 in the Ubuntu repositories is probably too old. Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA. If going this last route, you can add it as shown above.<br />
<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. If you follow the instructions on this page to build ExifTool and/or Enblend, you don't need to install them this way.<br />
<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Otherwise, you need to clone the repository and decide which version/branch to build with:<br />
<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.build<br />
cd hugin.build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo \<br />
-DBUILD_HSI:BOOL=ON -DSWIG_EXECUTABLE=/usr/bin/swig2.0<br />
</pre><br />
<br />
The last line of the above cmake statement is for python scripting. The first switch activates the scripting interface (which is deactivated by default because it does not work simply out of the box on all supported platforms) and the second switch fixes a bug in the CMake script to find swig. Self-compiled swig does not need the -DSWIG_EXECUTABLE switch since it is found automatically by the CMake script.<br />
<br />
If you get an error building, try removing the last line of the above cmake statement. Another cause may be a wrong version of libpano13, even if you built it yourself. Go back and check that you are using a (newer) stable branch. Try switching to libpano13-2.9.18 (run hg update -C libpano13-2.9.18 in the proper folder), rebuild as instructed above, and try again.<br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
If you are building for install on your own machine only, -DDISABLE_DPKG=ON will significantly speed up the package generation. Do not distribute packages built this way, they don't have proper dependencies. This is primarily meant for developers doing cycles of fix-compile-install-test.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it.<br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]</div>BBBrighthttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=14811Hugin Compiling Ubuntu2013-01-25T12:43:23Z<p>BBBright: </p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 12.04. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut|Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few times, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if it does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.:<br />
<br />
<pre><br />
apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need a deeper understanding of the building process if you want to:<br />
<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
<br />
That knowledge is beyond the scope of this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''25 January 2013''': The build instructions for the most recent versions of enblend, libpano13, and hugin have been updated for 'buntu 12.04LTS. A lot of information applying to previous releases has been deleted in an effort to make the page more readable. If you're building on an earlier release, be sure to click the "View History" tab above and check the build details around the time your 'buntu version was released.<br />
<br />
'''9 May 2011''': The integration of the python_scripting development branch brings new dependencies and a new build-time configuration switch for Hugin. See changes in the documentation below. swig2.0 is officially distributed only with Natty (11.04 onwards). If you have an older Ubuntu version you will either have to forego the python scripting feature or find an alternative swig2.0 (either a PPA or build it yourself).<br />
<br />
'''2 May 2011''': If you are using an earlier version of Ubuntu than 11.04, there is a chance that your Mercurial version is too old for grabbing updates. New (non-critical security) updates to a program do not get added to old versions of Ubuntu, so any new changes will need to be added manually. When running Mercurial (pull, update, etc), you may get an error like<br />
<br />
<pre><br />
abort: requirement 'dotencode' not supported!<br />
</pre><br />
<br />
To fix this, you can use the package archive from Mercurial PPA Packagers and get the latest release:<br />
<br />
<pre><br />
sudo apt-add-repository ppa:mercurial-ppa/releases<br />
sudo apt-get update<br />
sudo apt-get install mercurial<br />
</pre><br />
<br />
'''5 March 2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you religiously follow the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install the latest unstable version of the tools. While they are likely to work in most cases, there is no guarantee and they are not recommended for a production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
== Building Environment ==<br />
<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get. In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu)), enter:<br />
<br />
<pre><br />
sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb \<br />
libc6-dev libgcc1 cmake pkg-config help2man checkinstall<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake:<br />
<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list<br />
mv debian-experimental.list /etc/apt/sources.list.d/<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first. To build libpano13 we need some libraries and particularly their development ("dev") packages:<br />
<br />
<pre><br />
sudo apt-get install zlib1g-dev libpng12-dev libjpeg-dev libtiff4-dev<br />
</pre><br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<br />
<pre><br />
cd libpano.hg<br />
hg pull<br />
hg up<br />
cd ..<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<br />
<pre><br />
make<br />
</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<br />
<pre><br />
sudo make install<br />
sudo ldconfig<br />
</pre><br />
<br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-dev compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install libtiff4-dev libopenexr-dev libboost-system-dev \<br />
libboost-filesystem-dev libboost-graph-dev libboost-thread-dev \<br />
freeglut3-dev libglew-dev libxi-dev libxmu-dev libplot-dev libgsl0-dev \<br />
liblcms2-dev<br />
</pre><br />
<br />
The most recent version of Enblend (4.2) also requires version 1.9 of the VIGRA computer vision library. Unfortunately, 'buntu versions up to and including the forthcoming 13.04 (Raring Ringtail) only provide version 1.8 of the VIGRA library, so you'll have to build your own, as follows:<br />
<br />
<pre><br />
cd ~/src<br />
wget http://hci.iwr.uni-heidelberg.de/vigra/vigra-1.9.0-src.tar.gz<br />
tar -zxvf vigra-1.9.0-src.tar.gz<br />
cd vigra-1.9.0<br />
cmake .<br />
sudo checkinstall<br />
sudo ldconfig<br />
</pre><br />
<br />
The <code>''"sudo checkinstall"''</code> step will ask you a few questions (respond with the default answers), and then create and install a package which can later be removed with synaptic or dpkg -r. If you're not worried about being able to cleanly remove the VIGRA library at a later date, you can substitute <code>''"sudo make install"''</code>.<br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<br />
<pre><br />
cd enblend.hg<br />
hg pull<br />
hg update<br />
cd ..<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<br />
<pre><br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend*.deb<br />
</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in the synaptic package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev freeglut3-dev libglew-dev libboost-dev \<br />
libboost-thread-dev libboost-regex-dev libboost-filesystem-dev \<br />
libboost-iostreams-dev libboost-system-dev libboost-signals-dev \<br />
gettext liblapack-dev libxi-dev libxmu-dev libtclap-dev liblensfun-dev<br />
</pre><br />
<br />
If you want to build hugin with python scripting functionality, you will also need a copy of the python development library and swig2.0. Unfortunately, the swig2.0 package is only included in Natty (11.04) or better. If you are on Lucid or Maverick, you can obtain a swig2.0 package by enabling the Hugin PPA:<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
</pre><br />
<br />
Then (for all versions from Lucid onwards) execute:<br />
<br />
<pre><br />
sudo apt-get install python-dev swig2.0<br />
</pre><br />
<br />
You could install libpano13 on your system with the command below. But it is recommended that you build your own libpano13 (see section [[Hugin_Compiling_Ubuntu#Building_Libpano13|above]]), since the version of libpano13 in the Ubuntu repositories is probably too old. Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA. If going this last route, you can add it as shown above.<br />
<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. If you follow the instructions on this page to build ExifTool and/or Enblend, you don't need to install them this way.<br />
<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Otherwise, you need to clone the repository and decide which version/branch to build with:<br />
<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.build<br />
cd hugin.build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo \<br />
-DBUILD_HSI:BOOL=ON -DSWIG_EXECUTABLE=/usr/bin/swig2.0<br />
</pre><br />
<br />
The last line of the above cmake statement is for python scripting. The first switch activates the scripting interface (which is deactivated by default because it does not work simply out of the box on all supported platforms) and the second switch fixes a bug in the CMake script to find swig. Self-compiled swig does not need the -DSWIG_EXECUTABLE switch since it is found automatically by the CMake script.<br />
<br />
If you get an error building, try removing the last line of the above cmake statement. Another cause may be a wrong version of libpano13, even if you built it yourself. Go back and check that you are using a (newer) stable branch. Try switching to libpano13-2.9.18 (run hg update -C libpano13-2.9.18 in the proper folder), rebuild as instructed above, and try again.<br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
If you are building for install on your own machine only, -DDISABLE_DPKG=ON will significantly speed up the package generation. Do not distribute packages built this way, they don't have proper dependencies. This is primarily meant for developers doing cycles of fix-compile-install-test.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it.<br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]</div>BBBrighthttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=14810Hugin Compiling Ubuntu2013-01-25T12:37:36Z<p>BBBright: </p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 12.04. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut|Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few times, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if it does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.:<br />
<br />
<pre><br />
apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need a deeper understanding of the building process if you want to:<br />
<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
<br />
That knowledge is beyond the scope of this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''25 January 2013''': The build instructions for the most recent versions of enblend, libpano13, and hugin have been updated for 'buntu 12.04LTS. A lot of information applying to previous releases has been deleted in an effort to make the page more readable. If you're building on an earlier release, be sure to click the "View History" tab above and check the build details around the time your 'buntu version was released.<br />
<br />
'''9 May 2011''': The integration of the python_scripting development branch brings new dependencies and a new build-time configuration switch for Hugin. See changes in the documentation below. swig2.0 is officially distributed only with Natty (11.04 onwards). If you have an older Ubuntu version you will either have to forego the python scripting feature or find an alternative swig2.0 (either a PPA or build it yourself).<br />
<br />
'''2 May 2011''': If you are using an earlier version of Ubuntu than 11.04, there is a chance that your Mercurial version is too old for grabbing updates. New (non-critical security) updates to a program do not get added to old versions of Ubuntu, so any new changes will need to be added manually. When running Mercurial (pull, update, etc), you may get an error like<br />
<br />
<pre><br />
abort: requirement 'dotencode' not supported!<br />
</pre><br />
<br />
To fix this, you can use the package archive from Mercurial PPA Packagers and get the latest release:<br />
<br />
<pre><br />
sudo apt-add-repository ppa:mercurial-ppa/releases<br />
sudo apt-get update<br />
sudo apt-get install mercurial<br />
</pre><br />
<br />
'''5 March 2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you religiously follow the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install the latest unstable version of the tools. While they are likely to work in most cases, there is no guarantee and they are not recommended for a production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
== Building Environment ==<br />
<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get. In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu)), enter:<br />
<br />
<pre><br />
sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb \<br />
libc6-dev libgcc1 cmake pkg-config help2man checkinstall<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake:<br />
<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list<br />
mv debian-experimental.list /etc/apt/sources.list.d/<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first. To build libpano13 we need some libraries and particularly their development ("dev") packages:<br />
<br />
<pre><br />
sudo apt-get install zlib1g-dev libpng12-dev libjpeg-dev libtiff4-dev<br />
</pre><br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<br />
<pre><br />
cd libpano.hg<br />
hg pull<br />
hg up<br />
cd ..<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<br />
<pre><br />
make<br />
</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<br />
<pre><br />
sudo make install<br />
sudo ldconfig<br />
</pre><br />
<br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-dev compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install libtiff4-dev libopenexr-dev libboost-system-dev \<br />
libboost-filesystem-dev libboost-graph-dev libboost-thread-dev \<br />
freeglut3-dev libglew-dev libxi-dev libxmu-dev libplot-dev libgsl0-dev \<br />
liblcms2-dev<br />
</pre><br />
<br />
The most recent version of Enblend (4.2) also requires version 1.9 of the VIGRA computer vision library. Unfortunately, 'buntu versions up to and including the forthcoming 13.04 (Raring Ringtail) only provide version 1.8 of the VIGRA library, so you'll have to build your own, as follows:<br />
<br />
<pre><br />
cd ~/src<br />
wget http://hci.iwr.uni-heidelberg.de/vigra/vigra-1.9.0-src.tar.gz<br />
tar -zxvf vigra-1.9.0-src.tar.gz<br />
cd vigra-1.9.0<br />
cmake .<br />
sudo checkinstall<br />
sudo ldconfig<br />
</pre><br />
<br />
The <code>''"sudo checkinstall"''</code> step will ask you a few questions (respond with the default answers), and then create and install a package which can later be removed with synaptic or dpkg -r. If you're not worried about being able to cleanly remove the VIGRA library at a later date, you can substitute <code>''"sudo make install"''</code>.<br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<br />
<pre><br />
cd enblend.hg<br />
hg pull<br />
hg update<br />
cd ..<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<br />
<pre><br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend*.deb<br />
</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in the synaptic package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev freeglut3-dev libglew-dev libboost-dev \<br />
libboost-thread-dev libboost-regex-dev libboost-filesystem-dev \<br />
libboost-iostreams-dev libboost-system-dev libboost-signals-dev \<br />
gettext liblapack-dev libxi-dev libxmu-dev libtclap-dev liblensfun-dev<br />
</pre><br />
<br />
If you want to build hugin with python scripting functionality, you will also need a copy of the python development library and swig2.0. Unfortunately, the swig2.0 package is only included in Natty (11.04) or better. If you are on Lucid or Maverick, you can obtain a swig2.0 package by enabling the Hugin PPA:<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
</pre><br />
<br />
Then (for all versions from Natty onwards) execute:<br />
<br />
<pre><br />
sudo apt-get install python-dev swig2.0<br />
</pre><br />
<br />
You could install libpano13 on your system with the command below. But it is recommended that you build your own libpano13 (see section [[Hugin_Compiling_Ubuntu#Building_Libpano13|above]]), since the version of libpano13 in the Ubuntu repositories is probably too old. Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA. If going this last route, you can add it as shown above.<br />
<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. If you follow the instructions on this page to build ExifTool and/or Enblend, you don't need to install them this way.<br />
<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Otherwise, you need to clone the repository and decide which version/branch to build with:<br />
<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.build<br />
cd hugin.build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo \<br />
-DBUILD_HSI:BOOL=ON -DSWIG_EXECUTABLE=/usr/bin/swig2.0<br />
</pre><br />
<br />
The last line of the above cmake statement is for python scripting. The first switch activates the scripting interface (which is deactivated by default because it does not work simply out of the box on all supported platforms) and the second switch fixes a bug in the CMake script to find swig. Self-compiled swig does not need the -DSWIG_EXECUTABLE switch since it is found automatically by the CMake script.<br />
<br />
If you get an error building, try removing the last line of the above cmake statement. Another cause may be a wrong version of libpano13, even if you built it yourself. Go back and check that you are using a (newer) stable branch. Try switching to libpano13-2.9.18 (run hg update -C libpano13-2.9.18 in the proper folder), rebuild as instructed above, and try again.<br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
If you are building for install on your own machine only, -DDISABLE_DPKG=ON will significantly speed up the package generation. Do not distribute packages built this way, they don't have proper dependencies. This is primarily meant for developers doing cycles of fix-compile-install-test.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it.<br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]</div>BBBrighthttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=13946Hugin Compiling Ubuntu2012-05-06T14:55:06Z<p>BBBright: /* Dependencies */</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 10.10. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut|Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few time, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need deeper understanding of the building process if you want to:<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
That knowledge is out of scope for this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''9 May 2011''': The integration of the python_scripting development branch brings new dependencies and a new build-time configuration switch for Hugin. See changes in the documentation below. swig2.0 is officially distributed only with Natty (11.04 onwards). If you have an older Ubuntu version you will either have to forego the python scripting feature or find an alternative swig2.0 (either a PPA or build it yourself).<br />
<br />
'''2 May 2011''': If you are using an earlier version of Ubuntu than 11.04, there is a chance that your Mercurial version is too old for grabbing updates. New (non-critical security) updates to a program do not get added to old versions of Ubuntu, so any new changes will need to be added manually. When running Mercurial (pull, update, etc), you may get an error like<br />
<pre><br />
abort: requirement 'dotencode' not supported!<br />
</pre><br />
To fix this, you can use the package archive from Mercurial PPA Packagers and get the latest release:<br />
<pre><br />
sudo apt-add-repository ppa:mercurial-ppa/releases<br />
sudo apt-get update<br />
sudo apt-get install mercurial<br />
</pre><br />
<br />
'''5-March-2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
'''CMake 2.8.2''', as packaged in Ubuntu 10.10, contains a bug (http://public.kitware.com/Bug/view.php?id=11020) the prevents the created debs to install successfully, due to it not storing needed directories in the deb package.<br />
Installing the resulting debs will fail with a message error saying something like<br />
<br />
<pre><br />
unable to create `/usr/local/share/hugin/xrc/data/redo.png.dpkg-new' (while processing `./usr/local/share/hugin/xrc/data/redo.png'): No such file or directory<br />
</pre><br />
<br />
Commands to create the necessary folders have been documented below and may be added to the CMake build in the repository of Hugin, Libpano, Enblend. However it is possible that the lists are incomplete. If you bump in the above message, the solution is to create the full missing path and run dpkg -i again, recursively adding folders until the install succeed.<br />
<br />
<pre><br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/<br />
</pre><br />
<br />
Another workaround is, to partially rebuild the deb package by hand:<br />
<br />
<pre><br />
mkdir unpacked<br />
cd unpacked/<br />
ar x ../hugin.build/hugin-2010.2.0-Linux.deb<br />
mkdir untarred<br />
cd untarred<br />
tar xzf ../data.tar.gz<br />
tar czf ../data.tar.gz .<br />
cd ..<br />
ar r ../hugin-2010.2.0-Linux.deb debian-binary control.tar.gz data.tar.gz<br />
</pre><br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you follow religiously the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install you the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install you the latest unstable version of the tools that has been built as a binary. While they are likely to work in most cases, there is no guarantee and they are not recommended for production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend panini<br />
</pre><br />
<br />
== Building Environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list<br />
mv debian-experimental.list /etc/apt/sources.list.d/<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man libplot-dev liblcms1-dev libboost-system-dev<br />
</pre><br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save yourself some time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
cd enblend.hg<br />
hg pull<br />
hg update<br />
cd ..<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend*.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd libpano.hg<br />
hg pull<br />
hg up<br />
cd ..<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/include/pano13/<br />
sudo mkdir -p /usr/local/include/pano13/doc<br />
sudo mkdir -p /usr/local/lib/pkgconfig<br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completeness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
If you want to build the Python scripting feature, your best bet is Natty (11.04). If you are on Lucid or Maverick, you can follow the instructions below to get a swig2.0 package. If nothing works and you still want Python scripting, you will have to build it from [https://sourceforge.net/projects/swig/ source].<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
</pre><br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev libglut3-dev libglew-dev libboost-dev \<br />
boost-build libboost-thread-dev libboost-graph-dev libboost-regex-dev \<br />
libboost-iostreams-dev libboost-filesystem-dev gettext liblapack-dev \<br />
libxi-dev libxmu-dev libboost-signals-dev libboost-system-dev \<br />
libtclap-dev liblensfun-dev<br />
</pre><br />
<br />
For the python scripting functionality, you will also need <br />
<pre><br />
sudo apt-get install libpython-dev python-dev swig2.0<br />
</pre><br />
<br />
Note that python-dev was the name for libpython-dev prior to Natty. Do not worry if it stops with the message<br />
<pre><br />
E: Unable to locate package {python-dev or libpython-dev}<br />
</pre><br />
Remove the package in error from the apt-get line and try again. You will still achieve the intended status. Tested on Natty and Lucid, most likely ok for Maverick as well.<br />
<br />
You could install libpano13 on your system with the command below. But it is recommended that you build your own libpano13 (see section [[Hugin_Compiling_Ubuntu#Building_Libpano13|above]]), since the version of libpano13 in the Ubuntu repositories is probably too old. Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA. If going this last route, you can add it as shown above.<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. If you follow the instructions on this page to build ExifTool and/or Enblend, you don't need to install them this way.<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Otherwise, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo \<br />
-DBUILD_HSI:BOOL=ON -DSWIG_EXECUTABLE=/usr/bin/swig2.0<br />
</pre><br />
<br />
The last line of the above cmake statement is for python scripting and will work with Ubuntu 11.04. The first switch activates the scripting interface (which is deactivated by default because it does not work simply out of the box on all supported platforms) and the second switch fixes a bug in the CMake script to find swig. Self-compiled swig does not need the -DSWIG_EXECUTABLE switch since it is found automatically by the CMake script.<br />
<br />
If you get an error building, try removing the last line of the above cmake statement. Another cause may be a wrong version of libpano13, even if you built it yourself. Go back and check that you are using a (newer) stable branch. Try switching to libpano13-2.9.18 (run hg update -C libpano13-2.9.18 in the proper folder), rebuild as instructed above, and try again.<br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
If you are building for install on your own machine only, -DDISABLE_DPKG=ON will significantly speed up the package generation. Do not distribute packages built this way, they don't have proper dependencies. This is primarily meant for developers doing cycles of fix-compile-install-test.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it.<br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry: <br />
<pre><br />
sudo mkdir -p /usr/local/share/pixmaps<br />
sudo mkdir -p /usr/local/share/mime/packages<br />
sudo mkdir -p /usr/local/share/applications/<br />
sudo mkdir -p /usr/local/share/icons/gnome/48x48/mimetypes/<br />
sudo mkdir -p /usr/local/share/locale/en_GB/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_la/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_TW/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ru/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ro/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/bg/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/de/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ko/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pt_BR/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_CN/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/it/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sv/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ca_ES/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fi/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/cs_CZ/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/uk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/hu/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_VE/LC_MESSAGES<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_it_IT<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_en_EN<br />
sudo mkdir -p /usr/local/share/hugin/data/<br />
sudo mkdir -p /usr/local/lib/hugin<br />
sudo mkdir -p /usr/local/share/man/man1<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Platform:Linux]]<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Hugin:Compiling]]</div>BBBrighthttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=13256Hugin Compiling Ubuntu2011-03-08T23:24:16Z<p>BBBright: /* Building Libpano13 */</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 10.10. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few time, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need deeper understanding of the building process if you want to:<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
That knowledge is out of scope for this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
'''5-March-2010''': Foreign library libtclap removed from source tree. This introduces a new dependency on libtclap-dev<br />
<br />
'''February 2010''': Libpano has migrated from SVN to Mercurial.<br />
<br />
'''CMake 2.8.2''', as packaged in Ubuntu 10.10, contains a bug (http://public.kitware.com/Bug/view.php?id=11020) the prevents the created debs to install successfully, due to it not storing needed directories in the deb package.<br />
Installing the resulting debs will fail with a message error saying something like<br />
<br />
<pre><br />
unable to create `/usr/local/share/hugin/xrc/data/redo.png.dpkg-new' (while processing `./usr/local/share/hugin/xrc/data/redo.png'): No such file or directory<br />
</pre><br />
<br />
Commands to create the necessary folders have been documented below and may be added to the CMake build in the repository of Hugin, Libpano, Enblend. However it is possible that the lists are incomplete. If you bump in the above message, the solution is to create the full missing path and run dpkg -i again, recursively adding folders until the install succeed.<br />
<br />
<pre><br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/<br />
</pre><br />
<br />
Another workaround is, to partially rebuild the deb package by hand:<br />
<br />
<pre><br />
mkdir unpacked<br />
cd unpacked/<br />
ar x ../hugin.build/hugin-2010.2.0-Linux.deb<br />
mkdir untarred<br />
cd untarred<br />
tar xzf ../data.tar.gz<br />
tar czf ../data.tar.gz .<br />
cd ..<br />
ar r ../hugin-2010.2.0-Linux.deb debian-binary control.tar.gz data.tar.gz<br />
</pre><br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you follow religiously the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install you the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install you the latest unstable version of the tools that has been built as a binary. While they are likely to work in most cases, there is no guarantee and they are not recommended for production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
== Building Environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Coders ===<br />
<br />
If you want to start to navigate, understand and modify the code, the doxygen generated documentation will be helpful to you.<br />
<br />
<pre><br />
sudo apt-get install doxygen graphviz<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
If you want to build packages for distribution, you will also need the following tools and settings.<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list<br />
mv debian-experimental.list /etc/apt/sources.list.d/<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man libplot-dev liblcms1-dev libboost-system-dev<br />
</pre><br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save yourself some time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
cd enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
cd ..<br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr/local<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from the central repository:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
hg clone http://panotools.hg.sourceforge.net:8000/hgroot/panotools/libpano libpano.hg<br />
cd libpano.hg<br />
</pre><br />
<br />
If you're a contributor with write access, use the following clone command instead:<br />
<pre><br />
hg clone ssh://${USER}@panotools.hg.sourceforge.net/hgroot/panotools/panotools/libpano libpano.hg<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd ~/src/libpano/libpano.hg<br />
hg pull<br />
hg up<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
cd ..<br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/include/pano13/<br />
sudo mkdir -p /usr/local/include/pano13/doc<br />
sudo mkdir -p /usr/local/lib/pkgconfig<br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh repository checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev libglut3-dev libglew-dev libboost-dev \<br />
boost-build libboost-thread-dev libboost-graph-dev libboost-regex-dev \<br />
libboost-iostreams-dev libboost-filesystem-dev gettext liblapack-dev \<br />
libxi-dev libxmu-dev libboost-signals-dev libboost-system-dev \<br />
libtclap-dev<br />
</pre><br />
<br />
You could install libpano13 on your system with the command below. However it is likely to be a version of libpano13 that is too old for the current Hugin. It is recommended that you first build your own libpano13 (above). Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA.<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. You don't need this line if you follow the instructions on this page to build ExifTool, Enblend, Autopano-SIFT-C.<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend autopano-sift-c<br />
</pre><br />
<br />
If you want to use the Python scripting tools, you will also need the following dependencies at runtime.<br />
<br />
<pre><br />
sudo apt-get install python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Else, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry: <br />
<pre><br />
sudo mkdir -p /usr/local/share/pixmaps<br />
sudo mkdir -p /usr/local/share/mime/packages<br />
sudo mkdir -p /usr/local/share/applications/<br />
sudo mkdir -p /usr/local/share/icons/gnome/48x48/mimetypes/<br />
sudo mkdir -p /usr/local/share/locale/en_GB/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_la/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_TW/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ru/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ro/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/bg/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/de/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ko/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pt_BR/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_CN/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/it/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sv/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ca_ES/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fi/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/cs_CZ/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/uk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/hu/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_VE/LC_MESSAGES<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_it_IT<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_en_EN<br />
sudo mkdir -p /usr/local/share/hugin/data/<br />
sudo mkdir -p /usr/local/lib/hugin<br />
sudo mkdir -p /usr/local/share/man/man1<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
=== Dive into the Code ===<br />
<br />
From time to time the API reference is published on the Hugin website, however you are better off with a local copy. To generate it, issue the following commands:<br />
<pre><br />
cd ~/src/hugin/hugin.hg/src<br />
doxygen Doxyfile<br />
</pre><br />
<br />
The documentation is generated in ~/src/hugin/hugin.hg/src/hugin/html<br />
<br />
Point your browser to index.html inside that folder and you have access to all available information. If you find that a class, a function, or anything else is not properly documented; and if you delve into the source code to understand it, kindly add documentation to the code so that the next person in your situation can use your experience as a stepping stone. Thank you!<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note February 2011: The latest source code of autopano-sift-C has been unstable for a long time now and nobody is working to fix it. Use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
[http://www.sno.phy.queensu.ca/~phil/exiftool/ ExifTool] is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files.<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10; 7.89 in Ubuntu 10.4) is good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situations in the future where the latest versions offer better support. These issues will occur most likely with specific camera brands/models and the most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.50.tar.gz<br />
tar -xzf Image-ExifTool-8.50.tar.gz<br />
cd Image-ExifTool-8.50<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]</div>BBBrighthttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=13103Hugin Compiling Ubuntu2011-02-02T18:06:41Z<p>BBBright: /* Building Enblend */</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 10.10. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few time, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need deeper understanding of the building process if you want to:<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
That knowledge is out of scope for this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
CMake 2.8.2, as packaged in Ubuntu 10.10, contains a bug (http://public.kitware.com/Bug/view.php?id=11020) the prevents the created debs to install successfully, due to it not storing needed directories in the deb package.<br />
Installing the resulting debs will fail with a message error saying something like<br />
<br />
<pre><br />
unable to create `/usr/local/share/hugin/xrc/data/redo.png.dpkg-new' (while processing `./usr/local/share/hugin/xrc/data/redo.png'): No such file or directory<br />
</pre><br />
<br />
Commands to create the necessary folders have been documented below and may be added to the CMake build in the repository of Hugin, Libpano, Enblend. However it is possible that the lists are incomplete. If you bump in the above message, the solution is to create the full missing path and run dpkg -i again, recursively adding folders until the install succeed.<br />
<br />
<pre><br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/<br />
</pre><br />
<br />
Another workaround is, to partially rebuild the deb package by hand:<br />
<br />
<pre><br />
mkdir unpacked<br />
cd unpacked/<br />
ar x ../hugin.build/hugin-2010.2.0-Linux.deb<br />
mkdir untarred<br />
cd untarred<br />
tar xzf ../data.tar.gz<br />
tar czf ../data.tar.gz .<br />
cd ..<br />
ar r ../hugin-2010.2.0-Linux.deb debian-binary control.tar.gz data.tar.gz<br />
</pre><br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you follow religiously the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install you the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install you the latest unstable version of the tools that has been built as a binary. While they are likely to work in most cases, there is no guarantee and they are not recommended for production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
== Building Environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
=== For Distributors ===<br />
<br />
Not necessary, but useful if you want to move to the next level and build packages for distribution:<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list<br />
mv debian-experimental.list /etc/apt/sources.list.d/<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B<br />
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663<br />
sudo apt-get update<br />
sudo apt-get install devscripts<br />
</pre><br />
<br />
You will also need an OpenPGP key, and a Launchpad account. Follow the [[Hugin_Trackers#Launchpad_Account|instructions]] for Launchpad account creation, including the signing of the Ubuntu Code of Conduct.<br />
<br />
Moreover, it is likely that your environment is not clean enough for distribution builds. In that case, and to produce binaries for other Ubuntu series than the one you are running, you will want to set up a dchroot environment (to be documented later on).<br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man libplot-dev liblcms1-dev libboost-system-dev<br />
</pre><br />
<br />
If you also want to build the documentation, add the following dependencies, and add "-DDOC=ON" to the cmake command below. (Be warned, however, that this will drag in over 700MB of additional dependencies. Unless you have a pressing need to build the documentation yourself, you can save yourself some time and disk space by downloading the PDF docs from http://enblend.sourceforge.net .)<br />
<br />
<pre><br />
sudo apt-get install texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
cd enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
cd ..<br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from SVN:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/libpano libpano13.svn<br />
cd libpano13.svn<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd ~/src/libpano/libpano13.svn<br />
svn up<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
cd ..<br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano13.svn -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/include/pano13/<br />
sudo mkdir -p /usr/local/include/pano13/doc<br />
sudo mkdir -p /usr/local/lib/pkgconfig<br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh SVN checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev libglut3-dev libglew-dev libboost-dev \<br />
boost-build libboost-thread-dev libboost-graph-dev libboost-regex-dev \<br />
libboost-iostreams-dev libboost-filesystem-dev gettext liblapack-dev \<br />
libxi-dev libxmu-dev libboost-signals-dev libboost-system-dev<br />
</pre><br />
<br />
You could install libpano13 on your system with the command below. However it is likely to be a version of libpano13 that is too old for the current Hugin. It is recommended that you first build your own libpano13 (above). Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA.<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. You don't need this line if you follow the instructions on this page to build ExifTool, Enblend, Autopano-SIFT-C.<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend autopano-sift-c<br />
</pre><br />
<br />
If you want to use the Python scripting tools, you will also need the following dependencies at runtime.<br />
<br />
<pre><br />
sudo apt-get install python-argparse<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
In May 2010 the Hugin project migrated from Subversion (SVN) to Mercurial (hg). SVN-related instructions are generally outdated.<br />
<br />
First we clone the repository. Unlike SVN, we do not need to choose at this moment which version of Hugin to download/build yet.<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Else, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry: <br />
<pre><br />
sudo mkdir -p /usr/local/share/pixmaps<br />
sudo mkdir -p /usr/local/share/mime/packages<br />
sudo mkdir -p /usr/local/share/applications/<br />
sudo mkdir -p /usr/local/share/icons/gnome/48x48/mimetypes/<br />
sudo mkdir -p /usr/local/share/locale/en_GB/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_la/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_TW/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ru/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ro/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/bg/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/de/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ko/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pt_BR/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_CN/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/it/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sv/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ca_ES/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fi/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/cs_CZ/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/uk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/hu/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es_VE/LC_MESSAGES<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_it_IT<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_en_EN<br />
sudo mkdir -p /usr/local/share/hugin/data/<br />
sudo mkdir -p /usr/local/lib/hugin<br />
sudo mkdir -p /usr/local/share/man/man1<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note January 2010 / May 2010: Currently the autopano-sift-C SVN trunk, as well as Hg default tip, is unstable, use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopano-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files. [http://www.sno.phy.queensu.ca/~phil/exiftool/ Home Page].<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10 and 7.89 in Ubuntu 10.4) are good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situation in the future that are better supported in the latest versions. These situation are most likely due to your specific camera brand/model, and occur with most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.45.tar.gz<br />
tar -xzf Image-ExifTool-8.45.tar.gz<br />
cd Image-ExifTool-8.45<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
<br />
=== Tarballs ===<br />
<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
=== Deb Packages ===<br />
<br />
The deb packages built by CMake (2.8.2) are broken by Debian standard. Please do not distribute them. There are official updated recent packages at the Hugin PPA mentioned above which include nightlies (produced every 24 hours) and stables (produced out of released tarballs). If you miss binaries for your series of Ubuntu and you have built them for yourself following the instructions above, considering moving up one level and contributing to the [[Hugin PPA]].<br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]</div>BBBrighthttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=12811Hugin Compiling Ubuntu2010-11-08T17:04:14Z<p>BBBright: /* Build and Install */</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 10.10. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few time, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need deeper understanding of the building process if you want to:<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
That knowledge is out of scope for this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
CMake 2.8.2, as packaged in Ubuntu 10.10, contains a bug (http://public.kitware.com/Bug/view.php?id=11020) the prevents the created debs to install successfully, due to it not storing needed directories in the deb package.<br />
Installing the resulting debs will fail with a message error saying something like<br />
<br />
<pre><br />
unable to create `/usr/local/share/hugin/xrc/data/redo.png.dpkg-new' (while processing `./usr/local/share/hugin/xrc/data/redo.png'): No such file or directory<br />
</pre><br />
<br />
Commands to create the necessary folders have been documented below and may be added to the CMake build in the repository of Hugin, Libpano, Enblend. However it is possible that the lists are incomplete. If you bump in the above message, the solution is to create the full missing path and run dpkg -i again, recursively adding folders until the install succeed.<br />
<br />
<pre><br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/<br />
</pre><br />
<br />
Another workaround is, to partially rebuild the deb package by hand:<br />
<br />
<pre><br />
mkdir unpacked<br />
cd unpacked/<br />
ar x ../hugin.build/hugin-2010.2.0-Linux.deb<br />
mkdir untarred<br />
cd untarred<br />
tar xzf ../data.tar.gz<br />
tar czf ../data.tar.gz .<br />
cd ..<br />
ar r ../hugin-2010.2.0-Linux.deb debian-binary control.tar.gz data.tar.gz<br />
</pre><br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 months older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you follow religiously the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use the new features of Hugin, the instructions in this section are for you. Start a command line terminal, type the three commands and you're done.<br />
<br />
If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
=== Stable ===<br />
<br />
This will install you the latest stable version of the tools:<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
=== Unstable ===<br />
<br />
This will install you the latest unstable version of the tools that has been built as a binary. While they are likely to work in most cases, there is no guarantee and they are not recommended for production environment. Use at your own risk, and please report (and if possible fix) bugs. Most of the time these unstable builds are closer to the bleeding edge than to the stable builds. If you want the really really really bleeding edge, you'll have to work through the instructions in the next sections, though.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo add-apt-repository ppa:hugin/nightly<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
== Building Environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to move to the next level and build packages for distribution (list is incomplete):<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
cd enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
cd ..<br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from SVN:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/libpano libpano13.svn<br />
cd libpano13.svn<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd ~/src/libpano/libpano13.svn<br />
svn up<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
cd ..<br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano13.svn -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information.<br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/include/pano13/<br />
sudo mkdir -p /usr/local/include/pano13/doc<br />
sudo mkdir -p /usr/local/lib/pkgconfig<br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh SVN checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev libglut3-dev libglew-dev libboost-dev \<br />
boost-build libboost-thread-dev libboost-graph-dev libboost-regex-dev \<br />
libboost-iostreams-dev libboost-filesystem-dev gettext liblapack-dev \<br />
libxi-dev libxmu-dev libboost-signals-dev<br />
</pre><br />
<br />
You could install libpano13 on your system with the command below. However it is likely to be a version of libpano13 that is too old for the current Hugin. It is recommended that you first build your own libpano13 (above). Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA.<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
wxWidgets is a critical dependency for the Hugin GUI. In the official Ubuntu repositories it is usually at least a few releases behind the current release, and in some cases many releases behind. The wxWidgets project provides alternative [http://wiki.wxpython.org/InstallingOnUbuntuOrDebian repositories] with newer versions, as well as a [http://wiki.wxpython.org/BuildingDebianPackages instructions] to build binary packages of the most recent releases. Newer versions of wxWidgets are not (yet) absolutely necessary, but since eventually things evolve they are useful for development, testing, and in general should give a better user interface experience as wxWidgets improves over time.<br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. You don't need this line if you follow the instructions on this page to build ExifTool, Enblend, Autopano-SIFT-C.<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend autopano-sift-c<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
In May 2010 the Hugin project migrated from Subversion (SVN) to Mercurial (hg). SVN-related instructions are generally outdated.<br />
<br />
First we clone the repository. Unlike SVN, we do not need to choose at this moment which version of Hugin to download/build yet.<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Else, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo<br />
</pre><br />
<br />
Set -DCMAKE_BUILD_TYPE=Debug if you want to help investigate/debug a problem and capture even more debugging information, however Hugin will be slower and may not work as expected. Don't use a Debug build for production.<br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry: <br />
<pre><br />
sudo mkdir -p /usr/local/share/pixmaps<br />
sudo mkdir -p /usr/local/share/mime/packages<br />
sudo mkdir -p /usr/local/share/applications/<br />
sudo mkdir -p /usr/local/share/icons/gnome/48x48/mimetypes/<br />
sudo mkdir -p /usr/local/share/locale/en_GB/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_TW/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ru/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/bg/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/de/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ko/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pt_BR/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_CN/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/it/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sv/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ca_ES/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fi/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/cs_CZ/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/uk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/hu/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_it_IT<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_en_EN<br />
sudo mkdir -p /usr/local/share/hugin/data/<br />
sudo mkdir -p /usr/local/lib/hugin<br />
sudo mkdir -p /usr/local/share/man/man1<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note January 2010 / May 2010: Currently the autopano-sift-C SVN trunk, as well as Hg default tip, is unstable, use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopaon-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== ExifTool ==<br />
<br />
ExifTool is no longer mandatory for Hugin to work. It is used to pass metadata from the input to the output images during the stitching process. <br />
<br />
ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files. [http://www.sno.phy.queensu.ca/~phil/exiftool/=home Home Page].<br />
<br />
Usually the version distributed with Ubuntu (8.15 in Ubuntu 10.10 and 7.89 in Ubuntu 10.4) are good enough and you don't need to bother with the following instructions. However there were situations in the past and there might be situation in the future that are better supported in the latest versions. These situation are most likely due to your specific camera brand/model, and occur with most recent models. The following instructions are for those cases.<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.35.tar.gz<br />
tar -xzf Image-ExifTool-8.35.tar.gz<br />
cd Image-ExifTool-8.35<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
* The deb packages built by CMake (2.8.2) are broken by Debian standard. Better not distributing them. There are official updated recent packages at<br />
*:http://packages.debian.org/hugin<br />
*:http://packages.debian.org/hugin-tools<br />
*:http://packages.debian.org/hugin-data<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]</div>BBBrighthttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=12770Hugin Compiling Ubuntu2010-10-19T03:28:35Z<p>BBBright: /* Panini Perspective Tool */</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 10.10. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few time, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need deeper understanding of the building process if you want to:<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
That knowledge is out of scope for this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
CMake 2.8.2, as packaged in Ubuntu 10.10, contains a bug (http://public.kitware.com/Bug/view.php?id=11020) the prevents the created debs to install successfully, due to it not storing needed directories in the deb package.<br />
Installing the resulting debs will fail with a message error saying something like<br />
<br />
<pre><br />
unable to create `/usr/local/share/hugin/xrc/data/redo.png.dpkg-new' (while processing `./usr/local/share/hugin/xrc/data/redo.png'): No such file or directory<br />
</pre><br />
<br />
Commands to create the necessary folders have been documented below and may be added to the CMake build in the repository of Hugin, Libpano, Enblend. However it is possible that the lists are incomplete. If you bump in the above message, the solution is to create the full missing path and run dpkg -i again, recursively adding folders until the install succeed.<br />
<br />
<pre><br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/<br />
</pre><br />
<br />
Another workaround is, to partially rebuild the deb package by hand:<br />
<br />
<pre><br />
mkdir unpacked<br />
cd unpacked/<br />
ar x ../hugin.build/hugin-2010.2.0-Linux.deb<br />
mkdir untarred<br />
cd untarred<br />
tar xzf ../data.tar.gz<br />
tar czf ../data.tar.gz .<br />
cd ..<br />
ar r ../hugin-2010.2.0-Linux.deb debian-binary control.tar.gz data.tar.gz<br />
</pre><br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 month older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you follow religiously the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use these new features of Hugin, the three commands below are for you. Entering them on the command line will most likely give you what you want. If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
== Building Environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to move to the next level and build packages for distribution (list is incomplete):<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
cd enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
cd ..<br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from SVN:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/libpano libpano13.svn<br />
cd libpano13.svn<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd ~/src/libpano/libpano13.svn<br />
svn up<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
cd ..<br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano13.svn -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/include/pano13/<br />
sudo mkdir -p /usr/local/include/pano13/doc<br />
sudo mkdir -p /usr/local/lib/pkgconfig<br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh SVN checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev libglut3-dev libglew-dev libboost-dev \<br />
boost-build libboost-thread-dev libboost-graph-dev libboost-regex-dev \<br />
libboost-iostreams-dev libboost-filesystem-dev gettext liblapack-dev \<br />
libxi-dev libxmu-dev<br />
</pre><br />
<br />
You could install libpano13 on your system with the command below. However it is likely to be a version of libpano13 that is too old for the current Hugin. It is recommended that you first build your own libpano13 (above). Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA.<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. You don't need this line if you follow the instructions on this page to build ExifTool, Enblend, Autopano-SIFT-C.<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend autopano-sift-c<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
In May 2010 the Hugin project migrated from Subversion (SVN) to Mercurial (hg). SVN-related instructions are generally outdated.<br />
<br />
First we clone the repository. Unlike SVN, we do not need to choose at this moment which version of Hugin to download/build yet.<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Else, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug<br />
</pre><br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry: <br />
<pre><br />
sudo mkdir -p /usr/local/share/pixmaps<br />
sudo mkdir -p /usr/local/share/mime/packages<br />
sudo mkdir -p /usr/local/share/applications/<br />
sudo mkdir -p /usr/local/share/icons/gnome/48x48/mimetypes/<br />
sudo mkdir -p /usr/local/share/locale/en_GB/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_TW/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ru/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/bg/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/de/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ko/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pt_BR/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_CN/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/it/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sv/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ca_ES/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fi/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/cs_CZ/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/uk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/hu/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_it_IT<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_en_EN<br />
sudo mkdir -p /usr/local/share/hugin/data/<br />
sudo mkdir -p /usr/local/lib/<br />
sudo mkdir -p /usr/local/share/man/man1<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note January 2010 / May 2010: Currently the autopano-sift-C SVN trunk, as well as Hg default tip, is unstable, use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopaon-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== Image-ExifTool ==<br />
<br />
ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files. [http://www.sno.phy.queensu.ca/~phil/exiftool/=home Home Page]<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.34.tar.gz<br />
tar -xzf Image-ExifTool-8.34.tar.gz<br />
cd Image-ExifTool-8.34<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev zlib1g-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
mkdir -p ~/src/pvqt<br />
cd ~/src/pvqt<br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt.svn<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt.svn<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
* The deb packages built by CMake (2.8.2) are broken by Debian standard. Better not distributing them. There are official updated recent packages at<br />
*:http://packages.debian.org/hugin<br />
*:http://packages.debian.org/hugin-tools<br />
*:http://packages.debian.org/hugin-data<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]</div>BBBrighthttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=12763Hugin Compiling Ubuntu2010-10-18T21:06:53Z<p>BBBright: Fixed panoglview dependencies</p>
<hr />
<div>== Who Is This Page For ==<br />
<br />
These instructions contain the collective wisdom of Hugin contributors that are using Ubuntu or any of its variations (Ku/Xu/Lu/Edu/...buntu). They are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all 'buntu versions up until 10.10. They are intended to help contributors on the learning curve. If you are not here to contribute, spare yourself the effort and see the [[#Shortcut]] section below.<br />
<br />
They are likely to work only for the latest 'buntu release, but you can check this page's history at the time that the older 'buntu version was the most recent one to find the specifics for that version.<br />
<br />
If you are new here, read the whole page. It is recommended that you go sequentially through it.<br />
<br />
If you're familiar with the process and have run it a few time, look at the what's new section for important news.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required, and start understanding the building process. You will need deeper understanding of the building process if you want to:<br />
* develop code<br />
* translate the latest strings<br />
* document the latest features with manuals and tutorials<br />
* package for distribution<br />
That knowledge is out of scope for this document. This document ends with a binary that is fit for installation on your machine. It is not fit for any other purpose, particularly not for distribution. CMake is [http://groups.google.com/group/hugin-ptx/msg/3f29b207c562fd63 known] to build broken deb packages. Please do not distribute these binaries.<br />
<br />
== What's New ==<br />
<br />
CMake 2.8.2, as packaged in Ubuntu 10.10, contains a bug (http://public.kitware.com/Bug/view.php?id=11020) the prevents the created debs to install successfully, due to it not storing needed directories in the deb package.<br />
Installing the resulting debs will fail with a message error saying something like<br />
<br />
<pre><br />
unable to create `/usr/local/share/hugin/xrc/data/redo.png.dpkg-new' (while processing `./usr/local/share/hugin/xrc/data/redo.png'): No such file or directory<br />
</pre><br />
<br />
Commands to create the necessary folders have been documented below and may be added to the CMake build in the repository of Hugin, Libpano, Enblend. However it is possible that the lists are incomplete. If you bump in the above message, the solution is to create the full missing path and run dpkg -i again, recursively adding folders until the install succeed.<br />
<br />
<pre><br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/<br />
</pre><br />
<br />
Another workaround is, to partially rebuild the deb package by hand:<br />
<br />
<pre><br />
mkdir unpacked<br />
cd unpacked/<br />
ar x ../hugin.build/hugin-2010.2.0-Linux.deb<br />
mkdir untarred<br />
cd untarred<br />
tar xzf ../data.tar.gz<br />
tar czf ../data.tar.gz .<br />
cd ..<br />
ar r ../hugin-2010.2.0-Linux.deb debian-binary control.tar.gz data.tar.gz<br />
</pre><br />
<br />
== Shortcut ==<br />
<br />
Hugin evolves fast and the official 'buntu distributions carry versions that are usually 3-6 month older than the 'buntu distribution date. Moreover, they do not backport Hugin and related tools.<br />
<br />
Even if you follow religiously the 'buntu six months update cycle, you may be using a version of Hugin that is one or two release cycles in our past. If your sole objective is to use these new features of Hugin, the three commands below are for you. Entering them on the command line will most likely give you what you want. If for some reason that's not enough for you - if you want to actually learn and become a contributor; or if you're just curious about getting even closer to the bleeding edge and trade stability for features and excitement, the rest of this document is for you.<br />
<br />
<pre><br />
sudo add-apt-repository ppa:hugin/hugin-builds<br />
sudo apt-get update<br />
sudo apt-get install hugin enblend autopano-sift-c panini<br />
</pre><br />
<br />
== Building Environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to move to the next level and build packages for distribution (list is incomplete):<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
cd enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
cd ..<br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from SVN:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/libpano libpano13.svn<br />
cd libpano13.svn<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd ~/src/libpano/libpano13.svn<br />
svn up<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
cd ..<br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano13.svn -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry:<br />
<pre><br />
sudo mkdir -p /usr/local/include/pano13/<br />
sudo mkdir -p /usr/local/include/pano13/doc<br />
sudo mkdir -p /usr/local/lib/pkgconfig<br />
sudo mkdir -p /usr/local/share/man/man1<br />
sudo mkdir -p /usr/local/bin<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh SVN checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies.<br />
<br />
The following command will install on your system all build time dependencies except libpano13.<br />
<pre><br />
sudo apt-get install libwxgtk2.8-dev libtiff4-dev libpng12-dev \<br />
libopenexr-dev libexiv2-dev libglut3-dev libglew-dev libboost-dev \<br />
boost-build libboost-thread-dev libboost-graph-dev libboost-regex-dev \<br />
libboost-iostreams-dev libboost-filesystem-dev gettext liblapack-dev \<br />
libxi-dev libxmu-dev<br />
</pre><br />
<br />
You could install libpano13 on your system with the command below. However it is likely to be a version of libpano13 that is too old for the current Hugin. It is recommended that you first build your own libpano13 (above). Alternatively, there may be a recent enough version of libpano13 in the Hugin PPA.<br />
<pre><br />
sudo apt-get install libpano13-dev<br />
</pre><br />
<br />
The following are run-time dependencies. Strictly speaking you don't need them to build Hugin, but you will need them to use it. You don't need this line if you follow the instructions on this page to build ExifTool, Enblend, Autopano-SIFT-C.<br />
<pre><br />
sudo apt-get install libimage-exiftool-perl enblend autopano-sift-c<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
In May 2010 the Hugin project migrated from Subversion (SVN) to Mercurial (hg). SVN-related instructions are generally outdated.<br />
<br />
First we clone the repository. Unlike SVN, we do not need to choose at this moment which version of Hugin to download/build yet.<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Else, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug<br />
</pre><br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
If the install quits with an error, it is likely because of missing folders. Run the following commands and retry: <br />
<pre><br />
sudo mkdir -p /usr/local/share/pixmaps<br />
sudo mkdir -p /usr/local/share/mime/packages<br />
sudo mkdir -p /usr/local/share/applications/<br />
sudo mkdir -p /usr/local/share/icons/gnome/48x48/mimetypes/<br />
sudo mkdir -p /usr/local/share/locale/en_GB/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_TW/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ru/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/bg/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/de/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ko/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pt_BR/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/zh_CN/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/it/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/sv/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/ca_ES/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/fi/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/cs_CZ/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/uk/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/es/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/pl/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/locale/hu/LC_MESSAGES/<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_it_IT<br />
sudo mkdir -p /usr/local/share/hugin/xrc/data/help_en_EN<br />
sudo mkdir -p /usr/local/share/hugin/data/<br />
sudo mkdir -p /usr/local/lib/<br />
sudo mkdir -p /usr/local/share/man/man1<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note January 2010 / May 2010: Currently the autopano-sift-C SVN trunk, as well as Hg default tip, is unstable, use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF \<br />
-DCMAKE_BUILD_TYPE=Debug<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopaon-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== Image-ExifTool ==<br />
<br />
ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files. [http://www.sno.phy.queensu.ca/~phil/exiftool/=home Home Page]<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.34.tar.gz<br />
tar -xzf Image-ExifTool-8.34.tar.gz<br />
cd Image-ExifTool-8.34<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common libwxgtk2.8-dev libglew-dev</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview panoglview.hg<br />
cd panoglview.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== Panini Perspective Tool ===<br />
<br />
Strictly speaking, Panini is more than just a viewer. It's a powerful tool to extract/transform views and can also be easily used as a viewer.<br />
<br />
Get dependencies:<br />
<pre><br />
sudo apt-get install qt4-qmake libqt4-dev<br />
</pre><br />
<br />
Get code:<br />
<pre><br />
svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt pvqt<br />
</pre><br />
<br />
Build:<br />
<pre><br />
cd pvqt<br />
qmake panini.pro<br />
make<br />
</pre><br />
<br />
Install (brute force):<br />
<pre><br />
sudo cp Panini /usr/local/bin/ <br />
</pre><br />
<br />
Menu Entry for Kubuntu:<br />
<pre><br />
kmenuedit<br />
</pre><br />
<br />
in kmenuedit<br />
* navigate to Graphics<br />
** click on New Item<br />
** Enter "Panini" as Name<br />
** Enter "Perspective Tool" as Description<br />
** click on the empty icon and look for an icon (I used the akonadi one)<br />
** Enter "Panini" as Command<br />
** Click on Save button<br />
<br />
== Notes for Packagers ==<br />
* The deb packages built by CMake (2.8.2) are broken by Debian standard. Better not distributing them. There are official updated recent packages at<br />
*:http://packages.debian.org/hugin<br />
*:http://packages.debian.org/hugin-tools<br />
*:http://packages.debian.org/hugin-data<br />
* to get an updated ChangeLog in Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]</div>BBBrighthttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=12732Hugin Compiling Ubuntu2010-10-16T22:09:12Z<p>BBBright: Replaced wx-i18n with libwxgtk2.8-dev in hugin dependencies</p>
<hr />
<div>These instructions are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all versions of Ubuntu/Kubuntu up until 10.10.<br />
<br />
They are likely to work only for the latest one, but you can check this page's history at the time that the older Ubuntu version was the most recent one to find the specifics for that version.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required.<br />
<br />
== Building environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to move to the next level and build packages for distribution (list is incomplete):<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
cd enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
cd ..<br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from SVN:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/libpano libpano13.svn<br />
cd libpano13.svn<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd ~/src/libpano/libpano13.svn<br />
svn up<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
cd ..<br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano13.svn -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh SVN checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies:<br />
<br />
<pre><br />
sudo apt-get install cmake libopenexr-dev libboost-dev boost-build libboost-thread-dev \<br />
libboost-graph-dev gettext libexiv2-dev libimage-exiftool-perl libwxbase2.8-dev \<br />
libglew-dev libglut3-dev liblapack-dev libboost-regex-dev libboost-iostreams-dev \<br />
libboost-filesystem-dev libwxgtk2.8-dev<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
In May 2010 the Hugin project migrated from Subversion (SVN) to Mercurial (hg). SVN-related instructions are generally outdated.<br />
<br />
First we clone the repository. Unlike SVN, we do not need to choose at this moment which version of Hugin to download/build yet.<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Else, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir -p hugin.build<br />
cd hugin.build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF<br />
</pre><br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note January 2010 / May 2010: Currently the autopano-sift-C SVN trunk, as well as Hg default tip, is unstable, use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopaon-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== Image-ExifTool ==<br />
<br />
ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files. [http://www.sno.phy.queensu.ca/~phil/exiftool/=home Home Page]<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.34.tar.gz<br />
tar -xzf Image-ExifTool-8.34.tar.gz<br />
cd Image-ExifTool-8.34<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview pglv.hg<br />
cd pglv.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
== Notes for Packagers ==<br />
* The deb packages built by CMake (2.8.2) are broken by Debian standard. Better not distributing them. There are official updated recent packages at<br />
*:http://packages.debian.org/hugin<br />
*:http://packages.debian.org/hugin-tools<br />
*:http://packages.debian.org/hugin-data<br />
* to get an updated ChangeLog from Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* in Hugin<br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]</div>BBBrighthttps://wiki.panotools.org/index.php?title=Hugin_Compiling_Ubuntu&diff=12661Hugin Compiling Ubuntu2010-09-26T09:18:39Z<p>BBBright: Added "libboost-filesystem-dev" to hugin dependencies.</p>
<hr />
<div>These instructions are work in progress and updated when newer versions of Ubuntu are released or when Hugin introduces new dependencies. They have worked, at the time of release or soon thereafter, with all versions of Ubuntu/Kubuntu up until 10.10.<br />
<br />
They are likely to work only for the latest one, but you can check this page's history at the time that the older Ubuntu version was the most recent one to find the specifics for that version.<br />
<br />
Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment on the [http://groups.google.com/group/hugin-ptx hugin-ptx mailing list]). Don't worry if the same package appears twice in an apt-get install line - apt-get will update existing packages if there is a newer version, and ignore duplicates if the latest version is already installed. On the other hand, if apt-get says that it can't find a package, it might be the odd change in package name. You can find a replacement package by using apt-cache search with a substring of the package required, e.g.<br />
<pre>apt-cache search wxW<br />
</pre><br />
<br />
The goal is to build hugin and the whole set of helper applications required.<br />
<br />
== Building environment ==<br />
Since we are going to build hugin, libpano13 and enblend we need to download and install all the development packages. This is very easy with apt-get.<br />
In a terminal window (K menu -> System -> Konsole or Applications -> Accessories -> Terminal (in Kubuntu), Applications -> Accessories -> Terminal (in Ubuntu))<br />
<br />
<pre>sudo apt-get install build-essential autoconf automake1.9 libtool flex bison gdb libc6-dev libgcc1 \<br />
cmake<br />
</pre><br />
<br />
To get the bleeding edge we'll need access to the SVN and Mercurial repositories, and for this we need the correct tools:<br />
<br />
<pre><br />
sudo apt-get install subversion mercurial<br />
</pre><br />
<br />
Not necessary, but useful if you want to move to the next level and build packages for distribution (list is incomplete):<br />
<br />
<pre><br />
sudo apt-get install subversion-tools<br />
</pre><br />
<br />
Not necessary, but useful if you want to revisit configuration sets in ccmake<br />
<pre><br />
sudo apt-get install cmake-curses-gui<br />
</pre><br />
<br />
To get on the same page as far as file system layout is concerned, we'll create a folder to contain all source code in your home folder:<br />
<pre><br />
cd<br />
mkdir -p src<br />
</pre><br />
<br />
== Building Enblend ==<br />
<br />
Get the dependencies. If you are working with large images (300 megapixels and up), you should have a libtiff-devel compiled with large file support and libstdc++6.<br />
<br />
<pre><br />
sudo apt-get install pkg-config libtiff4-dev libboost-graph-dev libboost-thread-dev \<br />
libboost-filesystem-dev liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev \<br />
libxi-dev libxmu-dev help2man texi2html texinfo fig2ps tidy gnuplot libxml-xpath-perl imagemagick<br />
</pre><br />
<br />
Once all dependencies are in place, get the code. The official repository has migrated from CVS to Mercurial:<br />
<br />
<pre><br />
mkdir -p ~/src/enblend<br />
cd ~/src/enblend<br />
hg clone http://enblend.hg.sourceforge.net:8000/hgroot/enblend/enblend enblend.hg<br />
cd enblend.hg<br />
</pre><br />
<br />
If you already have checked out enblend, to update the code to the latest version you need to run:<br />
<pre><br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Then create a build directory and build in there. And install the Package.<br />
<br />
The options below are good for modern multi-core computers. For a single core, you may be better off setting ENABLE_OPENMP to OFF and ENABLE_IMAGECACHE to ON. The two options are mutually exclusive.<br />
<pre><br />
cd ..<br />
mkdir enblend.build<br />
cd enblend.build<br />
cmake ../enblend.hg -DENABLE_GPU:BOOL=ON -DENABLE_IMAGECACHE:BOOL=OFF -DENABLE_OPENMP:BOOL=ON \<br />
-DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF \<br />
-DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TZ:BOOL=OFF<br />
make package<br />
sudo dpkg -i enblend-4.1.1-Linux.deb<br />
</pre><br />
<br />
<br />
===The old autotools way===<br />
We are then ready to compile. The CXXFLAGS <tt>--param inline-unit-growth=60</tt> is a workaround for x86_64 systems, Feb 2009, and apparently no longer needed (set by default). If you have an SMP machine and you're building a recent version, <tt>--disable-image-cache</tt> and <tt>--enable-openmp</tt> will speed up enblend/enfuse massively but may cause segmentation faults; in that case you will be better off with <tt>--enable-image-cache</tt> and <tt>--disable-openmp.</tt> <tt>-march=native</tt> is also beneficial and -O2 is better than -O3.<br />
<br />
<pre><br />
make --makefile=Makefile.scm<br />
mkdir BUILD<br />
cd BUILD<br />
CXXFLAGS="--param inline-unit-growth=60 -march=native -O2" ../configure --disable-image-cache \<br />
--enable-openmp<br />
make<br />
</pre><br />
<br />
The second make step can be very long and memory consuming. Make sure you have enough swap space, and go get a healthy snack while the computer is compiling.<br />
<br />
If you encounter problems at any of these stages, please report back to the hugin-ptx mailing list. Report what command in the sequence you were executing, what machine/operating system, the revision checked out from CVS, and all other relevant information.<br />
<br />
You are then ready to install with<br />
<pre><br />
sudo make install<br />
</pre><br />
<br />
== Building Libpano13 ==<br />
<br />
libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.<br />
To build libpano13 we need some libraries and particularly their <code>dev</code> package:<br />
<br />
<pre>sudo apt-get install zlib1g zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev cmake</pre><br />
<br />
On older distributions, zlib1g and zlib1g-dev may not be found. In that case, the same library may be available with the names lib64z1 and lib64z1-dev.<br />
<br />
We then need to download the source code from SVN:<br />
<br />
<pre><br />
mkdir -p ~/src/libpano<br />
cd ~/src/libpano<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/libpano libpano13.svn<br />
cd libpano13.svn<br />
</pre><br />
<br />
In the future there is no need to get the whole source again. Just issue the following commands to bring your source up to date:<br />
<pre><br />
cd ~/src/libpano/libpano13.svn<br />
svn up<br />
</pre><br />
<br />
Now start the building process.<br />
<br />
<pre><br />
cd ..<br />
mkdir libpano.build<br />
cd libpano.build<br />
cmake ../libpano13.svn -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF<br />
make package<br />
sudo dpkg -i libpano13-*-Linux.deb<br />
</pre><br />
<br />
=== The old autotools way ===<br />
<br />
The above described building process uses CMake to build libpano which has many advantages. Amongst others it creates a clean package to install / deinstall and decreases the likelihood of wrecking the system. However CMake support is relatively new in libpano. The old autotools way is documented below for completness. You should not need it. However if you do, make sure to run either the CMake build or the autotools build on fresh SVN checkouts to avoid interferences.<br />
<br />
<pre><br />
./bootstrap<br />
</pre><br />
<br />
If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command <code>apt-cache search ''missingfile''</code>, find the relevant library and install both the library and the related <code>-dev</code> package.<br />
Run the <code>./configure</code> script and repeat this process until you have met all the dependencies.<br />
<br />
Then we are ready to launch the make process with<br />
<pre>make</pre><br />
<br />
If the library successfully compiles, you have to install it with<br />
<pre>sudo make install<br />
sudo ldconfig</pre><br />
The last part is for the OS to be aware of the new library (that has been installed in <code>/usr/local/lib</code>).<br />
We can now go back up one folder level and get ready for hugin.<br />
<pre>cd ..</pre><br />
<br />
== Building Hugin ==<br />
<br />
=== Dependencies ===<br />
<br />
First we need to activate the <code>universe</code> repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example) and get the dependencies:<br />
<br />
<pre><br />
sudo apt-get install cmake libopenexr-dev libboost-dev boost-build libboost-thread-dev \<br />
libboost-graph-dev gettext libwxgtk2.8-dev libexiv2-dev libimage-exiftool-perl \<br />
libglew-dev libglut3-dev liblapack-dev libboost-regex-dev libboost-iostreams-dev \<br />
libboost-filesystem-dev<br />
</pre><br />
<br />
=== Fetch the Source Code with Mercurial ===<br />
<br />
In May 2010 the Hugin project migrated from Subversion (SVN) to Mercurial (hg). SVN-related instructions are generally outdated.<br />
<br />
First we clone the repository. Unlike SVN, we do not need to choose at this moment which version of Hugin to download/build yet.<br />
<br />
If you already have a repository clone, you only need to pull the latest changes and update the code with:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Else, you need to clone the repository and decide which version/branch to build with:<br />
<pre><br />
mkdir -p ~/src/hugin<br />
cd ~/src/hugin<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin.hg<br />
cd hugin.hg<br />
hg branches<br />
</pre><br />
<br />
If you are a contributor with write access, you can use<br />
<pre><br />
hg clone ssh://${USER}@hugin.hg.sourceforge.net/hgroot/hugin/hugin hugin.hg<br />
</pre><br />
<br />
The `hg branches` command will list all available branches. If you decide, e.g., to build the 2010.0 branch, you will update to it with:<br />
<pre><br />
hg update -C 2010.0 <br />
</pre><br />
<br />
=== Advanced Use - Multiple Source Trees ===<br />
<br />
You may want to build multiple versions of Hugin on your machine at the same time, e.g. when you want to build side by side a stable version for your productivity and a development version to give feedback to the developers. In that case, you will clone the Mercurial repository that is already on your drive and update from it a source tree to a different branch. Mercurial takes care of details such as optimizing disk usage. The commands for this are:<br />
<br />
<pre><br />
cd ..<br />
hg clone hugin.hg another_hugin<br />
cd another_hugin<br />
hg update -C default<br />
</pre><br />
<br />
You can have as many "another_hugin" folders as you want. Just make sure, when pulling the latest updates from SourceForge, to first pull your main repository (the one you cloned from http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin. Then pull all others:<br />
<pre><br />
cd ~/src/hugin/hugin.hg<br />
hg pull<br />
hg update<br />
cd ../another_hugin<br />
hg pull<br />
hg update<br />
</pre><br />
<br />
Reference: [http://groups.google.com/group/hugin-ptx/msg/1ce824dd1364e9be]<br />
<br />
=== Configure the Build Environment ===<br />
<br />
'''Rule:''' You always want to build outside of the source tree to keep the source tree clean. And to avoid confusion, if you have multiple source trees it is preferable to build for each of them in a separate build folder.<br />
<br />
Next we set up the build environment using cmake.<br />
<br />
If you compiled and installed libpano to a non standard location set the variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to point to your install location's include and lib directories.<br />
<br />
If you are building for distribution, you want to set CMAKE_INSTALL_PREFIX=/usr<br />
<br />
<pre><br />
cd ~/src/hugin<br />
mkdir hugin.hg-build<br />
cd hugin.hg-build<br />
cmake ../hugin.hg -DENABLE_LAPACK=YES -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_NSIS:BOOL=OFF \<br />
-DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF \<br />
-DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF<br />
</pre><br />
<br />
=== Build and Install ===<br />
<br />
Finally, we use make to build the code and package it, and dpkg to install it. Look for the version number in the .deb file created and edit the lines below accordingly: <br />
<br />
<pre><br />
make package<br />
sudo dpkg -i hugin-*-Linux.deb<br />
sudo ldconfig<br />
</pre><br />
<br />
'''Important:''' the package does not track dependencies yet, so it likely to fail on machines others than yours.<br />
<br />
Reference: [http://theseblog.free.fr/2007/10/building-hugin-in-ubuntu-feisty-fawn.php]<br />
<br />
== Automatic Control Point Detectors ==<br />
<br />
=== Autopano-sift-C ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install libxml2-dev<br />
</pre><br />
<br />
To build<br />
<br />
(Note January 2010 / May 2010: Currently the autopano-sift-C SVN trunk, as well as Hg default tip, is unstable, use the 2.5.1 release tarball instead)<br />
<br />
<pre><br />
mkdir -p ~/src/apsc<br />
cd ~/src/apsc<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C apsc.hg<br />
cd apsc.hg<br />
hg branches<br />
hg update -C 2.5.1<br />
cd ..<br />
mkdir apsc.hg.build<br />
cd apsc.hg.build<br />
cmake ../apsc.hg -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_BINARY_DEB:BOOL=ON \<br />
-DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF \<br />
-DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF<br />
make package<br />
sudo dpkg -i autopano-sift-C-*-Linux.deb<br />
</pre><br />
<br />
=== Match-n-shift ===<br />
<br />
Match-n-shift is yet an other Autopano-SIFT replacement. It comes in a bundle with pto file manipulation perl libraries and a rich selection of other tools that use nona, enblend, ImageMagick among other things. To use match-n-shift, you need to install at least the [http://search.cpan.org/dist/Panotools-Script/ Panotools::Script] library and some other perl modules. It requires:<br />
<br />
* Image::Size 2.9<br />
* Storable 2.0<br />
* Image::ExifTool 6<br />
<br />
Chances are that you do not need to update Storable which is a standard perl module. To check the version of installed versions of these modules, write these lines to the command prompt:<br />
<br />
perl -MStorable -le 'print Storable->VERSION;'<br />
perl -MImage::Size -le 'print Image::Size->VERSION;'<br />
perl -MImage::ExifTool -le 'print Image::ExifTool->VERSION;'<br />
<br />
There are various ways to install or upgrade these modules. Ubuntu has binary packages for many perl modules, you can skip the CPAN installation below and type:<br />
<br />
sudo apt-get install libimage-size-perl libimage-exiftool-perl<br />
<br />
Alternatively, perl is an interpreted language and these modules are pure perl, so installing from source is an easy thing.<br />
<br />
The best place to install perl modules is directly from a CPAN archive. CPAN is short for Comprehensive Perl Archive Network. The program to interact with CPAN comes with all perl installations. Start it by running:<br />
<br />
sudo cpan<br />
<br />
If this is your first time running the program you will be asked a number of questions (you can safely accept the suggested values). Last question lets you select a number of CPAN mirrors nearest to you.<br />
<br />
When all is done, you can enter the install commands after the 'cpan>' prompt:<br />
<br />
install Image::Size Storable Image::ExifTool<br />
<br />
Answer 'y' to any question of dependencies and wait for install to complete. 'exit' leaves the cpan shell.<br />
<br />
Next, you need to retrieve and install the Panotools-Script collection<br />
of perl libraries (Panotools::Script) and programs that use them -<br />
including match-n-shift:<br />
<br />
svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/Panotools-Script Panotools-Script<br />
cd Panotools-Script<br />
perl Makefile.PL<br />
make<br />
make test<br />
sudo make install<br />
<br />
Just to confuse you, you can also ignore everything above and just install Panotools::Script and all its dependencies from CPAN. From command line, type:<br />
<br />
sudo cpan Panotools::Script<br />
<br />
You can run match-n-shift from command line using the same parameters as autopano-c-complete.sh or you can modify hugin to run it for you:<br />
<br />
* start Hugin<br />
* navigate the menu File to Preferences<br />
* In the Preferences window, open the Autopano tab<br />
* Select Autopano -> Autopano-SIFT<br />
* tick the checkbox for Use alternative Autopano-SIFT program<br />
* enter the full path to match-n-shift (/usr/local/bin/match-n-shift) in the Autopano-SIFT field<br />
* enter the following string in the Arguments field:<br />
-f %f -v %v -c -p %p -o %o %i<br />
<br />
=== MatchPoint ===<br />
<br />
MatchPoint is a next generation CP generator. The result of a GSoC2007 project, it is still very experimental. Experience reports needed. Read more [http://groups.google.com/group/hugin-ptx/browse_thread/thread/cba2b2ce94dd9054 here]<br />
<br />
Matchpoint is now located inside the main hugin source tree, no need to checkout separately. It is compiled together with hugin, but not installed by default.<br />
<br />
* copy the MatchPoint executable into /usr/local/bin manually<br />
<pre><br />
cd ~/src/hugin/hugin.hg-build<br />
sudo cp src/matchpoint/matchpoint /usr/local/bin/<br />
</pre><br />
* edit /usr/local/bin/autopano-c-complete.sh (do it with sudo to have the necessary permission)<br />
** line 79: replace the .key.gz extension with .key (not sure if matchpoint supports compression)<br />
** lines 83 and 88: replace '''generatekeys "$arg" $FILENAME $SIZE''' with '''matchpoint "$arg" $FILENAME''' (not sure if the size option or any other options of the original generatekeys are applicable)<br />
<br />
=== Pan-o-matic ===<br />
<br />
Yet another control point generator [http://aorlinsk2.free.fr/panomatic/?p=home Home Page]<br />
<br />
<pre>sudo apt-get install libboost-dev</pre><br />
<br />
Download [http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4 Panomatic 0.9.4 bz2] and if you're on Ubuntu 9.10 or newer also the [http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch] for the gcc4.4 compiler.<br />
<br />
<pre><br />
mkdir -p ~/src/panomatic<br />
cd ~/src/panomatic<br />
wget "http://aorlinsk2.free.fr/panomatic/download.php?d=7&v=0.9.4" -O panomatic-0.9.4-src.tar.bz2<br />
wget http://aorlinsk2.free.fr/panomatic/panomatic_gcc44.patch patch<br />
tar xvfj panomatic-0.9.4-src.tar.bz2<br />
cd panomatic-0.9.4<br />
patch -p 1 < ../panomatic_gcc44.patch<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use Pano-o-matic, open Hugin<br />
<br />
* In File > Preferences > Autopano :<br />
* Select Autopano-SIFT<br />
* Check "Use alternative autopaon-SIFT program"<br />
* Choose the path to the binary ( /usr/local/bin )<br />
* In Arguments, put : -o %o %i<br />
<br />
==== Pablo's variation ====<br />
<br />
Around the end of the year 2009, Pablo integrated a [http://groups.google.com/group/hugin-ptx/browse_thread/thread/d9c0558c679cad52 new] experimental descriptor based on the geometric blur and DAISY papers. Also, Pablo said that the algorithm is not really based on a published approach, just on some ideas that are mentioned in a few of them, and its currently simpler than any of them:<br />
<br />
o geometric blur: [http://www.eecs.berkeley.edu/~aberg/gb.html]<br />
<br />
o daisy: [http://cvlab.epfl.ch/~tola/daisy.html]<br />
<br />
o descriptor learning: [http://cvlab.epfl.ch/~brown/learndesc/learndesc.html]<br />
<br />
To build that version of panomatic instead, follow these instructions:<br />
<br />
This is current the subject of a GSoC 2010 project and may be available in future versions of Hugin.<br />
<br />
<pre><br />
sudo aptitude install libboost-python-dev bzr cmake libvigraimpex-dev<br />
</pre><br />
<br />
<pre><br />
bzr branch lp:~pablo.dangelo/hugin/panomatic-lib<br />
mkdir build<br />
cd build<br />
cmake ../panomatic-lib<br />
make<br />
sudo make install<br />
</pre><br />
<br />
To use the new descriptor the arguments for Hugin are: '''--sieve1size 100 --sieve2size 2 -o %o %i'''<br />
<br />
== Image-ExifTool ==<br />
<br />
ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in image, audio and video files. [http://www.sno.phy.queensu.ca/~phil/exiftool/=home Home Page]<br />
<br />
<pre><br />
sudo apt-get purge libimage-exiftool-perl<br />
</pre><br />
<br />
<pre><br />
wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.30.tar.gz<br />
tar -xzf Image-ExifTool-8.30.tar.gz<br />
cd Image-ExifTool-8.30<br />
perl Makefile.PL<br />
make test<br />
sudo make install<br />
</pre><br />
<br />
== Pano Viewers ==<br />
<br />
=== PanoGLView ===<br />
<br />
PanoGLView is an OpenGL hardware accelerated interactive immersive viewer for equirectangular images.<br />
<br />
Pre-Requisites:<br />
<pre>sudo apt-get install wx-common</pre><br />
<br />
To build and install:<br />
<pre><br />
mkdir -p ~/src/panoglview<br />
cd ~/src/panoglview<br />
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/panoglview pglv.hg<br />
cd pglv.hg<br />
hg update<br />
./bootstrap<br />
./configure<br />
make<br />
sudo make install<br />
</pre><br />
<br />
=== FreePV - DEPENDENCIES ARE BROKEN - FAILS TO BUILD ===<br />
<br />
Pre-Requisites:<br />
<pre><br />
sudo apt-get install cmake make pkg-config g++ mozilla-devscripts freeglut3-dev zlib1g-dev \<br />
libjpeg-dev libxext-dev libxmu-dev x11proto-xf86vidmode-dev libxxf86vm-dev libnspr4-dev \<br />
libxml2-dev libpng12-dev<br />
</pre><br />
To build<br />
<pre><br />
svn co https://freepv.svn.sourceforge.net/svnroot/freepv/freepv/trunk/ freepv<br />
cd freepv<br />
cmake .<br />
make<br />
sudo make install<br />
</pre><br />
<br />
== Notes for Packagers ==<br />
* The deb packages built by CMake (2.8.2) are broken by Debian standard. Better not distributing them. There are official updated recent packages at<br />
*:http://packages.debian.org/hugin<br />
*:http://packages.debian.org/hugin-tools<br />
*:http://packages.debian.org/hugin-data<br />
* to get an updated ChangeLog from Mercurial repositories (Hugin has it also in the cmake invocation, use '''-DUPDATE_CHANGELOG=1''')<br />
<pre><br />
hg log --follow --style=changelog <br />
</pre><br />
* in Hugin<br />
* to update the ChangeLog in SVN repositories (Panotools)<br />
<pre><br />
svn up<br />
svn2cl<br />
svn ci<br />
</pre><br />
<br />
[[Category:Software:Hugin]]<br />
[[Category:Software:Platform:Linux]]</div>BBBrighthttps://wiki.panotools.org/index.php?title=Historical:SoC2007_Supporters&diff=7926Historical:SoC2007 Supporters2007-03-08T09:13:49Z<p>BBBright: /* Individuals */</p>
<hr />
<div>'''instructions'''<br />
* if you don't have one yet, [http://wiki.panotools.org/wiki/index.php?title=Special:Userlogin&type=signup open a Panotools wiki account]<br />
* Log in with your Panotools wiki account<br />
* find below which category better fits you<br />
* click on the edit link next to the category title<br />
* add your entry as a bullet point at the end of the page (see the examples above you)<br />
* enter your name, place and role in the panoramic community<br />
* if possible, add a link to some relevant panoramic work next to your name<br />
<br />
==The following organizations and users support the Open Source developers in their efforts to become a mentoring organization for Google's Summer of Code 2007:==<br />
<br />
===Organizations===<br />
Mouth to Source - Navigate the world by river. Add your river to this global initiative and experience some of the greatest journeys on Earth. [http://www.mouthtosource.net]<br />
<br />
===Individuals===<br />
hdri, paris, france<br />
* Dries Schuddinck, Uitbergen, Belgium, webdesigner<br />
* Yuval Levy, Québec, Canada, photographer [http://www.photopla.net/060825montpellier/]<br />
* Bruno Postle, UK. Designer/engineer, user of [[panotools]] and [[hugin]]. Panotools wiki contributor [http://www.bruno.postle.net/panorama/].<br />
* Roger Williams, Japan. Photographer [http://www.usefilm.com/member/roger/], user of [[panotools]].<br />
* Jeffrey Martin, Czech Republic. Photographer, user of [[panotools]] and [[hugin]]. [http://www.prague360.com]<br />
* Ken Turkowski, United States, scientist and developer of panorama software, including [[QuickTime VR]] and [[DeFish]]. [http://www.worldserver.com/turk], [http://www.realitypixel.com]<br />
* Mark Fink, United States, photographer [http://northernlight.net], Universal pano head developer [http://pinnacle-vr.com]<br />
* Toni Garbasso, Roma, Italy, photographer [http://www.studioargento.com/]<br />
* Pip Price, Photographer, UK, [http://pipsqueakmedia.biz], creator of Peak District View [http://peakdistrictview.com]<br />
* Claudio Lanconelli, Ravenna, Italy, photographer, user of [[hugin]] [http://www.viaggioinromagna.it]<br />
* Jim Watters, Canada, Photographer [http://photocreations.ca] and software developer and contributer to [[panotools]]<br />
* Luis Roberto De León, Monterrey, Mexico. photographer and multimedia creator (www.solucionesvisuales.com)<br />
* Milko Amorth, Vancouver, Canada, VR Photography [http://www.vrcanada.ca/]<br />
* Pierre Converset, Séné, France, peintre et photographe.<br />
* Geoffrey Morelle, Tourcoing, France, Photographer [http://www.geoffreymorelle.com/]<br />
* John J Housser, Canada, VR Photographer [http://housser.ca/], User of [[panotools]] and [[hugin]] in panoramic photography workshops using open-source software [http://housser.ca/?content=view_vr&id=152]<br />
* Waleed Nassar, Cairo, Egypt, VR Photographer [http://www.madeena360.com/]<br />
* Jérôme Muffat-Méridol, Paris, France, Photographer [http://www.webphotomag.com/]<br />
* Luca Zampieri, Roma, Italy, photographer [http://www.studiothema.it/]<br />
* Uri Cogan, Salt Spring Island, BC, Canada, Artist [http://www.uricogan.com/]<br />
* Vincent Massy, Grimentz, Suisse, utilisateur panotools<br />
* Sebastian Nowozin, Germany. Author of autopano-sift [http://cs.tu-berlin.de/~nowozin/autopano-sift/]<br />
* Eric Verdier, Zacatecas, Mexico, architecte photographer,[http://www.ledetour.com/]<br />
* Eduardo Hutter, Montreal, Quebec, Canada. Panotools user<br />
* J.D. Smith, United States, Astronomer and developer/user of [[Hugin]]/[[panotools]] and related imaging toolsets (e.g. [[Multi-Layer TIFF editing with the Gimp]], [http://turtle.as.arizona.edu/jdsmith/exposure_blend.php], [http://turtle.as.arizona.edu/im/mdr16])<br />
* Keith Martin, London, UK[http://www.thesmallest.com/vr/]. VR photographer, MacUser magazine technical editor [http://www.macuser.co.uk/] and Senior Lecturer in Publishing, LCC, University of the Arts, London[http://www.lcc.arts.ac.uk/]<br />
* Serge Maandag, Middelburg, Netherlands. Enthousiastic non profit user of VR panorama software and freetime photographer [http://pano.maandag.com/]<br />
* Landis Bennett, SF Bay Area, California, USA - VR Photographer, World Wide Panorama organizer [http://worldwidepanorama.com/], PanoTools user<br />
* Giuseppe Rota, Brescia, Italy, author of Qtpfsgui [http://qtpfsgui.sourceforge.net].<br />
* UKAI Ippei; Nagoya, Japan; developer/localiser of hugin, mainly worked on Mac OS X port; undergraduate Informatics student at The University of Edinburgh.<br />
* Jean-François PARIS, France, freetime photographer. [http://www.flickr.com/photos/jfparis/sets/72157594246390232/]<br />
* Roger Howard, technologist, community ambassador, and VR photographer<br />
* Philippe Lainé, Villeneuve-sur-Lot, France, VR Photographer and multimedia creator<br />
* Petrus van der Merwe, Cape Town, South Africa, Multimedia developer & panorama photographer. User of Hugin and Panotools.<br />
* G E Scott Knauss, Naples, Italy, Panoramic Photographer, User of Hugin and Panotools on Linux. [http://www.flickr.com/photos/immauss/sets/72157594345434375/]<br />
* Matteo Brusa, Panotools user.<br />
* Thomas Steiner, Hugin user; Vienna, Austria<br />
* Alessandro Ugazio, Torino, Italy, freetime photographer [http://www.ziouga.it]<br />
* Carl von Einem, Photographer, Panotools wiki contributor; Munich, Germany<br />
* Timo Schnitzlein, tech translator annd amateur photographer, Munich, Germany<br />
* Sara Caccivio, Firenze, Italy, Architect<br />
* Tim Poulsen, Rochester, NY, web developer and amateur photographer [http://www.skypanther.com]<br />
* Ira Machefsky, Englewood, NJ, amateur photographer and panoramist<br />
* Michael Bajko, Waitakere City, Aotearoa/New Zealand; Actor, farmer, panographer.<br />
* Sukry, Kuala Lumpur, Photographer/computer tech.[http://flickr.com/photos/kanyor/402829616/]<br />
* Elfinn Færevåg, Amateur photographer.<br />
* Bob Bright, Victoria, Canada, panographer & hugin user.</div>BBBright