How to implement SURF function in C#

In this lecture you will find all the needed information about how to implement SURF function in C# using the Ozeki Camera SDK. First of all, Ozeki Camera SDK has to be installed and a reference to OzekiSDK.dll has to be added to your Visual Studio project.

What is SURF ?

SURF ( Speeded Up Robust Features) is a detector and a descriptor for points of interest in images where the image is transformed into coordinates, using the multi-resolution pyramid technique. Is to make a copy of the original image with Pyramidal Gaussian or Laplacian Pyramid shape and obtain image with the same size but with reduced bandwidth. Thus a special blurring effect on the original image, called Scale-Space is achieved. This technique ensures that the points of interest are scale invariant.

The SURF algorithm has three main parts:

  • Detection: Automatically identify interesting features, interest points this must be done ro-bustly. The same feature should always be detected irregardless of viewpoint.
  • Description: Each interest point should have a unique description that does not depend on the features scale and rotation.
  • Matching: Given and input image, determine which objects it contains, and possibly a transformation of the object, based on predetermined interest points.
  • Method

    The feature finding process is usually composed of 2 steps.

  • The first step is to 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.
  • Using SURF feature in face recognition

    SURF features should be extracted from images through SURF detectors and descriptors. Interest points are first extracted from each face image after pre-processing, such as normalization and histogram equalization. The SURF feature vectors of the set of interest points are then computed to describe the image and these feature vectors are normalized to 1. These features are person-specific, since the number and the positions of points selected by SURF detector as well as the features around these points computed by SURF descriptor are different in each person's image.


    By reading through this tutorial you will be able to successfully implement SURF function with your C# camera application using the Ozeki Camera SDK. On this webpage you will find a free source code example which is a great help for your implementation. Moreover, this webpage contains helpful documentations to help the understanding.

    Related pages


    Below you can find the answers for the most frequently asked questions related to this topic:

    1. What kind of developer environment is needed?

      • Microsoft Visual Studio
      • Microsoft .Net Framework 4.0
      • Internet connection
    2. How can I get the URL of the camera?

      You can get the URL from the producer of the camera.

    3. I have not managed to build the solution. How to solve it?

      • Please set the Target framework property of the project to .NET 4.0.
      • You should add the OzekiSDK.dll to the references of the solution.
      • Please import the missing classes.

    More information