How to save an image using a push button on MATLAB gui

Hi,
I have just started working with MATLAB GUI. I can open an image, process the image but unable to save the image to a destination folder.
Any help will be appreciated.

 Respuesta aceptada

[filename, foldername] = uiputfile('Where do you want the file saved?');
complete_name = fullfile(foldername, filename);
imwrite(TheArray, complete_name);

6 comentarios

Tania
Tania el 26 de Ag. de 2015
Thank you very much. I can do it now.
Undefined function or variable 'TheArray'.
TheArray should be replaced with the name of the variable that holds the image you wish to write out.
monu
monu el 19 de Mzo. de 2017
what to mention in filename , foldername ?? both in first n second line??
They are returned from uiputfile() - it's whatever the user chose. You can also use imsave() instead of uiputfile().
In other words they are not constants, they are values returned by the uigetfile routine according what the user chooses.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Convert Image Type en Centro de ayuda y File Exchange.

Preguntada:

el 26 de Ag. de 2015

Comentada:

el 19 de Mzo. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by