Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I find out some error's on my own , the one main error is in labeling , here

Mat labels(0,1,CV_32FC1);

This should be used as :

Mat labels(num_img,1,CV_32FC1);

After this the error is here :

training_mat.push_back(descriptors_1);

this should be used as

my_img.convertTo( training_mat.row(count_2), CV_32FC1 );

Changing these two works for me , but to be honest i have a little difficultly in understanding why this gives error :

training_mat.push_back(descriptors_1);

As @Guanta and @GilLevi mentions , they are also the causes of error's . Thanks to them

I find out some error's on my own , the one main error is in labeling , here

Mat labels(0,1,CV_32FC1);

This should be used as :

Mat labels(num_img,1,CV_32FC1);

After this the error is here :

training_mat.push_back(descriptors_1);

this should be used as

my_img.convertTo( training_mat.row(count_2), CV_32FC1 );

Changing these two works for me , but to be honest i have a little difficultly in understanding why this gives error :

training_mat.push_back(descriptors_1);