필터 지우기
필터 지우기

How can I save the output figure into an image file?

조회 수: 2 (최근 30일)
Gulfam Saju
Gulfam Saju 2022년 3월 14일
댓글: Gulfam Saju 2022년 3월 15일
recon_img = senserecon(aliased_img, sen_map,reduc, fi_matrix);
figure;imshow(abs(recon_img),[0 0.000005]);title('sense recon');
After this line of code the output image shows. Now, I want to export this output figure into another image file.

채택된 답변

yanqi liu
yanqi liu 2022년 3월 15일
recon_img = senserecon(aliased_img, sen_map,reduc, fi_matrix);
figure;imshow(abs(recon_img),[0 0.000005]);title('sense recon');
print(gcf,'-dpng','-r200','sense_recon')
  댓글 수: 1
Gulfam Saju
Gulfam Saju 2022년 3월 15일
The image saves with the title. Is there any way to remove the title? and there are several iterations in the program. So, there are multiple output images? How can I save all using a loop?

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Scott MacKenzie
Scott MacKenzie 2022년 3월 14일
편집: Scott MacKenzie 2022년 3월 14일
A easy way is to use exportgraphics, introduced in R2020a:
f = figure;
imshow(...);
exportgraphics(f, 'filename.jpg'); % or .png or whatever format you want (see documentation)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by