Feature descriptors

The first of the feature descriptors I implemented simply stores the color components of the pixels in a 5x5 window around the feature point as a vector. The distance between two features was determined by calculating the angle between two such vectors. This is similar to the approach of determining the euclidean distance, but I hoped that it would also account partially for illumination changes, since multiplying the vectors by a constant shouldn't change the angle between them. The other feature descriptor I implemented is similar to the window one, except that it explicitly accounts for rotational and illumination changes. In this descriptor I grab a larger (16x16) subwindow of the image. To reduce the error of small differences in feature positions, this image is then blurred with a 5x5 Gaussian mask. Over this blurred image I then compute the angle of the average gradient, as well as the average value and deviation of the red, green, and blue color components. When comparing two windows, they are rotated so that they are aligned and adjusted so that the means and deviations of each of the color components match. The total difference between two features is then the average difference of their pixels. Initially I had planned to compute the gradient of the difference of two aligned windows, and then choose the feature difference as the least-squared error of the affine transformation best fitting to this vector field. In this way I hoped to account for invariance over small affine transformations. It turns out, however, that I'm lazy and didn't actually do any of this. Oh well, it sounded like an interesting idea at first.

performance

Average pixel error on image sets
Window That other Method
graf 216 209 234 205
leuven 321 238 250 129
bikes 418 387 425 355
wall 303 275 335 258

results

In the end, I found that while my feature descriptor fared reasonable well with illumination changes, it was relatively brittle to other sorts of transformations. This appears to be partially due to errors in the calculation of the gradient direction over a window -- possible as a result of it's calculation over a radially asymmetric region (which in retrospect, was pretty silly, particularly since I already avoided this in the Harris corner detection). That said, it seems to get a semi-respectable proportion of the features correct for rotations and illumination changes.