- Main Page
- Data Structures
- Files
- Related Pages

# VisionLab Features Library

Version:
  0.9

Author:
  Andrea Vedaldi (mailto:vedaldi@cs.ucla.edu)

  Brian Fulkerson (mailto:brian@cs.ucla.edu)

Copyright © 2007 Andrea Vedaldi and Brian Fulkerson

This library contains implementations of common computer vision algorithms, with a special focus on visual features for matching image regions. Applications include structure from motion, object and category detection, object and category recognition.

## Contents

- Overview
- Coding style
  - Memory management
- Glossary
- Support functionalities
  - Atomic data types, errors, and others
  - Math operations
  - String operations
  - Image operations
  - Rodrigues formuals
  - MATLAB MEX helper functions
- Algorithms
  - Scale Invariant Feature Transform (SIFT)
  - Maximally Stable Extremal Regions (MSER)
  - Integer K-means (IKM)
  - Hierarchical Integer K-means (HIKM)
  - Agglomerative Information Bottleneck (AIB)

## Overview

We want VLFeat C library to provide solid implementations a small set of useful computer vision algorithms. Our target users are other computer vision researchers. The library aims to be:

- Accurate. Algorithms should be well defined and (when possible) close to the description/implementation of the original authors.
- Easy to use. The library should be easy to compile and setup. The user interface should be simple and flexible. The documentation should be clear and complete.
- Open. The code should be easy to read, understand and modify. It should also be easy to extract from the library a particular algorithm.

We think that the best way of achieving many of these results is to keep the library as simple and fruible as possible. The library is therefore designed to be:

- Minimal. The VLFeat C library implements only the core algorithms. This reduce clutter, ease maintenance and make it possible to produce high quality code for the parts that really matter.
- Flat. The intra-dependencies among library modules are not deep. Preferably, each algorithm depends only on the basic modules (IO, math, ...). This simplifies understanding and maintaining each algorithm, and make it possible to "copy and paste" code from the library to other projcets.
- Portable. The library adheres to the commom C standars (mostly C-89, with a few exceptions) and has no external dependencies. This makes much easier for new users to compile and modify the library.
- Slef-documenting. Documentation is embedded in the source code in Doxygen format. The documentation includes accurate descriptions of each algorithm.

## Coding conventions and style

This section describes the coding conventions that the library uses.

### Memory management

Memory is allocated and freed by means of vl_malloc(), vl_free(), vl_realloc() functions, which are stubs pointing to the actual function to use. So when the library is linked to a MATLAB MEX file, it is possible to use MATLAB memory allocation functions instead of the operating system ones. The advantage is that MATLAB memory handler will free the allocated buffers in the case a MEX file is interrupted (Ctl-C).

This also requires a bit of care to work as intended:

- The library must be thread safe.

- Objects must have allocation and de-allocation methods. Garbage collection (e.g. MATLAB exiting a MEX file) can be performed only after all objects have been deleted. So in effect garbage collection is useful only to clean-up after an interrupted computation.

- Static objects are not safe as they would violate the garbage collection rule. For instance, one should not alocate static buffers in functions, as the buffer could be stealed by sucessive garbage collection.

## Glossary

- Column-major. A M x N matrix A is stacked with column-major order as the sequence . More in general, when stacking a multi dimensional array this indicates that the first index is the one varying most quickly, with the other followed in the natural order.
- Opaque structure. A structure is opaque if its fields are not meant to be accessed directly but by means of appropriate interface functions. This techniuqe improves robustness and and isolates the implementation from the interface, much in the spirit of object-oriented programming.
- Row-major. A M x N matrix A is stacked with row-major order as the sequence . More in general, when stacking a multi dimensional array this indicates that the last index is the one varying most quickly, with the other followed in reverse order.