**SURF (Speed Up Robust Features)** is a scale and rotation invariant interest point detector and descriptor.

**These SIFT like features** are commonly used in various applications such as **stereo vision**, **object recognition**,** image stitching**

**2 step:**

- find the
**interest points**in the image which might contain meaningful structures;

- 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.

2. 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**:

- uses an
**approximated DoG**and - the
**integral image**trick: integral image is its each pixel value is the sum of all the original pixel values left and above it. - The advantage of integral image is, an integral image can compute
**block subtraction between any 2 blocks**with just 6 calculations.

– OpenCV has both SIFT and SURF libraries. PS. since Intel abandoned the project, the 2.x series is poorly documented and lack books to study.

– The VLFeat vision library provides a nice SIFT library and a simple tutorial.

– SURFmex library is simply a **wrapper around the OpenCV dll**.

**July 29th, 2010** v.2.1: Bug fix and added surfpoints_gpu using “Speeded Up SURF” library. Only 64-bit binaries provided, but old (v.2) 32-bit are included.

[POINTS, DESCR, SIGN, INFO] = SURFPOINTS(I, OPTIONS)POINTS:locations of the N points of interest in the2-by-Nmatrix POINTS, where each column corresponds to one point of interest.DESCR:D-by-Nmatrix descriptors, where D varies depending on what type of descriptors are calculated (default is 64).SIGN:thesign of the laplacian, 1-by-N matrix SIGN can be used for faster matching.INFO: extra information, The column of 4-by-N matrix INFO corresponds to each interest point: INFO(1,:) detected scales of the interest points INFO(2,:) strength of the interest points INFO(3,:) orientation of the interest pointsI: image data matrixOPTIONS: is a struct with the following possible fields (passed into OpenCV): nOctaveLayers : Layers within an octave(default 2) nOctaves : Number of octaves (default 4) hessianThreshold : Higher values gives fewer points (default 500) extended : If set to 1, 128-dimensional SURF is used (default 0) An omitted field will be assigned the default valueMATCHES = SURFMATCH(DESCR1, SIGN1, DESCR2, SIGN2, THRESH)Matches:between the two sets of descriptors returned by SURFPOINTS. MATCHES is a 2-by-N matrix where the first row are indices corresponding to columns in DESCR1 and the second row corresponds to DESCR2.Sign:takes the sign of the laplacian into account for faster matching.Thresh:provides an additional threshold parameter discussed in the reference. The default value is 0.7.

MATCHES = SURFMATCH(DESCR1, SIGN1, DESCR2, SIGN2, THRESH)

computes matches between the two sets of descriptors returned by SURFPOINTS.

MATCHES is a 2-by-N matrix where the first row are indices corresponding to columns in ** DESCR1** and the second row corresponds to

*DESCR2*.

*SIGN* option – takes the **sign of the laplacian** into account for faster matching.

*THRESH* – provides an additional threshold parameter discussed in the reference. The default value is **0.7**.