Project 1
Anna Cavender
CSE576 - Seitz
4/15/05

For this project, I created one feature detector (using the Harris corner detection method), two feature descriptors, and two different feature matching techniques. Descriptions of each are below and after that are the results from testing.

Feature Description
I used two different feature descriptors. The first (which I call "Simple") stores the intensity values off all nine pixels of the 3x3 window around the feature. The second uses the Sobel edge detections method: http://www.cee.hw.ac.uk/hipr/html/sobel.html. Here, we apply two masked (called GxMask and GyMask) to the image:

Gx Mask is:

-1 0 1
-2 0 2
-1 0 1

and Gy is Gx rotated 90 degrees:

1 2 1
0 0 0
-1 -2 -1

Then we define the magnitude (G) for that pixel as

G = sqrt(Gx^2 + Gy^2)

And the angle (Theta) of the orientation of the gradient as

Theta = ArcTan(Gx/Gy) - 3Pi/4

These two data points are the description for the feature.

Feature Matching
Also, I created two different ways to match up the features. The first one (which is a simple Thresholding) only works with the Simple feature description. The second one (which is based on the ratio of the best match with the second best match) works with both types of feature descriptions.

For the Thresholding matcher, I look at the Euclidean distance of the 3x3 array around each of the features. A good match is one where the distance is less than .00001 . This threshold was chosen by trail and error.

For the SecondBest matcher, I look at the Euclidean distance of the feature's data points (this could be either the 3x3 window around the feature (Simple feature) or the magnitude and gradient orientation of the feature(Sobel feature)). Based on this distance, I find the best matching feature and the second best matching feature. If their ratio (second best / best) is at least 1.8, then the feature must be a good feature. This number was also reached by trail and error.

Results
Based on these descriptors and matcher, I have three different combinations: the Simple feature descriptor with the Thresholding matcher ("simple"), the Simple feature descriptor with the SecondBest matcher ("simple2"), and the Sobel feature descriptor with the SecondBest matcher ("sobel").

On some of the easier images we were given (see Figure 1), the simple2 method work occasionally well. However on the benchmark images, none of the methods really worked all that well (although the simple2 method seems to be the best most of the time, except for on Bikes).

Figure 1: Features detected using the "simple2" method described above.

Bikes
 
simple
simple2
sobel
1to2 372
409
394
1to3 416
415
380
1to4 428
438
409
1to5 441
451
352
1to6 438
409
366

Graf
 
simple
simple2
sobel
1to2 314
298
343
1to3 309
297
307
1to4 332
319
341
1to5 333
319
435
1to6 364
347
259

Leuven
 
simple
simple2
sobel
1to2 339
327
323
1to3 347
338
370
1to4 360
344
332
1to5 369
380
362
1to6 377
382
376

Wall
 
simple
simple2
sobel
1to2 380
364
572
1to3 376
359
481
1to4 380
360
621
1to5 386
371
535
1to6 399
391
493

How to run things in order to obtain these results (for grading purposes):
All of the following command would be from the cse576/Debug directory.

Note: my feature files are all called annasimgX[_2].f. The X is the image number. If there is an _2 at the end, it means that it used the sobel feature description instead of the simple one.

To test the simple method:

cse576 testMatch ../images/ts/annasimg1.f ../images/ts/annasimg2.f ../images/ts/H1to2p 1

To test the simple2 method:

cse576 testMatch ../images/ts/annasimg1.f ../images/ts/annasimg2.f ../images/ts/H1to2p 2

To test the sobel method:

cse576 testMatch ../images/ts/annasimg1_2.f ../images/ts/annasimg2_2.f ../images/ts/H1to2p 2