How do I convert files on my workspace to mat file ??
1 回表示 (過去 30 日間)
古いコメントを表示
I have a file on my workspace named effLBP containing extracted feature It's a 592*896*3uint8 matrix
1. How do I convert this file to .mat file ??
2.How do I convert the .mat file to csv or arff file format?
Please help.
Thanks
0 件のコメント
採用された回答
Walter Roberson
2018 年 4 月 5 日
To load the uint8 data you need to know what order it was written in. The basic setup is
fid = fopen('effLBP.dat', 'r');
data = fread(fid, 592*896*3, '*uint8');
fclose(fid);
After that you have to start re-arranging the data until it makes sense, such as
data123 = reshape(data, 592, 896, 3);
data213 = permute(reshape(data, 896, 592, 3), [2 1 3]);
data132 = permute(reshape(data, 592, 3, 896), [1 3 2]);
data321 = permute(reshape(data, 3, 896, 592), [3 2 1]);
and see which one looks right when you image() it.
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!