0

I am trying to compare two image of drawings using corner features in the images. Here is a sample image:

Sample image

Query image:

Query image

I used SIFT algorithm to compare images but it did not work because in SIFT we consider a window of 16X16 pixel to extract the features at point of interest but here in this case(drawing objects) we will get only corner points as feature points and SIFT feature descriptor will give very similar feature to all corner points and hence in the feature matching step it will reject the corners because of their close similarity scores.

So i am using below approach to compare the images. I am using Shi-Tomasi algorithm based function in opencv ie. cv2.goodFeaturesToTrack() to find the corners(feature points) in an image. After finding corners i want to classify them in 4 categories and compare them in two images. Below is corner categories defined as of now which my vary because of huge variations in corner types(angle, no. of lines crossing at corners, irregular pixel variation at corner point):

Corner categories:

Type-1: L-shaped Type-1

Type-2: Line intersection Type-2

Type-3: Line-curve intersection Type-3

type-4: Curve-Curve intersectio Type-4

I am trying to solve this using below approach:

=> Take a patch of fixed window size surrounding the corner pixel say a window of 32X32

=> Find the gradient information ie. gradient magnitude and its direction in this window and use this information to classify the corner in above 4 classes.After going through image classification i came to know that Using HOG algorithm image gradient information can be converted to feature vectors.

=> HOG feature vector calculated in above step can be used to train SVM to get a model.

=> This model can be used for new feature point classification.

After implementing above algorithm i am getting poor accuracy.

If there is any other way to classify the corners please suggest.

flamelite
  • 2,654
  • 3
  • 22
  • 42
  • Why not template matching ? Can you add some test image ? – I.Newton Nov 19 '17 at 05:37
  • @I.Newton i have added test image and query image. I doubt if template match will work bcz in drawing image we have very less pixels variations in a general roi. – flamelite Nov 19 '17 at 08:25
  • moreover i want to search the input query image in a large database of test images so it will not be feasible in terms of time. That's why i am trying to extract and store corner based features and compare them with the query image and return the highest scoring test image as the most similar image. – flamelite Nov 19 '17 at 08:28
  • 1
    I have tried with svm also by using HOG features of corner points but because of huge variations of corners i am not able to assign appropriate classes and hence getting very poor accuracy. – flamelite Nov 19 '17 at 08:32
  • I wonder why HOG isn't proper. May be you should try over full image instead of corners. I'll still think – I.Newton Nov 19 '17 at 09:37

0 Answers0