How to use a particular feature vector to encode another feature vector as a training set using bag of features(Multiply Distorted Images)
2 views (last 30 days)
Show older comments
Hello Experts in the house,
I need your help on this subject matter.
Method 1: I have two dataset of images(distorted) using bag of features, I have 100 images and supplementary images of 50. I used the 100 images to create codebook using the 50 images. All are distorted images, it is just like multiply distorted images. When I applied SVM after the 100 features vector were extracted. The performance was very poor.
Method 2: I extracted the 100 images using LBP and 50 images using LBP(Local Binary Pattern) to see if there could be improvement but I have issues with the coding.
The dataset of images are different images that is 100 and 50 images but the same distortion type.
................................................................................................................................................................................
clc, clear, close all
load 980LBPfffff % the 100 images extracted using LBP
load featureLBP1200 % the 50 images extracted using LBP
feature1 = (feature); %extracted 100 images
feature2 = (feature1); % extracted 50 images
bag = bagOfFeatures(feature1,'StrongestFeatures',1,'GridStep',[32 32],'BlockWidth',[32 64 96 128],'VocabularySize',500);
featureVector = encode(bag, feature2);
% Plot the histogram of visual word occurrences
figure
bar(featureVector)
title('Visual word occurrences')
xlabel('Visual word index')
ylabel('Frequency of occurrence')
.........................................................................................................................
Error:
Error using bagOfFeatures/parseInputs (line 1159)
The value of 'imds' is invalid. Expected imds to be one of these types:
imageSet, matlab.io.datastore.ImageDatastore
Instead its type was double.
Error in bagOfFeatures (line 183)
[imgSets, params] = bagOfFeatures.parseInputs(varargin{:});
Error in twofeatLBPcobk (line 10)
bag = bagOfFeatures(feature1,'StrongestFeatures',1,'GridStep',[32 32],'BlockWidth',[32 64 96 128],'VocabularySize',500);
.........................................................................................................................................................................................................
I believe am wrong somewhere but I appreciate if you can help with better code using bag of features for the codebook of the extracted feature.
Thank you all.
1 Comment
Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!