Life is a game, take it seriously

Object matching method made in the 20th century

In Computer Vision, Matlab on January 15, 2012 at 8:33 pm

written by gooly

object recognition using SIFTI just submitted some Matlab code for object matching, using an old but simple method mentioned in the paper:

Lowe, D.G. 1999. Object recognition from local scale-invariant features.
In International Conference on Computer Vision, Corfu,
Greece, pp. 1150–1157.

This is the original famous SIFT paper. Most people know SIFT points for its robustness and scale, rotation invariant, but many might not notice that an object matching method is also mentioned in the paper.

This Matlab code is based on that method but uses SURF points instead of SIFT. To run the Matlab code you have to download the SURFmex library first. http://www.maths.lth.se/matematiklth/personal/petter/surfmex.php
Remember to include the SURFmex library by right clicking the folder in Matlab and add subfolders to path.

You can then run Demo.m to see the matching result.

Demo.m first calls createTargetModel with a target image and an image with the contour of the target in the same image as input. createTargetModel then gathers the information needed for object matching and output it as targetModel.

matchTarget is then called with the targetModel and the test image as input. The contour of the target in the test image will then be shown.

The algorithm works as follows. First the SURF points of the target image is extracted and stored.  In matchTarget.m the SURF points of the test image is also calculated and each of them is matched to the most similar SURF point in the model. By using the scale and orientation of the SURF point descriptor, each matched SURF point pair has a translation from the target image to the test image.

Therefore 1 pair of correctly matched SURF points can decide the position, scale and orientation of the target in the test image. However most of the matched pairs aren’t correct, therefore we use all of the pairs to cast votes on what are the correct position, scale and orientation of the target in the test image.

The result that has the highest votes are then refined. A rotation matrix and  a transition vector is then calculated based on the SURF point pairs in the result.

 

 

  1. I am currently working on SIFT using matlab. I had done the Gaussian Pyramid and Difference of Gaussian. Now I am stucked with keypoint selection. Can anyone advise?

  2. Your algorithm is really impressive! I’m currently working on a similar project and I was wondering how you managed to generate the contour image, it’s really spot-on! Do you have a code for it? Or do you produce it using another program?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: