1 | initial version |
I do not know what will be the the result of this training ... try to process images before put them through SVM (try HOG, LBP, etc.)
For example HOG
for every img:
HOGDescriptor des;
vector<float> DV;
Vector<float> Loc
hog.compute( img, DV, Size(8,8), Size(0,0), Loc);
Then:
Mat des_mat = Mat(count_of_images,des_size,CV_32F); //for HOG 64x128 des_size is 3780
that mat + labels mat go to the SVM
2 | No.2 Revision |
I do not know what will be the the result of this training ... try to process images before put them through SVM (try HOG, LBP, etc.)
For example HOG
for every img:
HOGDescriptor des;
vector<float> DV;
Vector<float> Loc
hog.compute( img, DV, Size(8,8), Size(0,0), Loc);
Then:
Mat des_mat = Mat(count_of_images,des_size,CV_32F); Mat(count_of_images,des_size,CV_32FC1); //for HOG 64x128 des_size is 3780
that mat + labels mat go to the SVM