Clear Filters
Clear Filters

Kmeans with image feature for comparison

3 views (last 30 days)
Abhishek Singh
Abhishek Singh on 8 Jul 2019
Answered: Kritika Bansal on 24 Jul 2019
I have some RBG images to be compared with one another. My goal is to cluster them into different groups based on how much identical they are. I am having a hard time defining that threshold by using ssim(), so I thought if kmeans() would be advisable. For using kmeans() I need some features of image which could make it possible. Does simply extracting RGB value of image would be a good measurement technique for kmeans cluster? I looked at other answers in line with same questions and could not find any feature extraction which would help me. Please let me know if the result is optimal with any certain feature. Thanks in advance.
  1 Comment
@Abhishek, though I have never work on image sillilarity. Based on my basic undestanding, Still I feel SSIM is better as compare to k-menas in your case. Because you have to compare complete image with others, not the regions of image within.
Does simply extracting RGB value of image would be a good measurement technique for kmeans cluster?
K-menas cluster a image with multiple regions (Grouped the region), do try and see the results.
Wait for @ImageAnalyst @Walter or others answer/comments.

Sign in to comment.

Answers (1)

Kritika Bansal
Kritika Bansal on 24 Jul 2019
As per my understanding, your goal is to group similar images into one cluster.
Assuming that the dataset of the images you are using is labelled and you are well aware of the categories, you can use Bag of Words model to build a machine learning classifier to classify the images appropriately in the desired categories. The words in the Bag of Words model will play the role of features for the classifier. You can extract the SIFT/SURF descriptors from the images, cluster them using k-means and create histograms that will work as the features which can describe your classes.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!