I have managed to convert images into histogram representation of visual words. It could be something simple like the following(normalized):
[0.1, 0.2, 0, 0.1, 0, 0.05, 0.3, 0, 0, 0, 0.2, 0.05, 0]
which adds up to 1
now, if i have many different iteration of the histogram above, I want to classify it with libsvm. But I'm stuck here, I know the syntax for svmtrain:
model=svmtrain(label,training_matrix)
training matrix should just be a m x n matrix of all my histograms but what about label? I know it's supposed to be +1, or -1 but where do the negative images come from? Everything in the training_matrix should be positive images representative of the class.
Am I wrong to treat each histogram as a separate instance? If instead I treat every visual word as an instance, then I would have my negatives from the words that represent the class.