Creating .PNG image from temperature values
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Oliver Ramos
le 14 Oct 2020
Commenté : Ameer Hamza
le 14 Oct 2020
The size of my table (i.e. variables) is 462x622 double
I used the code below to create an image:
imagesc(image); colormap jet; axis off
However, the pixel size of the resulting image is 420x560.
How can I make an image with the same pixel size as the variables?
0 commentaires
Réponse acceptée
Ameer Hamza
le 14 Oct 2020
Modifié(e) : Ameer Hamza
le 14 Oct 2020
I guess you are using saveas() or some other function to save the .png file. They are not suitable for maintaining the resolution. Use imwrite() as shows in the following lines
image = round(rescale(image, 1, 256));
imwrite(image, jet, 'image.png');
6 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Convert Image Type dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!