Is there any function like 'uigetfile' or 'uiopen' so that I can chose an Image of my own choice each time I want to process an Image with out using 'imread()'

Hello,
I am doing some image processing. If I use 'imread('img.jpg') I have to specify the name in advance. I have images under different names so it requires me to change the name in imread() every time I run the code. I want to ask if there is any other function such as 'uiopen' or 'uigetfile' so that I can select the image of my choice when I run the script file.
Thanks.

 Accepted Answer

[filename, directory] = uigetfile('Select an image');
complete_name = fullfile(directory, filename);
TheImage = imread(complete_name);

More Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!