I am getting this error: OpenCV Error: Assertation failed <samples.type<>cv_32f ||="" samples.type<>cv_32s=""> in cv::ml::TrainDataImpl::setData
I have extracted feature and placed it in a String;
String features = "352111653512146120635735005";
Mat m;
m.push_back(features);
m.reshape(1, 1);
freeman.push_back(m);
labelMat.push_back(label);
Ptr<ml::KNearest> knn = ml::KNearest::create();
Ptr<ml::TrainData> td = ml::TrainData::create(feature, ml::ROW_SAMPLE, label); <-----I am getting error here