From: Yaseen on
I first run the m-file and it starts fine but when i try to load an image then i get the following error.

??? Error using ==> imread at 315
File "image4.jpg" does not exist.

Error in ==> intensity>pushbutton1_Callback at 86
I = imread(filename);

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> intensity at 44
gui_mainfcn(gui_State, varargin{:});

Error in ==>
guidemfile>@(hObject,eventdata)intensity('pushbutton1_Callback',hObject,eventdata,guidata(hObject))


??? Error while evaluating uicontrol Callback

immediate help will be appreciated.
thanks
From: Walter Roberson on
Yaseen wrote:
> I first run the m-file and it starts fine but when i try to load an
> image then i get the following error.
>
> ??? Error using ==> imread at 315
> File "image4.jpg" does not exist.

It appears the input file "image4.jpg" does not exist. We cannot say
much more than that because you have no provided any information about
how the name "image4.jpg" was selected or why you have reason to believe
that the file should exist.

If you used uigetfile() to locate the file, then chances are that you
did not put together the returned path along with the file name to
create a complete file path and are attempting to open just the file
name even through it happens to be in a different directory. If you
select a file in a different directory using uigetfile() then Matlab's
idea of what the "current directory" is does not change.