This C++ library is designed to be easy to use and portable for fast video saving, loading and display. It supports OpenGL and X Windows. It is released under the LGPL License.
- Modern C++ design
- Optimized assembly code
- Extensive use of exceptions
- OpenGL wrappers
- Type-safe easy to use images
- Flexible loading and saving from a variety of types:
- ASCII text
- PS (saving only)
- EPS (saving only)
- CVD (a custom type which supports fast, lossless compression of greyscale, RGB and Bayer images)
- External libraries required
- 1/8/16/32 bit signed and unsigned integer and 32/64 bit floating point images in greyscale, RGB and RGBA.
- Optimum bit depth and colour depth selected automatically
- Image grabbing from video sources:
- All UNIX platforms
- Live capture from HTTP server push JPEG cameras.
- All platforms
- AVI and MPEG file (all codecs supported by ffmpeg)
- list of images
- Server push multipart JPEG streams.
- Convenient run-time selection using a URL-like syntax
- Colorspace conversions on images and video streams
- Various image processing tools
- FAST corner detection
- Harris/Shi-Tomasi corner detection
- Connect components analysis
- Image interpolation and resampling
- Drawing in to images
- Flipping, pasting, etc
- Interpolation, warping and resampling
- Integral images
- Camera calibration support: Linear, Cubic, Quintic and Harris
- Program to calibrate cameras from video
- Lie Group(S03, SE3) algebra
- Iterative and reweighted least-squares
- Random numbers
LibCVD will compile on any reasonable unixy environment, with a reasonable C++ compiler, with TR1 and GNU Make. Additionally, libCVD supports both normal and cross compilers. It is known to work on:
-Well tested (current):
- Linux: x86, x86-64
- Mac OS X: x86
- Supports the OSX build environment including:
- .dylib libraries
- Cygwin: x86
- MinGW: x86 (native and cross compile)
- Win32: Visual Studio 2008
-Has worked on (current status unknown):
- Linux: PPC
- Mac OS X: PPC
- Solaris: SPARC
- IRIX SGI O2: MIPS
- Linux: ARM LPC3180, XScale (cross compile)
- uCLinux: Blackfin (cross compile)
- FreeBSD: x86
- OpenBSD: XScale
- Win32: Visual Studio 2005 (project file is out of date)
The normal system works:
libCVD fully supports parallel builds (
make -j48 for instance).
There are a few known library bugs which prevent the libraries working with libCVD
- TooN: If you have gcc >= 4.2.0 you need a version of TooN at least as recent as SNAPSHOT_20080725.
There are a few known compiler bugs which affect libCVD on various platforms.
- ppc-darwin (Mac OS X, on PPC)
- Does not support gcc 3.3 (20030304) due to possible compiler bug.
- Workaround: none. Install a more recent compiler.
- arm-linux (cross compiler running on i686-pc-linux-gnu)
- Internal compiler error with: gcc version 3.4.0 20040409 (CodeSourcery ARM Q1 2004) on:
Makefile and use
- Compile files with -O2 instead of -O3
OSX Compilation notes
To build libCVD in 32 bit mode, use the
configure_osx_32bit script instead of directly calling the configure script.
An xcode project is provided in the
For Win32 systems, the
build directory contains project files for different versions of Visual Studio. Currently the vc2008 solutions are supported and should work out of the box.
libCVD requires the Visual Studio feature pack for TR1 support.
There are several projects which can be compiled:
- libcvd-TooN A very basic configuration which only requires the TooN headers. You must add the TooN directory to the include path using:
- (Popup Menu) Project Properties -> (Dialog) Configuration -> C/C++ -> Common : Additional Include Directories
- libcvd-TooN-JPEG-pthreads This is a more featureful configuration which has JPEG and threading support. In order to compile CVD, you must first compile these libraries:
In order to avoid the need to set up a large number of include paths, all libCVD projects assume the existence of three environment variables describing the location of header, library and binary files (for DLLs).
INCLUDEDIR contains the header files. libcvd headers will be copied into
LIBDIR contains library files. libcvd static libraries (debug and release verions) will be copied into
BINDIR is not used for libcvd, but would be the default directory for DLLs
To use this feature, make a directory tree containing (for example):
Then set up three environment variables (e.g. using rapidee) to be the following:
libCVD will then find all headers and libraries in that directory tree. LibCVD also includes the file:
This will copy the relevant files into that tree.
libCVD compiles to static libraries for simpler linking and to avoid the _dllexport/_dllimport statements throughout the code.
Configuration of features is manual through a default config file in
build/vs2008/config-*.h. Edit this file to change your configuration, for example to support other image formats such as PNG. Alternatively, new configurations can be generated using the file:
from any unix-like environment (including MINGW and Cygwin).