Fork me on GitHub
Generic Programming
for Computer Vision
The VIGRA Computer Vision Library
Version 1.10.0
[ 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.10.0 (November 18, 2013):

  • sources with documentation (for all platforms, to be built with cmake, please read the installation instructions)
  • Windows 64-bit binaries:
    • includes and libraries for Visual Studio 2012, with TIFF, JPEG, and PNG support statically linked into vigraimpex.dll, but HDF5 support disabled
    • vigranumpy Python bindings for Python 2.7 and numpy 1.6.2 (compiled with Visual Studio 2012)
  • Apple Mac OS X binaries:
    • MacPort (VIGRA 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)

  • Linux binaries may be provided by your Linux distribution (and are readily created from the source by "make package")
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 2010 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.9.0 (November 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 a license which is identical to the MIT X11 License and thus compatible to the GPL. 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
  • efficient grid graph class for graph-based image processing (arbitrary high dimensions)
  • pre-instantiated images with many different scalar and vector valued pixel types (byte, short, int, float, double, complex, RGB, RGBA etc.)
  • 2-dimensional image iterators, multi-dimensional iterators for arbitrary high dimensions, adapters for various image and array subsets
  • 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:
  • STL-style image processing algorithms with functors (e.g. arithmetic and algebraic operations, gamma correction, contrast adaptation, thresholding), arbitrary regions of interest using mask images
  • image resizing using resampling, linear interpolation, spline interpolation etc.
  • geometric transformations: rotation, mirroring, arbitrary affine transformations
  • automated functor creation using expression templates
  • 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)
  • 2-dimensional and separable convolution, Gaussian filters and their derivatives, Laplacian of Gaussian, sharpening etc.
  • separable convolution and FFT-based convolution for arbitrary dimensional data
  • 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, 2D and 3D)
  • morphological filters and median (2D and 3D)
  • Loy/Zelinsky symmetry transform
  • Gabor filters
  • 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)
Image Analysis:
  • 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)
Multi-Dimensional Image Processing and Analysis:
  • point-wise transformations, projections and expansions in arbitrary high dimensions
  • regions statistics readily apply to higher dimensional data as well
  • separable convolution and FFT-based convolution filters, resizing, morphology, and Euclidean distance transform for arbitrary dimensional arrays (not just 3D)
  • connected components labeling, seeded region growing, watershed algorithm for arbitrary dimensional data
  • SLIC superpixels for arbitrary dimensional data
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)
  • Matlab bindings of some functions

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

VIGRA 1.10.0
November 18, 2013