フィルターのクリア

Why "imshow" function in GUI so slow?

8 ビュー (過去 30 日間)
Yang
Yang 2012 年 3 月 16 日
コメント済み: Image Analyst 2022 年 9 月 20 日
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?

採用された回答

Walter Roberson
Walter Roberson 2012 年 3 月 18 日
If you must use imshow(), then skip the axes() call and use
imshow(f, 'Parent', handles.axes1);
However, if you do not need imshow() specifically (e.g., you do not need the tools that it adds), then use
imagesc(f, 'Parent', handles.axes1);
  4 件のコメント
Yang
Yang 2012 年 3 月 18 日
problem solved. thank you!
Image Analyst
Image Analyst 2012 年 3 月 18 日
You likely had a grayscale image and for some strange reason imagesc, unlike imshow, applies some weird colormap. To undo that you also need to call colormap(gray(256)) right after you call imagesc.

サインインしてコメントする。

その他の回答 (2 件)

Image Analyst
Image Analyst 2012 年 3 月 16 日
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 件のコメント
DEBANJAN DEBNATH
DEBANJAN DEBNATH 2022 年 9 月 20 日
I want it to look like a vedio with high frame per second. Can u help?
Image Analyst
Image Analyst 2022 年 9 月 20 日
@DEBANJAN DEBNATH - not enough information. You want what to "look like" a video? Please explain in your own, new discussion thread (not here).

サインインしてコメントする。


Jan
Jan 2012 年 3 月 16 日
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.
  2 件のコメント
Yang
Yang 2012 年 3 月 17 日
yes but my image is binary image, how can I show it by using image
Jan
Jan 2012 年 3 月 18 日
Please post a code which reproduces the problem. I do not see a problem for using IMAGE for a binary image. But perhaps I do not know exactly, what a binary image is...

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSpecifying Target for Graphics Output についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by