1 | initial version |
After a lot of hours and help from berak I figured it out.
Instead of using a Mat
and using the push_back
function. I made a 2d float
array and put the descriptor
output from the compute
function in there.
//for loop each image
float[] vector = descriptors.toArray();
trainVector[i] = vector;
Afterwards I made an empty Mat
and put the values of the float array
in there. And used that for training.
Also don't forget to put the rho
at the end of the supportvector
from the svm.