Azzera filtri
Azzera filtri

why image take much time in appearing on gui fig?

2 visualizzazioni (ultimi 30 giorni)
romasha
romasha il 21 Feb 2014
Commentato: romasha il 21 Feb 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);

Risposte (1)

Image Analyst
Image Analyst il 21 Feb 2014
Modificato: Image Analyst il 21 Feb 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);

Categorie

Scopri di più su Image Processing Toolbox in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by