The second feature is a MOPS-style feature. We again use the Harris detector to find features in the image. We then take the image one step higher on the image pyramid as input to the feature; that makes feature-location slightly less critical, as we're sampling over a larger area. We also apply a 5x5 gaussian blur to this image so that high-frequency changes are less important.
We then compute the dominant gradient direction at the feature point. This tells us the "orientation" of the feature, so we can grab a patch of pixels that is orientation-invariant. (This will allow us to rotate the image and still retain useful features.) We then grab an 8x8 patch of pixels, adjusted by the orientation.
Finally, we normalize the patch of pixels. We compute the mean and subtract from every pixel value, so that the new mean for the set is zero. We then compute the standard deviation, and divide each pixel by this value. These normalizations allow us to match patches even when brightness might vary considerably.
We perform feature detection and generation at five pyramid levels for the image. That means we should be able to gather features for a wide range of scales in the image.
In order to work around an image library bug, I also need to adjust the intensity of pyramided images. Use of the convolve operator (via the pyramid operation) tends to dim an image substantially. I compute the average intensity difference between a convolved image and the original, then readjust the convolved image appropriately. Almost all of my changes are contained in features.cpp.
Image 1 | Image 2 | Image 3 | Image 4 | Image 5 | Image 6 |
Simple window | 263.524 | 242.447 | 273.425 | 300.381 | 295.217 |
Feature Descriptor | 310.112 | 299.895 | 319.949 | 310.675 | 335.929 |
It's clear from the user interface that my feature detector is finding the correct orientation most of the time, and that the features appear on interesting corner and border locations.
I might investigate further the average intensity of feature patches, and whether normalization is doing its job correctly. Further, I'd like to experiment more with taking image patches at varying scales of the pyramid and with varying levels of gaussian blur.
Simple window feature:
Standard feature:
SIFT:
Some queries: