Ask Your Question

Revision history [back]

click to hide/show revision 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);