Fondazione Bruno Kessler - Technologies of Vision

contains material from
Template Matching Techniques in Computer Vision: Theory and Practice
Roberto Brunelli 2009 John Wiley & Sons, Ltd


This is the code companion for the book Template Matching Techniques in Computer Vision: Theory and Practice (hereafter TM for short), published by Wiley. The book illustrates the R-code in two R packages, AnImAl and TeMa (available at the companion website), providing respectively an interactive image processing environment and a set of algorithms useful in exploring the world of template matching techniques. The structure of the companion matches that of TM: each chapter presents the abstract of the corresponding book chapter and contains code snippets, providing additional examples or insights, as well as an extended bibliography with links to the electronic edition whenever possible.

Due to website constraints, the actual sources of the code companion, including R packages, datasets, and the scripts for the generation of a PDF version of the code companion can be found at The site contains:

an image processing package for R (;
a template matching package for R (;
a set of multiracial face images with feature location (;
source and scripts for the generation of the manual you are reading (;
a modification of PovRay providing partial RenderMan support and some sample scripts (

The software is meant to be used in the GNU/Linux operating system: there is currently no support for other operating systems. The most up to date version of this manual will be the one at (and