MATLAB: How to input the image as input to the GUI.

matlab gui

How to input the image as input to the GUI.?

Best Answer

[filename, pathname] = uigetfile('*.png', 'Select an image?');
if ~ischar(filename); return; end %user cancelled
filepath = fullfile(pathname, filename);
Img = imread(filepath);