Why "imshow" function in GUI so slow?
Show older comments
I have a GUI program which shows 10 images using "axes(handles.axes1);" and "imshow(f);" function. But when I run it, the 10 images appear sequentially but not at the same time. There's a delay between each image showing. What's wrong within it?
Accepted Answer
More Answers (2)
Image Analyst
on 16 Mar 2012
4 votes
Call "cla reset" before each call to imshow. Otherwise all the images "stack up" in the control and it will slow down each additional time imshow is called. cla reset clears out any prior images.
6 Comments
Yang
on 17 Mar 2012
Image Analyst
on 17 Mar 2012
I'm still not sure what your question is. Is it that you want all 10 images to flash by sequentially and almost instantaneously (because you say it's too slow), OR is it that they appear sequentially instead of at the same time? If you want them all at the same time, use the montage() function in the Image Processing Toolbox to make a mosaic of all your images in one huge single image.
Gerald
on 20 Jun 2014
Thank you so much for your "cla reset" answer!! Images are now displayed much faster without truncation!! Thx!
Image Analyst
on 20 Jun 2014
You're welcome. Glad my suggestion was helpful to you. Can you go ahead and "Vote" for my answer then?
DEBANJAN DEBNATH
on 20 Sep 2022
I want it to look like a vedio with high frame per second. Can u help?
Image Analyst
on 20 Sep 2022
@DEBANJAN DEBNATH - not enough information. You want what to "look like" a video? Please explain in your own, new discussion thread (not here).
Jan
on 16 Mar 2012
0 votes
Nothing is wrong. Displaying an image needs some time.
You can use image and let drawnow trigger the screen update of the figure after all images have been inserted.
I assume posting the relevant part of the code and the size of the images might reveal other problems.
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!