How can I plot an image in matlab. This is giving me a Black png image!
35 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Rafael Freire
el 4 de Dic. de 2013
Respondida: barbara anderson
el 15 de Abr. de 2020
URL ='http://structures.wishartlab.com/molecules/HMDB00126/image.png'
filename='test.png'
urlwrite(URL,filename)
[y,z]=imread(filename,'png');
figure, imshow(y);
colormap(z)
This is giving me a Black image! How can i Plot it without getting all black?
2 comentarios
Respuesta aceptada
sixwwwwww
el 5 de Dic. de 2013
Editada: sixwwwwww
el 5 de Dic. de 2013
you can do it as follows:
URL ='http://structures.wishartlab.com/molecules/HMDB00126/image.png'
filename = 'test.png'
urlwrite(URL,filename)
y = imread(filename, 'BackgroundColor', [1 1 1]);
figure, imshow(y);
The problem here was to replace transparent pixels with some specific color. If we don't choose any specific color then MATLAB gives it black color
1 comentario
Tejas Waje
el 10 de En. de 2017
If I have a background image and I need to use a foreground image with some part transparent , what should I do?
Más respuestas (1)
Ver también
Categorías
Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!