Image to binary conversion
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,I would like to convert each pixel value of an image to one byte. how do i do it. I tried
for i=1:a
for j=1:b
k(i,j)=dec2bin(image(i,j));
end;
end;
where a and b are size of the image. But there comes size mismatch error. Please help me to correct it.
0 Kommentare
Akzeptierte Antwort
Chandra Kurniawan
am 11 Mär. 2012
for i = 1 : a
for j = 1 : b
k{i,j} = dec2bin(image(i,j));
end
end
please use cell-array to store strings, not array.
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!