Cannot convert images from png to pgm
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
When I ran this code, it shows the image just fine:
oim = pgmRead('dragon.ascii.pgm');
figure;
showIm(oim);
When I try converting from png to pgm using imwrite:
img = imread('dragon.png');
imwrite(img, 'dragon.pgm', 'pgm', 'Encoding', 'ASCII');
oim = pgmRead('dragon.pgm');
figure;
showIm(oim);
The image shows up as some slanted lines. What am I doing wrong? Any help is appreciated.
0 comentarios
Respuestas (1)
Image Analyst
el 31 de Mzo. de 2015
pgmread() does not appear to be a built-in MATLAB function - at least I don't have it in any of my toolboxes. I suggest you contact the author of pgmread() for guidance.
2 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!