how to use imwrite in matlab?
2 ビュー (過去 30 日間)
古いコメントを表示
how to use imwrite in matlab?The file which that we are specifying to write,should it be already be created in the folder?
0 件のコメント
回答 (4 件)
Walter Roberson
2015 年 6 月 17 日
No. If the file does not already exist then it will be created. If the file does already exist then it will be overwritten.
4 件のコメント
B.k Sumedha
2015 年 6 月 17 日
編集済み: B.k Sumedha
2015 年 6 月 17 日
imwrite(A,filename,fmt);
This is the general format of imwrite. Its not necessary that image needs to be present in ur folder. Where A is ur image which u want to save,specify the file name and its format. For ex:
imwrite(im_DIF,'Image difference.bmp','bmp');
Alejandro Cruz Rubio
2019 年 6 月 1 日
Anyone Know how to save a block of images with imwrite?
8 件のコメント
Alejandro Cruz Rubio
2019 年 6 月 3 日
編集済み: Rik
2019 年 6 月 3 日
My version of Matlab is 2018b. Yeah I solve the problem with K and k and I get the same error. And if I use the arrayCells inside of for, that is:
for k=1:numel(arrayCells)
filename = sprintf('Output_block_%d.png', K);
imwrite(arrayCells{k}, filename);
end
I get this error: "Error using imwrite (line 433)
Unable to determine the file format from the file name" because I use arrayCells but if I use "block" I don´t have any problem but I don´t get my goal
Rik
2019 年 6 月 3 日
With the code you show you actually haven't fixed the code yet. The code below should work a lot better.
for k=1:numel(arrayCells)
filename = sprintf('Output_block_%d.png', k);%<--- lower case k, instead of upper case K
imwrite(arrayCells{k}, filename);
end
kass
2020 年 1 月 29 日
for k=1:numel(I)
imwrite(I{k}, ['filename' num2str(k) '.pgm']);
end
%I is arraycells
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Import, Export, and Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!