Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

comparing HOG feature vectors without SVM

I am relatively a newbie to computer vision and now currently doing a learning project on shape detection where I have a fixed region of interest(ROI) in all the images where the object is most likely present and I have to compare their shapes to give whether the object present in two input images are same or not.There are slight translational and scale changes and illumination changes.

I am trying to compare the shape of the object between two input images and trying to provide an output value describing their similarity. If the similarity is above a certain threshold, I can tell that the same object is present in both input images.

I have tried contours, but it does not give reliable results(thresholding either gives too many details or misses some vital details) and doesn't generalize well to all images. I am thinking of using global shape descriptors like HOG.

But I have problems with understanding the feature vector values from the HOG descriptor. How to compare HOG feature vectors(1D) for the two input images to find similarity without using SVM or machine learning? What is the best way to compare HOG feature vectors?

I don't understand how the distance measures work for comparing the future vectors. I want to understand the physical meaning of how distances are used to compare feature vectors and histograms? How to use them to compare HOG feature vectors?

like image 662
Sakthi Geek Avatar asked Dec 13 '17 06:12

Sakthi Geek


People also ask

How do you train a HOG descriptor?

Use the extracted feature vectors along with their respective classes to train a SVM classifier, in this step you can use the svm-train.exe with a generated file of the correct format containing the feature vectors and their classes (or directly include and address the libsvm library class in your sources).

How Histogram of Oriented Gradients HOG works?

The HOG descriptor focuses on the structure or the shape of an object. It is better than any edge descriptor as it uses magnitude as well as angle of the gradient to compute the features. For the regions of the image it generates histograms using the magnitude and orientations of the gradient.

Is HOG deep learning?

Moreover, the Deep learning method is best for its detection accuracy. Convolutional Neural Network is specially designed for the Computer Vision field. It works better on image data. HOG is a widely used feature extraction technique and along with the Gabor filter is used for feature extraction.


1 Answers

Sorry, your question is actually hard to understand. I think you are going into wrong direction.

How to compare HOG feature vectors(1D) for the two input images to find similarity without using SVM or machine learning? 

SVM is tool for comparing a vector with a dictionary to find the rightest answer. For similarity, it is just the distance of the two image-represented vector. Do not overthinking, it will kill you

In your case, you use HOG feature as your image-represented vector. So calculate the Euclid distance between them. That value is there similarity.

You can see matlab pdist method to find a list of easy-to-used distance calculating method.

The problem lie down here is not how to compare feature vector, it is how to represent your image by single vector. A better image represent lead to better performance. For example: Bag-of-word, CNN, etc . There are ton of them, for newbie like you start with Bag-of-word.

Hope that help and welcome to Computer vision world

like image 53
Vu Gia Truong Avatar answered Oct 18 '22 23:10

Vu Gia Truong