|latest version v1.9 - last update 10 Apr 2010|
To compile the LTI-Lib using all its power, you will need the following:
autoconfversion 2.52 or higher is required to build the
configurescript, used to detect which features are installed that the LTI-Lib can make use of. The related
aclocalmust have version 1.5 or higher.
configurescripts and the
You may also need:
First, check if the
configure script already exists in your
ltilib/linux directory. If not, of if you are not sure that this is the correct one, just execute in your BASH terminal
cd ltilib/linux make -f Makefile.cvs
After that, you can configure your installation with
You can of course customize your installation with several options (type ./configure --help for more information).
Now you can compile the debug and release libraries and testers with
You can at this point make use of your local copy of the library. The
ltilib/tester/ltiTester.cpp file can be used to try out small programs. You can create two executable test programs with:
make dtester rtester
This will create in
ltilib/bin two executable files:
dtesteris your program in the debug version, with all necessary debugging information, without optimizations and the most important thing, with all possible boundary check mechanisms activated (which make the code much slower as usual!).
rtesteris your tester program in the release version, which runs much faster than the debug one.
ptestercan also be used if you want to profile your code.
*.cpp file in the
ltilib/linux/workbench directory will also be compiled and linked to the tester/rtester programs, so that you can build more complex test applications.
You can also install the library in your system, assuming you have write privileges for the
--prefix directory given in the
configure script (if nothing was given,
/usr/local is the default). Just try:
The Makefile in
ltilib/linux/Makefile provides many options and targets. Use the targets as usual, i.e. just type
in your xterm, konsole, or whatsoever bash-terminal you are using. Using make without target is equivalent to calling target all-debug and all-release, thus building the library and testers in debug and release version.
The most useful targets are:
./configure --helpfor more information).
With the variable
DEBUGEXC set to
-D_DEBUG_EXCEPTION you can control if the lti::exceptions will write to std::err a text message that should help you to debug your programs. However, this can (or should) be set in your
extrapaths.mk file, in order to survive your next "configure" (see the next section for more information).
For the use of many frame-grabbers and other hardware related classes, it is usually required that some special hardware drivers or hardware related libraries can be linked with the LTI-Lib. For these and many other special cases it is desirable to have a simple way to indicate:
Include paths are required by almost any frame-grabber or camera utility, except if you provide that all headers can be found in the standard system include paths.
Library paths are only necessary if you also specify some libraries to be linked with, which are not located in the standard library directories (e.g. /usr/lib or /usr/local/lib).
The mechanism provided by the LTI-Lib should "survive" a ./configure, since otherwise you would need to make changes to the Makefile each time you get a newer library version or you just want to reconfigure some options.
You just need to create a file called "extrapaths.mk", in which following variables are expected:
For example, to use the lti::microEnablePulnix frame-grabber/camera functor, you should include in "extrapaths.mk" following three lines
EXTRAINCLUDEPATH = -I/usr/src/menable/include EXTRALIBPATH = -L/usr/src/menable/lib EXTRALIBS = -lpulnixchanneltmc6700 -lmenable
Please note the standard GCC flags used to indicate:
-Ipath to headers
-Lpath to libraries
There is a template for such a file in the linux directory: "extrapaths_template.mk". It contains examples for the Philips ToUCam and for Pulnix + MicroEnable framegrabber.
In the directory
ltilib/examples you can find several directories with simple code examples using the LTI-Lib. You can copy any Makefile in a project of your own, in order to use the LTI-Lib without much overhead.
The LTI-Lib makes use of some C++ features and system functionality that makes following requirements necessary:
If you use the LTI-Lib Installer for Windows all required libraries can be directly installed from there.
A project that uses the LTI-Lib can either be created manually or you can let a PERL-script do the job for you. Nevertheless you should read the section about the manual creation of a project to see which settings are required.
There are always two possibilities to work with the LTI-Lib: either as source code or as static library. The first method is required if you want to make changes to existing library sources. The second is preferable if you only want to use the library or to develop new classes.
ltilib\win you will find the folders
Each contains a PERL script that generates a console project (.dsp and .dsw files) with default settings. If the project files already exist, then the scripts will only perform an update. A relative path to the sources is assumed, i.e. if you want to move your project's location, you will have to change settings manually.
console_lib project assumes you have already created and installed the library. To do this go to the directory
ltilib\win\buildLib and execute the batch file
buildLib.bat. Don't forget to set up your environment variables using the
VCVARS32.BAT file provided in your Visual C++ distribution (usually in directory
These scripts assume you have installed the GTK+ libraries. We recommend you to install them, in order to use the visualization classes of the LTI-Lib. Using the Windows Installer, this is simply a check box in the offered packages.
For example, let us assume, you are in the installation path of the library. You can create a simple tester project with:
cd ltilib\win\tester perl tester.pl --new
After that, you can open the
tester.dsw file with the Visual Studio and compile both, debug and release versions, as usual.
The following instructions apply, if you create a new project and want to adjust settings manually.
ltilib\src\basics, ltilib\src\imgProc, ltilib\src\ioBasics, ltilib\src\io, ltilib\src\io\png, ltilib\src\io\jpeg, ltilib\src\basics, ltilib\src\math, ltilib\src\viewer, ltilib\src\system, where
ltilibshould be replaced with the absolute or relative path of your ltilib directory.
buildLib.batbatch file located in
ltilib\win\buildLib(Perl must be installed!). This will build the libraries in
ltilib\lib. Additionally all header-files will be collected and placed in
ltilib.libto the debug configuration and
rltilib.libto the release configuration.
ltilib\lib\headerFilesfor all configurations.
v_buildDLLversion=0in the Perl script
techinfo.rwth-aachen.dedomain, you can get a (maybe outdated) package with all required libraries from here. If you can get this last file, unpack it into the folder
ltilib\win. Otherwise, you should get the glib, gdk and gtk libraries from here, and install them in the directories
ltilib\win\gtk+, ltilib\win\gtk+\gdk, ltilib\win\glib
glib-1.3.lib, gdk-1.3.lib, gtk-1.3.lib, gmodule-1.3.lib, gthread-1.3.lib
pdh.lib, with their respective DLLs. The last one (performance data helper) can be found here, or search the Microsoft Knowledge Base for article "Q284996".
ltilib\win\libin your PATH-variable. The required seven GTK+ related DLL-Libraries are:
gdk-1.3.dll, glib-1.3.dll, gmodule-1.3.dll, gnu-intl.dll, gthread-1.3.dll, gtk-1.3.dll, pthread.dll. And the
pdh.dllis required to.
The lti::processInfo class requires for Windows the libraries pdh.lib and pdh.dll, which are assumed to be in your default path. The lti::url class requires the libraries ws2_32.lib and ws2_32.dll, which should be already in your default path.
Also check the LTI-Lib Tutorial which contains many screenshots of the installer for windows.