how to write binary image into text file

hello, i want to write binary image into a text file. thank u

 Réponse acceptée

David Sanchez
David Sanchez le 28 Nov 2013
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 commentaires

megha
megha le 4 Déc 2013
thank you sir can i ask one more question related to edge detection using sobel operator. I am doing my project related to this subject on FPGA so i want to see that what will be the result in matlab can u tell me how to do edge detection using sobel oerator in matlab. Thank you
Walter Roberson
Walter Roberson le 4 Déc 2013
Really that should go into a different Question.
SUMEET
SUMEET le 4 Juin 2014
search on matlab central with link: Edge detection using sobel operator

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Convert Image Type dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by