Subscripted assignment dimension mismatch.
Informazioni
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Mostra commenti meno recenti
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 Commenti
Jan
il 25 Gen 2018
Please post the complete error message.
MAYOOGH GIRISH
il 26 Gen 2018
Modificato: Jan
il 26 Gen 2018
Risposte (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?
Questa domanda è chiusa.
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
