フィルターのクリア

set position and size from imshow in matlab loop

31 ビュー (過去 30 日間)
Szillat
Szillat 2018 年 4 月 22 日
コメント済み: Szillat 2018 年 4 月 23 日
Hi,
I like to plot an image with a specific screen position and size in my computer. my solution was to make:
f = figure (5);
imshow(frame);
set(f,'Position', [2 42 681 642])
but it is a problem, because always in the loop that the command imshow is setting, the image comes into the middle from the screen and then, after that, the image is setting the position i want. is that a smart solution for that?

採用された回答

Walter Roberson
Walter Roberson 2018 年 4 月 22 日

once do

f = figure (5, 'Position', [2 42 681 642]);
imh = imshow(frame);

After that, each time in the loop do

set(imh, 'CData', new_frame);
drawnow();

without any imshow() or figure() call.

  1 件のコメント
Szillat
Szillat 2018 年 4 月 23 日
thanks. it works great.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by