Mat SVMtrainMat;
SVMtrainMat.create(Size(descriptors.size(), 1), CV_32FC1);
int SVMtrainMatX = 0;
for (vector<float>::iterator iter = descriptors.begin(); iter != descriptors.end(); iter++){
SVMtrainMat.ptr<float>(0)[SVMtrainMatX] = *iter;
SVMtrainMatX++;
}