I created a xml file by using svm . In my test program i have loaded that xml file and i use svm predict, but it showing the error. how can i correct this ?
int main(){
HOGDescriptor hog;
vector<float> featureVector;
Ptr<ml::SVM> svm = ml::SVM::create();
Mat testdata, feature;
Mat img = imread("C:/Users/Sam/Desktop/Test/1.jpg");
hog.compute(img, featureVector, Size(32, 32), Size(0, 0));
feature = Mat(featureVector).reshape(1, 1);
testdata.push_back(feature);
svm->load("Features.xml");
svm->predict(testdata);
}