Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use SIFT for image comparison

I recently stumbled upon a SIFT implementation for C#. I thought it would be great fun to play around with it, so that's what I did.

The implementation generates a set of "interest points" for any given image. How would I actually use this information to compare two images?

What I'm after is a single "value of similarity". Can that be generated out of the two sets of interest points of the two images?

like image 898
Boris Avatar asked Aug 06 '12 11:08

Boris


People also ask

Why do we use SIFT in image classification?

SIFT helps locate the local features in an image, commonly known as the 'keypoints' of the image. These keypoints are scale & rotation invariant that can be used for various computer vision applications, like image matching, object detection, scene detection, etc.

What is SIFT in image processing?

Scale-Invariant Feature Transform (SIFT)—SIFT is an algorithm in computer vision to detect and describe local features in images. It is a feature that is widely used in image processing. The processes of SIFT include Difference of Gaussians (DoG) Space Generation, Keypoints Detection, and Feature Description.

How do I match Keypoints in different images?

The SIFT vectors can be used to compare key points from image A to key points from image B to find matching keypoints by using Euclidean "distance" between descriptor vectors. In this example of image retrieval, two objects that we want to retrieve are shown on the left.

Is SIFT better than Orb?

We showed that ORB is the fastest algorithm while SIFT performs the best in the most scenarios. For special case when the angle of rotation is proportional to 90 degrees, ORB and SURF outperforms SIFT and in the noisy images, ORB and SIFT show almost similar performances.


1 Answers

You need to run SIFT on both images so you get interest points (lets call them Keypoints) in both images.

After that you need to find matches between keypoints in both images. There are algorithms implemented for that purpose in OpenCV.

The value of similarity can be computed out of the number of matches. You can consider that if you get more than 4 points the images are the same, and you can also calculate the relative rotation between them.

like image 56
Jav_Rock Avatar answered Sep 18 '22 15:09

Jav_Rock