How can I merge a created rectangle with an image?

조회 수: 3 (최근 30일)
Trent Barbusca
Trent Barbusca 2018년 7월 2일
답변: Stephen23 2018년 7월 3일
I used the rectangle command to place a rectangle over an image I loaded. How to I save what is displayed in the window as a single image?
I realize I could use inserShape but this doesn't allow me to get a rectangle with curved edges.

채택된 답변

Stephen23
Stephen23 2018년 7월 3일
S = getframe(gca);
im = S.cdata;

추가 답변 (1개)

Kaitlyn Keil
Kaitlyn Keil 2018년 7월 2일
I believe you can use
savefig(figHandle, 'NewFigureName.fig')
if you want the image, or use the File>Save As route in the figure window if you want a different filetype. Here's the documentation for savefig .
Hope that helps!

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by