フィルターのクリア

How to save the contour as a image?

30 ビュー (過去 30 日間)
muhammad choudhry
muhammad choudhry 2020 年 7 月 20 日
回答済み: Image Analyst 2020 年 7 月 21 日
Hi,
I am generating the contours with the code below but would like to know, how to save that contour as an image into the folder, do not mind the format of the picture it will be saved in!
Code:
I = imread(frame1.jpg);
imcontour (I,2);
I am not sure what other command to use after imcontour to save it directly as a image, I can save manually by using figure() but is there a way that I can save it directly to some folder.

採用された回答

KSSV
KSSV 2020 年 7 月 20 日
Read about saveas.
saveas(gcf,'myFigure.png') ;
  1 件のコメント
muhammad choudhry
muhammad choudhry 2020 年 7 月 20 日
Thanks alot for the link bro, worked!

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

その他の回答 (1 件)

Image Analyst
Image Analyst 2020 年 7 月 21 日
If you have r2020a or later, use exportgraphics().

Community Treasure Hunt

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

Start Hunting!

Translated by