How to save the hold on image

10 ビュー (過去 30 日間)
HUANG YU-CHE
HUANG YU-CHE 2020 年 7 月 5 日
コメント済み: HUANG YU-CHE 2020 年 7 月 7 日
So I two figures, one is the background and one is the plot line. How can I save them all in one figure?
imshow(averaged_bw1);hold on
plot(interp1((1:n)',re,(1:n)','pchip'),rowx, 'b-', 'LineWidth', 2);
recDir = fullfile('C:\','Users','User','Documents','MATLAB',cas,strrep('carmeri','i',int2str(num_carmer))...
,strrep('linetracki','i',int2str(num_photo)));
mkdir(recDir);
imwrite
(averaged_bw1,re,[recDir,'\',strrep('linet','t',num2str(numt)),'.png']);%what code should I write in this part
I'm going to save the figure like this

採用された回答

Image Analyst
Image Analyst 2020 年 7 月 5 日
Try exportgraphics() if you have R2020a. Otherwise use export_fig().
  1 件のコメント
HUANG YU-CHE
HUANG YU-CHE 2020 年 7 月 7 日
thanks

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

その他の回答 (1 件)

dipak nigam
dipak nigam 2020 年 7 月 5 日
Hey, I think you need to use the 'imwrite' command instead of 'imwrit'.
If it is a typo, you can refer to this answer to save the image at your desired directory with the name you want.
Please go through imwrite documentation as well
  4 件のコメント
Image Analyst
Image Analyst 2020 年 7 月 5 日
imwrite() won't work unless the blue has been burned into an RGB image.
HUANG YU-CHE
HUANG YU-CHE 2020 年 7 月 7 日
thanks

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by