Can you help me about Image classification using SIFT features?I want to classify images based on SIFT features,

1) given a training set of images, extract SIFT from them

2) compute K-Means over the entire set of SIFTs extracted form the training set.

the "K" parameter (the number of clusters) depends on the number of SIFTs that you have for training, but usually is around 500->8000 (the higher, the better).

Now you have obtained K cluster centers.

3) You can compute the descriptor of an image by assigning each SIFT of the image to one of the K clusters. In this way you obtain a histogram of length K.

4)I have 130 images in training set so my training set 130*K dimensional

5)ı want to classify my test images ı have 1 images so my sample is 1*k dimensional. I wrote this code knnclassify(sample,training set,group). I want to classify to 7 group. so knnclassify(sample(1*10),trainingset(130*10),group(7*1)).

the error is : The length of GROUP must equal the number of rows in TRAINING. what can ı do

More Yıldız Aydin's questions See All
Similar questions and discussions