Tangent Distance Implementation

Here you can find the RWTH-i6 C-implementation of the tangent distance for image comparison tolerating small transformations (the image above shows some transformations that are tolerated; the images two to eight have a tangent distance of zero to the first (original) image). The software was originally developed for my diploma thesis experiments. It follows the ideas presented in Patrice Simard's papers (cited in the publications below). We have found that it improves recognition in very different appearance-based classification applications, like (of course) OCR, medical image categorization, gesture and sign language recognition, and local patch based classification (some publications about these topics can be found here). The filter kernels are optimized for small images, so if you want to use it for images larger than say 32x32 pixels, it might be helpful to change the filter kernel or use a Gaussian filter before calculating the tangent vectors.


The source code is released under the GNU General Public License Version 2.


tangent-distance-GPL.tar.gz (12k)

You are welcome to use the code under the terms of the licence for research or commercial purposes, however please acknowledge its use with a citation of one of the publications below.

Note: The example main program uses the pgm-library to load some example images. If you want to compile it, it may be helpful to download the netpbm package.


Daniel Keysers
Last modified: Mon Jun 6 23:50:34 CEST 2005