data === 'SUCCESS'
/ *当此函数调用图像时将显示并且用户从图像中选择训练样本但是当程序在QT中构建时出现错误"无效使用非静态成员函数cv :: setMouseCallback(赛格,CallBackFunc,此)" * /
void LandslideTraining::CallBackFunc(int event,int x,int y,int flags,void* userdata=0) //Created a call back function
{
if (event == EVENT_LBUTTONDOWN)
{
ab[counts][0] = x;
ab[counts][1] = y;
counts += 1;
if (counts - 1 == iter)
{
Mat abcd(counts, 2, CV_32F, Scalar(0));
for (int i = 0; i < counts; i++)
{
abcd.at<float>(i, 0) = ab[i][0];
abcd.at<float>(i, 1) = ab[i][1];
}
destroyWindow(segem);
writeMatToFile(abcd, str.toStdString().c_str());
train(str.toStdString());
}
}
}