Subscripted assignment dimension mismatch.
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
I was following the SimpleFaceRecognition example from Matlab and while running the code I am getting this error. I am totally new to matlab
Subscripted assignment dimension mismatch.
trainingFeatures(featureCount,:) = extractHOGFeatures(read(training(i),j));
Here is the code
Display Query Image and Database Side-Side
personToQuery = 1;
galleryImage = read(faceDatabase(personToQuery),1);
figure;
for i=1:size(faceDatabase,2)
imageList(i) = faceDatabase(i).ImageLocation(5);
end
subplot(1,2,1);imshow(galleryImage);
subplot(1,2,2);montage(imageList);
diff = zeros(1,9);
2 个评论
Jan
2018-1-25
Please post the complete error message.
MAYOOGH GIRISH
2018-1-26
编辑:Jan
2018-1-26
回答(1 个)
If the code from the FileExchange fails, asking the author is a good point to start from. Another idea is to use the debugger by your own at first:
dbstop if error
Then run the code again. When Matlab stops, check the dimensions of the used arrays:
i
j
a = read(training(i),j)
size(a)
b = extractHOGFeatures(a)
size(b)
featureCount
size(trainingFeatures);
size(trainingFeatures(featureCount, :))
What do you observe? Do the sizes of
size(trainingFeatures(featureCount, :))
extractHOGFeatures(read(training(i),j));
match? If not, do the real sizes tell you anything suspicious?
0 个评论
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
