1 | initial version |
make sure, your test image has the same size as the train images, and process it in the same way:
Mat TestData = imread("test.png",0);
TestData.convertTo(TestData, CV_32FC1);
TestData = TestData.reshape(1,1);
float response = svm->predict(TestData);