필터 지우기
필터 지우기

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 CenterFile Exchange에서 Red에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by