inputs functions for CELL

9 views (last 30 days)
dammak sahar
dammak sahar on 1 Jun 2018
Edited: dammak sahar on 5 Jun 2018
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.

Accepted Answer

Walter Roberson
Walter Roberson on 1 Jun 2018
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 Comment
dammak sahar
dammak sahar on 5 Jun 2018
Edited: dammak sahar on 5 Jun 2018
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);

Sign in to comment.

More Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!