XE33PVR::Lab3 - 2D Homography

Introduction

The goal of the lab is to learn how to map images to images. The important topics are: computation of a 2D homography from point correspondences, transforming images by backward mapping.

Training case

Download the following images to your local directory:

These two images are related by 2D projective transformation. Why? Next, download the correspondence pairs. Your task is to transform the second image im2g.jpg such that it looks as the first image.

You will presumably need at least tow main functions:

A=computeA(u1,u2)
Computes the 3x3 transformation matrix from point correspondences.
newim=mapimage(A,im1,im2,interp)
Maps im1 to im2 by using the transformation matrix A . The interp parameter can be optional and it determines the interpolation method.

First, use all corresponding pairs to compute matrix A . Then, try to compute A from minimum subset of these corresponding pairs (i.e. from 4 correspondences). Use different choices of these 4 corresponding pairs and observe the variability in the quality of the result depending on particular selection of the 4 corresponding pairs. You may evaluate the quality visually, or you may also try to subtract the first image from the newly transformed image; ideally this should result in a zero matrix. Specifically, try 4 corresponding pairs which lie close to a single line. Explain the reasons for the dependency of the result on particular selection of the 4 correspondences.

Assignment 3


[XE33PVR labs | Responsible: Tomáš Svoboda ]
Last modified at 11:21, 07 November 2007 CET.