MATLAB Answers

Image detection using SVM classifier from wavelets features extraction

14 views (last 30 days)
Rafid Mustafiz
Rafid Mustafiz on 18 Mar 2018
Commented: Rafid Mustafiz on 19 Mar 2018
I have extracted wavelet features from a set of images and stored as following: cov_features = [R4_f1 R4_f2 R4_f3 R4_f4 R5_f1 R5_f2 R5_f3 R5_f4 R6_f1 R6_f2 R6_f3 R6_f4 G4_f1 G4_f2 G4_f3 G4_f4 G5_f1 G5_f2 G5_f3 G5_f4 G6_f1 G6_f2 G6_f3 G6_f4 B4_f1 B4_f2 B4_f3 B4_f4 B5_f1 B5_f2 B5_f3 B5_f4 B6_f1 B6_f2 B6_f3 B6_f4]
% cov_features = wavelet(im);
for j = 1: 144
wavelet_Training_Feature(j, i) = cov_features(j); % for each image 144 wavelet features here
%i=total_number_of_image
end
But I can not train and classify using SVM. I want to classify images in two classes polyp or nonpolyp. I know there is a builtin function in MATLAB but I don't know to adapt it to be used in this job,any help or suggestion will be helpful to me. Thank to All

  0 Comments

Sign in to comment.

Answers (1)

Abhishek Ballaney
Abhishek Ballaney on 19 Mar 2018
https://in.mathworks.com/help/stats/support-vector-machine-classification.html

  2 Comments

Rafid Mustafiz
Rafid Mustafiz on 19 Mar 2018
Thank you. Actually I can't use these functions. "Features=wavelet_Training_Feature(:,:)" has extracted feature values from image set and "trainLabels = trainingSet.Labels" indicates the training labels. Now how can I use SVM to train and classify?
Rafid Mustafiz
Rafid Mustafiz on 19 Mar 2018
I have found those errors when run "classifie = fitcecoc(Features, trainingLabels)"
Error using classreg.learning.FullClassificationRegressionModel.prepareDataCR (line 201) X and Y do not have the same number of observations.
Error in classreg.learning.classif.FullClassificationModel.prepareData (line 487) classreg.learning.FullClassificationRegressionModel.prepareDataCR(...
Error in classreg.learning.FitTemplate/fit (line 213) this.PrepareData(X,Y,this.BaseFitObjectArgs{:});
Error in ClassificationECOC.fit (line 116) this = fit(temp,X,Y);
Error in fitcecoc (line 383) obj = ClassificationECOC.fit(X,Y,ecocArgs{:});

Sign in to comment.

Sign in to answer this question.