MATLAB: CAN I DIRECTLY BROWSE THE THE IMAGE TO GUI USING IMREAD AND IMSHOW FUNCTION ONLY

aditya ahu

IMAGE=IMREAD(IMAGENAME); IMSHOW(IMG);

Best Answer

What do you mean by "browse" ?
In the code
IMAGE = imread(IMAGENAME);
imshow(IMAGE)
it is permitted for IMAGENAME to be a string which is the exact name of an image file, or to be the name of an image file which is somewhere on your MATLAB path. It is also permitted for IMAGENAME to be in the form of an http url.
However, if you do not already know the name or url of the desired image file, then you will need to use additional functions to locate it. imread() does not have any method to permit users to browse directories to select an image.