You are on page 1of 4

VISVESVARAYA TECHNOLOGICAL UNIVERSITY BELGAUM-590014

For the academic year 2011-2012 A Synopsis on

IMPLEMENTATION OF IMAGE REGISTRATION BY TEMPLATE MATCHING


BACHELOR OF ENGINEERING IN ELECTRONICS AND COMMUNICATION
Project undertaken at Department of Electronics and Communication Engineering SIR M. VISVESVARAYA INSTITUTE OF TECHNOLOGY, BANGALORE

Submitted By:
PRASHANT KUMAR [1MV08EC069] YASHASWINI.L.R [1MV08EC119] Under the Guidance of guidance of PRIYANKA PRASAD [1MV08EC073]

Mrs.Roopa.K
Senior lecturer

Department of Telecommunication Engineering SIR MVIT Bangalore

SIR M.VISVESVARAYA INSTITUTE OF TECHNOLOGY


Department of Electronics And Communication Engineering Krishnadevarayanagar, Hunasamaranhalli, International Airport Road, Via Yelahanka, Bangalore-562157 FEBRUARY 2012

IMPLEMENTATION OF IMAGE REGISTRATION BY TEMPLATE MATCHING

Aim:
To implement image registration by template matching or pattern recognition with statistical approach in order to establish the correspondence between the reference image and sensed image.

Introduction:
Image registration is the process of overlaying two or more images of the same scene taken at different times, from different viewpoints, and/or by different sensors or it is the process of combination the different sets of data of the same object, which come from different modalities It geometrically aligns two imagesthe reference and sensed images. Image registration is a crucial step in all image analysis tasks in which the final information is gained from the combination of various data sources like in image fusion, change detection, and multichannel image restoration. Template matching is one fundamental task occurring in countless image analysis applications. Template matching is the process of finding the location of a sub image, called a template, inside an image. The template matching application for matching a small image which is a part of big image with given big image. Once a number of corresponding templates are found, their centres are used as corresponding control points to determine the registration parameters. Template matching involves comparing a given template with windows of the same size in an image and identifying the window that is most similar to the template. The basic template matching algorithm consists in calculating at each position of the image under examination a distortion function that measures the degree of similarity between the template and the image. Then, the minimum distortion, or maximum correlation, position is taken to locate the template into the examined image. However, as far as template matching is concerned, Normalized Cross Correlation (NCC) is often the adopted for similarity measure.

Block diagram:

Original image
Template matching using Normalised Cross-Correlation

Registered image

Template

Algorithm:
The algorithm for template matching using NCC is implemented in MATLAB. The following algorithm does the template matching and uses the Cauchy-Schwartzs inequality to simplify the procedure. i. Load the original image and template. ii. Pad the image on all the sides with zeros so that the centre of the template falls on the very first pixel of the main image when kept on the top-left corner as shown in Fig. 1

Template Original image Padded

Fig.1 Template matching a Calculate the size of the template. b Pad rows of zeros on the top and bottom of main image. The number of rows is equal to the size of template in y-direction divided by 2. c Pad columns of zeros on the left and right side of the above image with number of columns equal to the size of template in z-direction divided by 2 and the length of columns being main image size in y-direction plus size of template in y-direction. iii. Now, move the mask over the entire image and simultaneously calculate the values of summation of template padded image under the template and store it in an array. iv. Also calculate the values of padded image under the templates square and sum all the values. Take the square root of the obtained value and store it in an array. v. Divide the result obtained in step (iii) by the result obtained in step (iv). vi. Find the position where the maximum value in the above result falls. The co-ordinates so obtained will give the best match of the template and calculate maximum cross correlation coefficient. vii. Recover the template from the main image using the above obtained co-ordinates and the size of template.

Application:
According to the manner of image acquisition its application is divided into four methods:Different viewpoints (multiview analysis):Images of the same scene are acquired from different viewpoints. The aim is to gain larger a 2D view or a 3D representation of the scanned scene. Examples of applications: Remote sensingmosaicing of images of the surveyed area. Computer visionshape recovery (shape from stereo). Different times (multitemporal analysis): Images of the same scene are acquired at different times, often on regular basis, and possibly under different conditions. The aim is to find and evaluate changes in the scene which appeared between the consecutive image acquisitions. Examples of applications: Remote sensingmonitoring of global land usage, landscape planning. Computer visionautomatic change detection for security monitoring, motion tracking. Medical imagingmonitoring of the healing therapy, monitoring of the tumour evolution. Different sensors (multimodal analysis):Images of the same scene are acquired by different sensors. The aim is to integrate the information obtained from different source streams to gain more complex and detailed scene representation. Examples of applications: Remote sensingfusion of information from sensors with different characteristics like panchromatic images, offering better spatial resolution, color/multispectral images with better spectral resolution, or radar images independent of cloud cover and solar illumination. Medical imagingcombination of sensors recording the anatomical body structure like magnetic resonance image (MRI), ultrasound or CT with sensors monitoring functional and metabolic body activities like positron emission tomography (PET), single photon emission computed tomography (SPECT) or magnetic resonance spectroscopy (MRS). Results can be applied, for instance, in radiotherapy and nuclear medicine.

Bibliography:
Luigi Di Stefano, Stefano Mattoccia, Martino Mola DEIS-ARCES, An Efficient Algorithm for Exhaustive Template Matching based on Normalized Cross Correlation, IEEE computer society, Proceedings of the 12th International Conference on Image Analysis and processing,2003. H.S. Alhichri, M. Kamel, Virtual circles: a new set of features for fast image registration, Pattern Recognition Letters 24 (2003)11811190. Rafael c. Gonzalez, richard e. Woods:Digital Image Processing Second Edition

You might also like