SURF (Speed Up Robust Features) is a scale and rotation invariant interest point detector and descriptor. It could be categorized under the family tree of the widely used SIFT feature. These SIFT like features are commonly used in various applications such as stereo vision, object recognition, image stitching since the 21th century. One good example is the famous Microsoft project “ Build Rome in a day“.

The feature finding process is usually composed of 2 steps; first, find the interest points in the image which might contain meaningful structures; this is usually done by comparing the Difference of Gaussian (DoG) in each location in the image under different scales. A major orientation is also calculated when a point is considered a feature point. The second step is to construct the scale invariant descriptor on each interest point found in the previous step. To achieve rotation invariant, we align a rectangle to the major orientation. The size of the rectangle is proportional to the scale where the interest point is detected. The rectangle is then cropped into a 4 by 4 grid. Different informations such as gradient or absolute value of gradient are then subtracted from each of these sub square and composed into the interest point descriptor.

The SURF feature is a speed up version of SIFT, which uses an approximated DoG and the integral image trick. The integral image method is very similar to the method used in the famous Viola and Jones’ adaboost face detector. An integral image, despite its pretty name, is just an image which its each pixel value is the sum of all the original pixel values left and above it. The advantage of integral image is that after an image is computed into an integral image, it can compute block subtraction between any 2 blocks with just 6 calculations. With this advantage, finding SURF features could be several order faster than the traditional SIFT features.

SIFT like features have become quite a basic component in general computer vision courses, and also a good point to start some vision research. There is no need to reinvent the wheel, since there are various libraries online for free. OpenCV has both SIFT and SURF libraries. However, since Intel abandoned the project, the 2.x series is poorly documented and lack books to study. Fortunately, there are other choices for Matlab users. The VLFeat vision library provides a nice SIFT library and a simple tutorial. SURFmex also provides an interface from Matlab to the OpenCV SURF library. I will show how SURFmex could be used in the following posts.