I am getting this error
Error using matlab.io.datastore.ImageDatastore/countEachLabel (line 27)
Operands to the || and && operators must be convertible to logical scalar values.
when i try to count each label in the folder I have loaded. Until 2 days ago it worked, now I don't understand what is wrong, can you help me please?
This is my code:
imds = imageDatastore('NuoveCategorie_agg2',...
'IncludeSubfolders',true, 'LabelSource','foldernames');
tbl = countEachLabel(imds)
categories = tbl.Label;
and this is the code where there is the error:
function tbl = countEachLabel(imds)
try
if isempty(imds.Labels)
tbl = table;
return;
end
[u, c] = groupAndCountLabels(imds);
tbl = table(u, c, 'VariableNames', {'Label', 'Count'});
catch e
throw(e) *This is line 27*
end
end