why image take much time in appearing on gui fig?

1 vue (au cours des 30 derniers jours)
romasha
romasha le 21 Fév 2014
Commenté : romasha le 21 Fév 2014
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);

Réponses (1)

Image Analyst
Image Analyst le 21 Fév 2014
Modifié(e) : Image Analyst le 21 Fév 2014
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);

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by