Creating .PNG image from temperature values

3 ビュー (過去 30 日間)
Oliver Ramos
Oliver Ramos 2020 年 10 月 14 日
コメント済み: Ameer Hamza 2020 年 10 月 14 日
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?

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 10 月 14 日
編集済み: Ameer Hamza 2020 年 10 月 14 日
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 件のコメント
Oliver Ramos
Oliver Ramos 2020 年 10 月 14 日
Thank you very much!!
Ameer Hamza
Ameer Hamza 2020 年 10 月 14 日
I am glad to be of help!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by