DESCRIPTION
In this assignment, you will write code to detect discriminating features in an image and find the best matching features in other images. Because features should be reasonably invariant to translation, rotation (plus illumination and scale if you do the extra credit), youll use a feature descriptor discussed during lecture and youll evaluate its performance on a suite of benchmark images. As part of the extra credit youll have the option of creating your own feature descriptors.
In the Project, you will apply your features to automatically stitch images into a panorama.
DESIGN A FEATURE DETECTOR
This involves three steps: feature detection, feature description, and feature matching.
Feature detection
In this step, you will identify points of interest in the image using the Harris corner detection method. The steps are as follows (see the lecture slides/readings for more details):
- For each point in the image, consider a window of pixels around that point.
- Compute the Harris matrix H for that point, defined as:
where the summation is over all pixels (u,v) in the window. The weights w(.,.) should be chosen to be circularly symmetric (for rotation invariance). A common choice is to use a 33 or 55 Gaussian mask. Note that H is a 22 matrix. To find interest points, first compute the corner strength function (the Harris operator).
Once youve computed c for every point in the image, choose only the points for which their c is above a userdefined threshold. You also want c to be a local maximum in at least a 33 neighborhood.
Feature description
Now that youve identified points of interest, the next step is to come up with a descriptor for the feature centered at each interest point [rotational invariance should be taken into account in this step]. This descriptor will be the representation youll use to compare features in different images to see if they match.
Feature matching
Now that youve detected and described your features, the next step is to write code to match them, i.e., given a feature in one image, find the best matching feature in one or more other images. This part of the feature detection and matching component is mainly designed to help you test out your feature descriptor. The simplest approach is the following: write a procedure that compares two features and outputs a distance between them. For example, you could simply sum the absolute value of differences between the descriptor elements. You could then use this distance to compute the best match between a feature in one image and the set of features in another image by finding the one with the smallest distance.
Two distance measures you should implement are:
- A threshold on the match score. This is called the SSD distance.
- (score of the best feature match)/(score of the second best feature match). This is called the ratio test.
Testing
Using the OpenCV API you can load in a set of images, view the detected features using cv::drawKeypoints(), and visualize the feature matches that your algorithm computes using cv::drawMatches().
We are providing a set of benchmark images to be used to test the performance of your algorithm as a function of different types of controlled variation (i.e., rotation, scale, illumination, perspective, blurring).
Here is a list of suggestions for extending the program for extra credit. You are encouraged to come up with your own extensions as well. Feature detection and matching is an active area in computer vision there are many interesting techniques you can attempt here based on techniques on the literature and on your own ideas.
- Make your feature more contrast invariant. This was discussed in lecture.
- Implement adaptive non-maximum suppression (MOPS paper).
- Make your feature detector scale invariant.
- Implement a method that outperforms the SSD ratio test for deciding if a feature is a valid match.
- Use a fast search algorithm to speed up the matching process. You can use code from the web or write your own (with extra credit proportional to effort). Some possibilities in, rough order of difficulty: k-d trees (code available here), wavelet indexing, localitysensitive hashing.
Reviews
There are no reviews yet.