From: Ish Khan on
I am doing my project in GUI and I need to ask the user to upload and image and than the image should be shown on the axes, I have already used this code to upload the image:
[filename, foldername] = uigetfile({'*.*'}, 'Select file');
if filename ~= 0
FileName = fullfile(foldername, filename);
end

to show the image in the axes this is what i am coding:
axes (handles.axes1);
F = imread (FileName);
imshow (F);

Nothing is showing in the axes, what am I doing wrong?

Thank you all for your help in advance!
From: Walter Roberson on
Ish Khan wrote:

> to show the image in the axes this is what i am coding:
> axes (handles.axes1);
> F = imread (FileName);
> imshow (F);
>
> Nothing is showing in the axes, what am I doing wrong?

F = imread(FileName);
imshow(F, 'Parent', handles.axes1);
From: ImageAnalyst on
Is F floating point or integer? If you look in the variable editor,
what are its values? Are they all zero? Or some small values? Maybe
you could try this:

F = imread (FileName, []);
From: Ish Khan on
Thank yOU so much Walter and ImageAnalyst, now the image can be seen in the axes :) Appreciate the help a lot!!!!!