Why does this error happen?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
load NewTemplates
snap=imread('image1.png');
snap=imresize(snap,[42 24]);
rec=[ ];
for n=1:length(NewTemplates)
cor=corr2(NewTemplates{1,n},snap);
rec=[rec cor];
end
error-> ??? Cell contents reference from a non-cell array
object.
Error in ==> Letter_detection at 9
cor=corr2(NewTemplates{1,n},snap);
0 Kommentare
Antworten (1)
Guillaume
am 1 Mär. 2020
Your code expects that NewTemplates is a cell array (or an object that supports {} indexing). It isn't. Presumably, NewTemplates is popped into existence by your load NewTemplates, so you need to investigate that file to see what it contains.
What is
class(newTemplates)
0 Kommentare
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!