How can I merge a created rectangle with an image?

1 visualización (últimos 30 días)
Trent Barbusca
Trent Barbusca el 2 de Jul. de 2018
Respondida: Stephen23 el 3 de Jul. de 2018
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.

Respuesta aceptada

Stephen23
Stephen23 el 3 de Jul. de 2018
S = getframe(gca);
im = S.cdata;

Más respuestas (1)

Kaitlyn Keil
Kaitlyn Keil el 2 de Jul. de 2018
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!

Categorías

Más información sobre Images en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by