Image watermarking using DWT GUI

How to do a "Save" and "Exit" button in Matlab Gui. I need help with the callback function

2 Commenti

Ubaashan - are you creating your GUI with GUIDE, App Designer, or programmatically? When the user presses the save button, presumably you want to save something to a file or...? Please clarify.
Geoff, I am using GUIDE. I am doing doing a GUI for Image watermarks. This is how it works, when the user has finished watermarking, the watermarked image has to be saved in the desktop - once the "Save" button is clicked.

Accedi per commentare.

 Risposta accettata

Ubaashana - in the (save) push button callback, you will save the data to file, possibly using imwrite. For example,

 function pushbutton1_Callback(hObject, eventdata, handles)
 % get the image data to save (from an axes or the handles structure)
 imgToSave = ...;
 % save to file
 filename = ...;
 imwrite(imgToSave, filename);

I'm assuming that you can easily get the watermarked image from the handles structure and that the filename is known (or are you asking the user for the filename?).

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by