BoxLabelDatastore - BoxFormatV​alidationE​rror: Wrong format of first column

1 回表示 (過去 30 日間)
Odo Luo
Odo Luo 2022 年 11 月 20 日
回答済み: Odo Luo 2022 年 11 月 21 日
I have a cell ctBoxesAndLabel with two columns. The first one in a M by 4 format, where M is the number of boxes in each table element. The second column in a 1xM format.
I try to do a BoxLabelDatastore with following code:
t = cell2table(ctBoxesAndLabel,'VariableNames',{'Boxes','Labels'});
lockds= boxLabelDatastore(t);
but it still complains about the wrong format of column one.
What is my mistake ?
Update:
I also treid to convert the cell in column 1 to doubles but still getting an error in row 3 (see ctBoxesAndLabel2.m)

採用された回答

Odo Luo
Odo Luo 2022 年 11 月 21 日
The boxes with the 4 corrdinates needed to be transformed and the labels needed to be transposed.
ctBoxesAndLabel(:,1)=cellfun(@cell2mat,ctBoxesAndLabel(:,1),'UniformOutput',false);
ctBoxesAndLabel(:,2)=cellfun(@transpose,ctBoxesAndLabel(:,2),'UniformOutput',false);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeComputer Vision with Simulink についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by