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);

답변 (1개)

Guillaume
Guillaume 2020년 3월 1일

0 개 추천

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)

카테고리

도움말 센터File Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

제품

질문:

2020년 3월 1일

답변:

2020년 3월 1일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by