One of the most popular methods to extract useful informations from an image sequence is the template matching approach. In this well known method the tracking of a certain feature or target over time is based on the comparison of the content of each image with a sample template. In this article, we propose an efficient robust template matching algorithm that is able to track targets in real time. Special attention is paid to occlusions handling and illumination variations.