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!
