error is : Subscripted assignment dimension mismatch.
Show older comments
this is my code for extraction of feature from folder having three sub folders but i am giving error at line trainingFeatures(featureCount,:)= ..... error is : Subscripted assignment dimension mismatch.
trainingFeatures = zeros(size(training,2)*training(1).Count,1008);
featureCount = 1;
for i=1:size(training,2)
for j = 1:training(i).Count
trainingFeatures(featureCount,:)= extractHOGFeatures(read(training(i),j));
trainingLabel{featureCount} = training(i).Description;
featureCount = featureCount + 1;
end
personIndex{i} = training(i).Description;
end
Accepted Answer
More Answers (1)
Image Analyst
on 14 Nov 2015
You say size(training,2) indicating training is a 2D array, but then you later say training(i).Description indicating it's a 1-D array of structures. Before the loop, what does it say if you do this:
class training
whos training
size(training)
2 Comments
Ushna Asif
on 16 Nov 2015
Image Analyst
on 16 Nov 2015
Sorry, I don't have the Computer Vision System Toolbox so I can't test anything with imageset variables. Perhaps Dima will answer.
Categories
Find more on Image Processing and Computer Vision in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!