1
votes

I am new to machine learning and currently working on a project. The project is about classifying images based on feature and color attributes.

I have tried classifying images through feature extraction based on the example given in the OpenCV with Python by Example book (the Dense extractor SIFT descriptor technique to generate a codebook and train SVM to classify the extracted feature) but I haven't tried yet combining both feature and color attributes since the images sampled were gray-scaled during feature extraction.

My questions are:

  • Is the same technique would apply if I include color, that is, I will create a feature map (gray-scaled; shape attribute) and color histogram map and train SVM for both attributes?
  • Or is there a way that SIFT can compute both shape and color attributes in OpenCV?
1
Your features vector can be whatever you want. You can concatenate SIFT descriptors, color information, etc... You can compute feature on color on the color image and compute SIFT on grayscale, etc... In older OpenCV version there were SIFT variants for color images (like Opponent SIFT), I don't know if they are still available in newer versions - Miki
Hi Miki. Thanks for the response. I am still trying solving the project. My current approach is this: I have created a codebook has gray-scaled features on it. Then, I have also created a separate file for color. Now I am stuck on how to merge these features to make SVM learn since both have different shapes (size). May I ask if this approach is correct? Or is there any easier approach? Thanks. - jonilyn2730
Classifiers do not mind whether the features come from gray scale, color or whatever. Each feature is just one column in a table. Mix them as you want. - Might help if you give a piece of sample code to better understand your problem. - tfv

1 Answers

0
votes

I found a project similar to the problem in this paper titled Leveraging Computer Vision Priciples for Image-Based Shoe.

They have utilized different approaches to detect and compare the image color with its shape and texture. I will try their recommended algorithm in opencv and see if this works for the project.. :)