I need to classify the HOG features of a car occupied and empty space . the training data is having a feature length of 56 X 144 and test data feature length of 28 X 144 . training data contains both positive and negative samples . how can i classify using these data in MATLAB using SVM classifier . This is the syntax i came to know while training.
"Mdl = fitcsvm(X,Y)
But i didn't get any idea from this.. where i need to give training data and test data in this syntax ?
Please help me ..
code is
tr1=trainOf; % occupied image HOG FEATURES
tr2=trainVf; % empty image HOG features
X=[tr1;tr2]; % whole training data
Y=xlsread('CLASSLABEL.xlsx'); % class labels for training data
svmStruct=svmtrain(X,Y);
classes=svmclassify(svmStruct,testf,'showplot',true); `
X
is the training data features andY
is the training data labels/class. I think this tutorial covers almost everything you need regarding SVM classifier mathworks.com/help/stats/fitcsvm.html. As for extracting HOG features, this example should help mathworks.com/help/vision/ref/extracthogfeatures.html - Yohanes Gultom.mat
) so others can help you better - Yohanes Gultom