Fork me on GitHub
Generic Programming
for Computer Vision
The VIGRA Computer Vision Library
Version 1.11.1
[ HCI Homepage | What is VIGRA? | Features | Documentation | Download | License ]
What's VIGRA?  VIGRA stands for "Vision with Generic Algorithms". It's an image processing and analysis library that puts its main emphasis on customizable algorithms and data structures. VIGRA is especially strong for multi-dimensional images, because many algorithms (e.g. filters, feature computation, superpixels) are implemented for arbitrary high dimensions. By using template techniques similar to those in the C++ Standard Template Library, you can easily adapt any VIGRA component to the needs of your application, without thereby giving up execution speed. As of version 1.7.1, VIGRA also provides extensive Python bindings on the basis of the popular numpy framework.

VIGRA was originally designed and implemented by Ullrich Köthe. Meanwhile, many people have contributed to the effort, look at the credits page for details.

Documentation: You can look at some example programs. The most comprehensive description of VIGRA's design (albeit in German) is U. Köthe's PhD thesis:
Generische Programmierung für die Bildverarbeitung
Two of U. Köthe's articels also describe the main ideas behind VIGRA:
Reusable Software in Computer Vision, in: B. Jähne, H. Haußecker, P. Geißler: "Handbook on Computer Vision and Applications", volume 3, Academic Press, 1999.
STL-Style Generic Programming with Images, in: C++ Report Magazine 12(1), January 2000
Mailing List:
Subscribe to the VIGRA Mailing List to get instant information about new releases, discuss VIGRA's features and development, and ask the experts for help.
Download: Current development snapshot as a git repository at GitHub:
  • git clone
It is generally safe to use the 'master' branch of the development snapshot, as we avoid uploading untested or incompatible changes to this branch. This also means that one should never develop in the 'master' branch directly -- always create a new branch and issue a merge request. This is made very easy by the 'fork' and 'pull request' functionality of GitHub. Please make ample use of the powerful features provided by GitHub (including issue tracking and change discussion).

Official VIGRA version 1.11.1 (May 19, 2017):

  • source tarball with documentation (for all platforms, to be built with cmake, please read the installation instructions)
  • Linux 64-bit binaries:
    • binaries for the C++ library are probably provided by your Linux distribution (and are readily created from the source by make package)
    • VIGRA Python bindings can be downloaded via the anaconda package manager:
      • conda install -c ukoethe vigra=1.11.1
      Depending on the Python version in the active environment, conda will pick the correct VIGRA variant automatically. Packages are available for Python 2.7, 3.4, and 3.5. You can also create a new environment with a specific Python version (here: 3.4) by calling
      • conda create -n vigra -c ukoethe python=3.4 vigra=1.11.1
        source activate vigra
  • Windows 64-bit binaries:
    • binaries with sources and documentation for Visual Studio 2015, including dependencies (jpeg, png, tiff, hdf5)
    • VIGRA Python bindings for Python 3.5 can be downloaded via the anaconda package manager. Set up and activate a Python 3.5 environment and call
      • conda install -c ukoethe vigra=1.11.1
      If you need Python 2.7, anaconda's default packages are unfortunately unsuitable because they require an ancient compiler which is unable to compile VIGRA. However, you can create a new environment holding all dependencies (including Python 2.7) compiled with Visual Studio 2012 by calling
      • conda create -n vigra -c ukoethe python=2.7.10.vc11 vigra=1.11.1.vc11
        activate vigra
  • Apple Mac OS X binaries
    • MacPort (VIGRA 1.11.0 and 1.10.0, maintained by Benjamin Seppke, see his usage notes)
    • Fink Package Manager support (VIGRA 1.10.0, maintained by Hanspeter Niederstrasser, see his usage notes)

The current version is known to run with gcc 4 and later (UNIX, Linux, MacOS, cygwin, alpha, including 64-bit compilation), clang (Linux, MacOS), and Microsoft Visual Studio 2012 and above. VIGRA should run with any compiler that conforms to the C++ standard. Please direct questions and bug reports to the VIGRA Mailing List (you must subscribe before posting) or to Please do also read the installation instructions.

Older versions: vigra 1.11.0 (March 17, 2016), vigra 1.10.0 (Nov 18, 2013), vigra 1.9.0 (Nov 06, 2012), vigra 1.8.0, vigra 1.7.1, vigra 1.7.0, vigra 1.6.0, vigra 1.5.0, vigra 1.4.0, vigra 1.3.3, vigra 1.3.2, vigra 1.3.1, vigra 1.3.0, vigra 1.2.0, vigra 1.1.6, vigra 1.1.5, vigra 1.1.4, vigra 1.1.3, vigra 1.1.2, vigra 1.1.1, vigra 1.0

VIGRA is subject to the MIT license. You may use VIGRA in commercial products.
Related Software:
A number of software packages enhance VIGRA's capabilities. You may want to install them as well:
(Look also at the
changelog page
for the newest additions.)
Images and Multi-dimensional Arrays:
  • templated image data structures for arbitrary pixel types, fixed-size vectors
  • multi-dimensional arrays for arbitrary high dimensions and arbitrary element types
  • chunked arrays for data bigger than RAM
  • efficient grid graph class for graph-based image processing (arbitrary high dimensions)
  • input/output of many image file formats: Windows BMP, GIF, JPEG, PNG, PNM, Sun Raster, TIFF (including 32bit integer, float, and double pixel types and multi-page TIFF), Khoros VIFF, HDR (high dynamic range), Andor SIF, OpenEXR
  • input/output of images with transparency (alpha channel) into suitable file formats
  • comprehensive support for HDF5 (input/output of arrays in arbitrary dimensions)
  • continuous reconstruction of discrete images using splines: Just create a SplineImageView of the desired order and access interpolated values and derivative at any real-valued coordinate.
Image Processing:
  • exrpession templates for easy array arithmetic
  • image resizing using resampling, linear interpolation, spline interpolation etc.
  • geometric transformations: registration, rotation, mirroring, arbitrary affine transformations
  • color space conversions: RGB, sRGB, R'G'B', XYZ, L*a*b*, L*u*v*, Y'PbPr, Y'CbCr, Y'IQ, and Y'UV
  • real and complex Fourier transforms in arbitrary dimensions, cosine and sine transform (via fftw)
  • noise normalization according to Förstner
  • computation of the camera magnitude transfer function (MTF) via the slanted edge technique (ISO standard 12233)
  • separable and FFT-based convolution in arbitrary dimensions, Gaussian filters and their derivatives, Laplacian of Gaussian, sharpening etc., non-separable convolution in 2D
  • multithreaded filter execution
  • resampling convolution (input and output image have different size)
  • recursive filters (1st and 2nd order), exponential filters
  • non-linear diffusion (adaptive filters), hourglass filter
  • total-variation filtering and denoising (standard, higer-order, and adaptive methods)
  • differential features: gradient magnitude, eigenvalues of Hessian matrix and structure tensor, Laplacian of Gaussian in arbitrary dimensions
  • tensor image processing: structure tensor, boundary tensor, gradient energy tensor, linear and non-linear tensor smoothing, eigenvalue calculation etc. (2D and 3D)
  • distance transform (Manhattan, Euclidean, Checker Board norms), vector distance transform, eccentricity transform in arbitrary dimensions, 2D skeletonization with automatic pruning
  • morphological filters and median (2D and 3D)
  • Loy/Zelinsky symmetry transform
  • Gabor filters
Image Analysis and Segmentation:
  • edge detectors: Canny, zero crossings, Shen-Castan, boundary tensor
  • corner detectors: corner response function, Beaudet, Rohr and Förstner corner detectors tensor based corner and junction operators
  • region growing: seeded region growing, watershed algorithm
  • superpixels: watersheds, SLIC superpixels (arbitrary dimensions)
  • connected components labeling (arbitrary dimensions)
  • detection of local minima/maxima (arbitrary dimensions)
  • tensor-basesd image analysis (2D and 3D)
  • powerful incremental computation of region and object statistics (arbitrary dimensions)
  • sophisticated graph-based image analysis, e.g. agglomerative clustering
Machine Learning:
  • random forest classifier with various tree building strategies
  • variable importance, feature selection (based on random forest)
  • unsupervised decomposition: PCA (principle component analysis) and pLSA (probabilistic latent semantic analysis)
Mathematical Tools:
  • special functions (error function, splines of arbitrary order, integer square root, chi square distribution, elliptic integrals)
  • dual numbers and automatic differentiation
  • random number generation
  • rational and fixed point numbers
  • quaternions
  • polynomials and polynomial root finding
  • matrix classes, linear algebra, solution of linear systems, eigen system computation, singular value decomposition
  • optimization: linear least squares, ridge regression, L1-constrained least squares (LASSO, non-negative LASSO, least angle regression), quadratic programming, non-linear least squares (using the Levenberg-Marquardt algorithm with automatic differentiation)
Inter-language support:
  • Python bindings in both directions (use Python arrays in C++, call VIGRA functions from Python), supports Python 2.7. and 3.5
  • Matlab bindings of some functions (currently unsupported)

© Ullrich Köthe (
Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany

VIGRA 1.11.1
May 19, 2017