How to automatically "fit to window" after launching vision.VideoPlayer?

7 ビュー (過去 30 日間)
Canberk Suat Gurel
Canberk Suat Gurel 2018 年 3 月 25 日
回答済み: Adrian Bell 2019 年 7 月 25 日
Using the following code I can position the VideoPlayer at a particular location but how can I make it (in code) adjust its ratio to fit to window? Please see the orange arrow below.
player = vision.VideoPlayer('Name', 'Processed Frame','Position',[10, 10, 800, 600]); %[left bottom width height]

採用された回答

Adrian Bell
Adrian Bell 2019 年 7 月 25 日
Basically, you use figure handles on the player object to automatically press the "Maintain fit to window" button for you.
set(0,'showHiddenHandles','on')
fig_handle = gcf ;
fig_handle.findobj % to view all the linked objects with the vision.VideoPlayer
ftw = fig_handle.findobj ('TooltipString', 'Maintain fit to window'); % this will search the object in the figure which has the respective 'TooltipString' parameter.
ftw.ClickedCallback() % execute the callback linked with this object

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeComputer Vision with Simulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by