how can i display the image in GUI??

1 Ansicht (letzte 30 Tage)
sudha
sudha am 26 Feb. 2013
This is my code. To read the image from the file and display that image..m able to read the image but m not able to display it. How do i correct it???
someone plz help me out???
handles.output = hObject;
[fn pn] = uigetfile('*.jpg','select jpg file');
complete = strcat(pn,fn);
set(handles.edit2,'String',complete);
str=get(handles.edit2,'String');
I=imread(str);
figure,imshow(I)

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 26 Feb. 2013
complete = fullfile(pn,fn);
The pathname returned by uigetfile does not necessarily have the directory separator at the end of it.
  1 Kommentar
sudha
sudha am 27 Feb. 2013
Thank you..but its not displaying still...

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (2)

Doug Hull
Doug Hull am 26 Feb. 2013

sudha
sudha am 27 Feb. 2013
ya i got it...Thank you

Kategorien

Mehr zu Images finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by