Docsity

Assignment 2: Finding Image Location Using Feature Matching | CS 4495, Assignments of Computer Science

Toggle sidebar
bg1
CS 4495/7495 Computer Vision
Assignment 2: Finding image location using
feature matching
29th September 2004
1 Introduction
The ’Dove’ (meaning ’where’ in Italian) application by Bjorn Johansson and Roberto
Cipolla, which reports the location at which an image was taken, was discussed in class.
This assignment has the aim of reproducing a simple version of the ’Dove’ application.
In the process, you will get to use SIFT features for image matching and also end up
with a cool application.
Consider that you have a set of images from various locations on the Georgia Tech
campus that show the buildings on campus. Now if someone is lost on campus, he/she
takes a picture of the nearest building and sends it to you. By matching this query
image with all your stored reference images, you can tell your friend where he/she is
on campus and how to get from there to somewhere else.
In this assignment, you will implement the above system where the image matching
is performed by comparing SIFT features obtained from the images. The rest of this
document describes the process in greater detail. Each section also has a piece at
the end titled ’Deliverables’ that contains the thing you should turn in related to that
section.
2 SIFT features and reference images
The code (by David Lowe) for obtaining SIFT features from images is available at
http://www.cs.ubc.ca/˜lowe/keypoints/. The ’readme’ file in the package gives detailed
instructions on how to use the code, and the format of the text files output by the code.
We will use the matlab function ’sift’ available in the file ’sift.m’ to generate SIFT
features from matlab.
The reference set of images of the Georgia Tech campus is available as an archive
from the class website.
To obtain the query images, you should go around campus and get 5 images of
various campus buildings. Note that you should not make an effort to obtain images
that are similar to the corresponding reference images.
1
pf3
pf4
pf5

Partial preview of the text

Download Assignment 2: Finding Image Location Using Feature Matching | CS 4495 and more Assignments Computer Science in PDF only on Docsity!

CS 4495/7495 Computer Vision

Assignment 2: Finding image location using

feature matching

29th September 2004

1 Introduction

The ’Dove’ (meaning ’where’ in Italian) application by Bjorn Johansson and Roberto Cipolla, which reports the location at which an image was taken, was discussed in class. This assignment has the aim of reproducing a simple version of the ’Dove’ application. In the process, you will get to use SIFT features for image matching and also end up with a cool application. Consider that you have a set of images from various locations on the Georgia Tech campus that show the buildings on campus. Now if someone is lost on campus, he/she takes a picture of the nearest building and sends it to you. By matching this query image with all your stored reference images, you can tell your friend where he/she is on campus and how to get from there to somewhere else. In this assignment, you will implement the above system where the image matching is performed by comparing SIFT features obtained from the images. The rest of this document describes the process in greater detail. Each section also has a piece at the end titled ’Deliverables’ that contains the thing you should turn in related to that section.

2 SIFT features and reference images

The code (by David Lowe) for obtaining SIFT features from images is available at http://www.cs.ubc.ca/˜lowe/keypoints/. The ’readme’ file in the package gives detailed instructions on how to use the code, and the format of the text files output by the code. We will use the matlab function ’sift’ available in the file ’sift.m’ to generate SIFT features from matlab. The reference set of images of the Georgia Tech campus is available as an archive from the class website. To obtain the query images, you should go around campus and get 5 images of various campus buildings. Note that you should not make an effort to obtain images that are similar to the corresponding reference images.

Figure 1: SIFT features in an image displayed by vectors indicating scale, orientation, and location.

2.1 Deliverables

The deliverables for this section are your 5 query images.

3 Building the feature database

Before we do the image matching, we have to set up a database of features obtained from the reference images. We can do this simply by running the feature detector on each of the images and, in the simplest form, storing the pair ( f , k ) where f is a feature and k is the image it belongs to. Of course, we would also have to store the locations corresponding to the reference images in some place, since that is what we want to report back. The SIFT features, obtained using the code available from the class website, consist of 128 integers in the [0,255] range. To aid in the image matching, we compute the covariance matrix Σ of the features in this 128-dimensional space.

3.1 Deliverable

Run the feature detector on the image ’votetest.pgm’, available in the image archive from the class website, and turn in the image showing the features.

4 Computing similarity between features

Once we have the database of features, the next step is to come up with a procedure to compute the similarity between features. Firstly, we obtain the SIFT features from the query image. For each feature from the query image, we compute the similarity to every feature in our database. If a is a feature from the query image, and b is a feature from the database, then the similarity can be computed using the distance metric

d ( a , b ) =

( b − a ) T^ Σ−^1 ( b − a ) (1)

5.1 Deliverables

Implement the voting algorithm and, for the test image ’votetest.pgm’ available in the image archive from the class website, plot the votes obtained by the reference images as a histogram.

6 Image matching

At the end of the voting procedure (performed for all the query image features), the reference image that has the most votes is the best match for the query image. The location corresponding to this reference image is the place where the query image was taken.

6.1 Deliverables

Your deliverables are the three best matched reference images for every query image and the number of votes each one got.

7 Summary of deliverables

  • A set of five query images of buildings on campus.
  • The image showing the SIFT features in ’votetest.pgm’.
  • Code that implements the algorithm to perform the similarity computation, vot- ing, and image matching in Matlab.
  • The similarity image as described in Section 4.1 and the code to go with it.
  • The voting histogram for the test image ’votetest.pgm’.
  • The three best matched reference images corresponding to each query image and the number of votes each one got.

8 How and when to turn in

This assignment is due on 9/28 (Tuesday) before class. Put all your code, query im- ages, best match images, similarity image, and histograms (saved as image files) in a directory named , where ”prism account” is your prism account (the gtg account), tar it or zip it, and email it to the TA ([email protected]). You should also hand in during class a hard copy of your query and matched images, the histograms in each case, and the similarity image.

9 Comments

The algorithm to generate the SIFT features is described in [1]. The voting mechanism to compute the best matched image is from [2].

References

[1] D.G. Lowe. Distinctive image features from scale-invariant keypoints. Intl. J. of Computer Vision , 60(2):91–110, 2004.

[2] C. Schmid and R. Mohr. Local grayvalue invariants for image retrieval. IEEE Trans. on Pattern Analysis and Machine Intelligence , 19(5):530–535, 1997.