Libgpiv is a library for the so-called (Digital) Particle Image Velocimetry technique (PIV). Libgpiv contains the core functions for image evaluation (resulting into estimators of particle image displacements, i.e. PIV data), validation (on peak-locking effects, erroneous vectors or outliers), post-processing, input/output functions, utility functions like memory allocation etc.
Initially, the library has been developed as it shares functionality from different applications which are a set of command-line driven tools that have been included in the Gpivtools package and a Graphic User Interface program (Gpiv).
For rapid prototyping of small (or not so small) programs, a scripting language, like Python, might be advantageous. A Python module of the Libgpiv library, called PyGpiv, provides full functionality of Libgpiv in Python scripts.

The library has been issued under the GNU General Public License (GPL) and only uses other libraries that have been issued under the GPL or other Open Source license. In this way the control is given back to the user allowing maximum flexibility for extending and adapting the code for different needs and applications. As with most of the open source projects, it is unfinished and its here to grow.

Unpacking and compilation

You can download the package here.

The most up-to-date code, that includes patches before a formal release is issued, can also be found in the Version Control System repositories at libgpiv-git. This is testing software that might include bugs and errors.

For this library you will need:

fftw library
hdf5 library
gsl library
gslcblas library
glib library
raw1394 library
dc1394 library

Generally, unpacking, compilation and installation is quite straightforward with:

gzip -d gpiv-*.tar.gz
tar -xvf gpiv-*.tar
make (to build the library)
make install
make uninstall (removes installed files and directories that have been created)

The ./compile script includes options to disable triggering and image recording. In that case, the libraries rtai, raw1394 and dc1394 are not needed. In case triggering is enabled, the Linux kernel will have to be patched and compiled following the instructions of Rtai. For image recording, the kernel will have to be enabled with IEEE 1394, OHCI-1394 and Raw IEEE1394 I/O support

Libgpiv has been included in the Debian GNU/Linux distribution. Users of this system can install the software by means of the apt-tools and aptitude, without to be bothered about library dependencies. Libgpiv is available for most of the computer architectures GNU/Debian is supporting, as well as for Debian GNU/kFreeBSD-i386. So, pick your ARCH taste ;)

The temporary directory is used to store the 'plans' for FFT by the fftw library. Therefore, set TMPDIR, TMP or TEMP to your local temporary directory. For bash shell:
export TMPDIR="$HOME/tmp"

Else, the system-wide /tmp directory will be used. This has the drawback that it may interfere with other users on the system using Gpiv c.s. and new plans will have to be calculated each time after booting up the Computer.


Documentation of the Libgpiv API can be found here. Documentation of the older API can be found here.


I hope that the code will work fine and that you'll enjoy it. If you would like to know more about PIV, wants to extend the code for your purposes or need some help, do not hesitate to drop me a line.

Gerber van der Graaf
email: gerber_graaf AT users DOT sourceforge DOT net

Last modified: Mon Nov 17 09:38:58 CET 2008