You need the following programs and libraries:
The following libraries are optional and only necessary if you want to use the corresponding cameras:
- Basler Pylon driver (according to the company, a Linux driver will be available soon)
- Firewire camera driver
Ubuntu 12.04 (32 bit)Edit
Start installing wxWidgets (libwxgtk2.8-dev) through the following package using this command:
sudo apt-get install libwxgtk2.8-dev
Swistrack requires OpenCV version 1.0. If you install OpenCV through the Synaptic Packet Manager you will get the latest version, which is not compatible with Swistrack. Therefore, you will need to install OpenCV 1.0 manually.
On Ubuntu 8.04, it should be enough to install the packages
- libwxgtk2.8-dev (wxWidgets)
- libhighgui-dev (OpenCV)
- libcvaux-dev (OpenCV)
Use Synaptic Packet Manager or type
sudo apt-get install libwxgtk2.8-dev sudo apt-get install libhighgui-dev libcvaux-dev
on the terminal to install these packages.
If your distribution does not provide a package, you can compile and install these libraries manually.
Manually Installing OpenCVEdit
Download the OpenCV 1.0 sources [ http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/1.0/ ]and compile and install them:
tar xfz opencv-1.0.0.tar.gz cd opencv-1.0.0 ./configure --prefix=/usr make sudo make install
For detailed installation instructions, check out the INSTALL file.
Note that the current SwisTrack Makefile expects OpenCV to be installed with the prefix /usr. If you install it elsewhere, do not forget to modify the INCL_DIRS line in the Makefile appropriately.
When installing OpenCV 1.0 in newer Ubuntu distributions you may find the following issues:
1) Error message:
../../cxcore/include/cxmisc.h:133:6: error: #elif with no expression
To fix it, change line 133 in cxmisc.h from #elif to #else.
2) Error message:
../../../otherlibs/highgui/.libs/libhighgui.so: undefined reference to `cvCaptureFromCAM_V4L(int)'
To fix it, add #define HAVE_CAMV4L after line 24 in cvconfig.h
3) Error message:
cvcap_v4l.cpp:208:28: fatal error: linux/videodev.h: No such file or directory
To fix it, install libv4l-dev and link to it with the following commands:
sudo apt-get install libv4l-dev sudo ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h
Manually Installing wxWidgetsEdit
Download the wxWidgets 2.8.8 sources (either wxGTK or wxAll) [ http://sourceforge.net/projects/wxwindows/files/wxAll/2.8.8/ ] and compile and install them.
tar xfz wxWidgets-2.8.8.tar.gz cd wxWidgets-2.8.8 ./configure make sudo make install
You are free to change the prefix here, as SwisTrack uses 'wx-config' to locate wxWidgets.
Installing Optional LibrariesEdit
If you have a FireWire camera, install the 1394camera driver.
Checking out the latest SVN TreeEdit
Check out the latest SVN tree:
svn checkout https://svn.code.sf.net/p/swistrack/code
Compiling and LaunchingEdit
You can compile SwisTrack as follows:
cd code make
This will compile libtsai (with a few warnings), camshift_wrapper, core and gui. The executable is stored as SwisTrackEnvironment/SwisTrack in the SVN tree. Lauch it as follows
cd SwisTrackEnvironment ./SwisTrack
Depending on your system configuration, SwisTrack will complain about missing libraries. You may see error messages like this:
./SwisTrack: error while loading shared libraries: libwx_gtk2_aui-2.8.so.0: cannot open shared object file: No suchfile or directory
In this case, you need to set your LD_LIBRARY_PATH variable to point to the directory where these libraries are installed. If you are using a bash shell, this can be achieved as follows:
On Ubuntu 10.10 the following is required :
export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH and create a dynamic link on the cvaux libs :
sudo ln -s libcvaux.so.2.1 libcvaux.so in /usr/lib/