How can I save my scalogram image?
12 ビュー (過去 30 日間)
古いコメントを表示
I am creating a scalogram with:
img=cwt(signal);
I want to save the scalogram produced. I am looking just to save the image itself; no axes, title, key, etc.
I am trying:
exportgraphics(img,"cwt.png")
and receive errror:
Error using exportgraphics
First parameter must specify the axes or chart object.
Is img not the object I want since that is where I saved the cwt(signal)?
0 件のコメント
採用された回答
Rik
2022 年 3 月 16 日
Since it clears the current figure (and then creates the object, the easiest way is to this:
img=cwt(signal);
exportgraphics(gca,"cwt.png");
2 件のコメント
Rik
2022 年 3 月 21 日
load mtlb
cwt(mtlb,Fs)
h=get(gca,'Children');
h_im=findobj(h,'Type','Image');
figure,imshow(h_im.CData)
So, as you can see, you will have to rescale based on the XData and YData properties to view it properly. Then you will have to apply a colormap to convert it to a color image. (but this way you have the actual data instead of a screenshot)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!