how to write binary image into text file

1 次查看(过去 30 天)
hello, i want to write binary image into a text file. thank u

采纳的回答

David Sanchez
David Sanchez 2013-11-28
M = your_matrix_with_image_data;
fid = fopen('your_binary_im.txt', 'w+');
for i=1:size(M, 1)
fprintf(fid, '%f ', M(i,:));
fprintf(fid, '\n');
end
fclose(fid);
  3 个评论
Walter Roberson
Walter Roberson 2013-12-4
Really that should go into a different Question.
SUMEET
SUMEET 2014-6-4
search on matlab central with link: Edge detection using sobel operator

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by