필터 지우기
필터 지우기

Conversion to cell from char is not possible.??

조회 수: 14 (최근 30일)
Hind Haboubi
Hind Haboubi 2021년 4월 30일
댓글: Hind Haboubi 2021년 4월 30일
Hello guys, this is my code:
inp = input('Enter file :');
v = VideoReader(inp);
myVideo = VideoWriter('TESTVID.mp4');
myVide.Quality = 50;
muVideo.FrameRate = 15;
k=0;
outclass = [];
outclass1 = [];
for i=1:1:200
str=int2str(i);
i;
videoFrame = read(v,i);
I = videoFrame;
I = imresize(I,[224 224]);
%[bboxes,scores,label] = detect(detector,I);
all = [];
lab = [];
kk=0;
if isempty(bboxes)
bboxes = [1 1 1 1];
lab = ['none'];
end
for ii=1: size(bboxes,1)
kk=kk+1;
cr = imcrop(I,bboxes(ii,:));
cr = imresize(cr,[224 224]);
out = classify(convnet,cr);
if out=='VEHICULE ENDOMMAGER';
aaaa='VEHICULE ENDOMMAGER';
predict=1
lab=[lab ; (aaaa)];
elseif out=='VEHICULE NONENDOMMAGER';
aaaa='VEHICULE NON ENDOMMAGER';
predict=2
lab=[lab ; (aaaa)];
else
lab=[lab ; 'none'];
predict=3
end
outclass=[outclass ; predict ];
outclass1=[outclass1 , lab ];
end
label_str = cell(size(lab,1),1);
conf_val = lab;
for iii=1:size(lab,1)
label_str(iii) = conf_val(iii);
end
end
And i'm getting this error what should I do please:
Conversion to cell from char is not possible.
Error in NOUVEAU (line 166)
label_str(iii) = conf_val(iii);

채택된 답변

Walter Roberson
Walter Roberson 2021년 4월 30일
label_str{iii} = conf_val(iii);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by