how can i display the image in GUI??

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)

 채택된 답변

Walter Roberson
Walter Roberson 2013년 2월 26일

0 개 추천

complete = fullfile(pn,fn);
The pathname returned by uigetfile does not necessarily have the directory separator at the end of it.

댓글 수: 1

sudha
sudha 2013년 2월 27일
Thank you..but its not displaying still...

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

카테고리

도움말 센터 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by