필터 지우기
필터 지우기

why image take much time in appearing on gui fig?

조회 수: 2 (최근 30일)
romasha
romasha 2014년 2월 21일
댓글: romasha 2014년 2월 21일
hello, i designed a gui in which,on push button there is a folder"same iris" opens and select an image and this show on gui fig but problem is that image take much time in appearing on gui fig what it is happening kindly help .. my code is given below Code function pushbutton1_Callback(~, ~, ~) % hObject handle to pushbutton1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) ext='*.bmp'; folder='same iris'; image=uigetfile([folder '\' ext]); old_image=fullfile(folder,image); img=imread(old_image);imshow(img);

답변 (1개)

Image Analyst
Image Analyst 2014년 2월 21일
편집: Image Analyst 2014년 2월 21일
This should not take a long time. Normally it happens virtually instantly for me. For some images, like a 63 MB linescan image I sometimes work with, it can take 2-4 seconds to read it in and downsize it for display. Perhaps it's causing a delay because you picked a reserved function name "image" for the name of your image variable. When you do that it destroys the image() function and maybe that causes some delay. Or it has to figure out what to do. Pick another name so there is no conflict, like baseFileName or something.
baseFileName = uigetfile([folder '\' ext]);
old_image = fullfile(folder, baseFileName);

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by