inputs functions for CELL

조회 수: 8 (최근 30일)
dammak sahar
dammak sahar 2018년 6월 1일
편집: dammak sahar 2018년 6월 5일
i want to insert a path of image in a cell .
for i = 1:event_num
img_list=fprintf('.\WIDER_train\images\%s\%s',data.event_list{i},data.file_list{i});
img_num = size(img_list,1);
bbx_list = data.face_bbx_list{i};
trainingData = [trainingData;[img_list,bbx_list]];
end
Error using fprintf
Function is not defined for 'cell' inputs.

채택된 답변

Walter Roberson
Walter Roberson 2018년 6월 1일
data.event_list{i} or data.file_list{i} contains a cell array and needs to have single entries selected from them.
Normally {i} would be enough, but sometimes people accidentally end up with multiple levels of cell where they only expect one level. You should look at what is contained in data.event_list{i} or data.file_list{i}
  댓글 수: 1
dammak sahar
dammak sahar 2018년 6월 5일
편집: dammak sahar 2018년 6월 5일
thank you I used the function fullfile and it works
tab =table(img_list ,bbx_list);
tab.img_list = fullfile('C:\Users\......\images',event,...
tab.img_list);

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by