- Call uigetfile() to get the input filename.
- Call imread() to read the input image from the disk into a variable in memory.
- Process the image in whatever way you want.
- Call imshow() to display the image in the axes.
- Call uiputfile() to get an output filename.
- Call imwrite() to save the image to disk.
how to save image in axes gui?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
arian nur afgan
el 3 de Jun. de 2012
Comentada: Ahmed Ali
el 5 de Ag. de 2021
hello..
i'm have a image in axes1 gui
how to save the image with uiputfile button..
0 comentarios
Respuesta aceptada
Image Analyst
el 3 de Jun. de 2012
If your image has annotation in the overlay (arrows, text, etc.) then use export_fig() - see the File Exchange. It's the first one you see on the File Exchange screen because it's the most downloaded function of all.
0 comentarios
Más respuestas (1)
Alex Taylor
el 4 de Jun. de 2012
Image Analyst's answer is great. I would only add that if the image in your GUIDE GUI has been somehow modified from the version originally read from the file, or if the 'cdata' of your image is stored in the .fig file of your GUI and you don't have access to the original file that the image came from, you would use the following modification to Image Analyst's steps:
- Execute "hIm = findall(hAx,'type','image')", you'll need to change hAx to the actual variable name of your axes handle.
- Execute get(hIm,'CData') to read the image data in axes1 into a variable in memory
- Process the image in whatever way you want.
- Call imshow() to display the image in the axes.
- Call uiputfile() to get an output filename.
- Call imwrite() to save the image to disk.
1 comentario
Ahmed Ali
el 5 de Ag. de 2021
Thank you so much Alex, it worked perfectly!! you saved my brain from being exploded!
Ver también
Categorías
Más información sobre Title en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!