I have an SVM RBF Model that was trained using libsvm. I have a feature extractor that is now developed in OpenCV and rather than re-training the model in OpenCV, I want to use the libsvm model directly. I am loading the model using libsvm using svm_load_model. I now want to use svm_predict(model,x) but the test data is to be loaded into svm_node x. How do I convert OpenCV Mat feature to svm_node or for that matter a C++ vector feature to svm_node x?
struct svm_node
{
int index;
double value;
};