vision.Videoplayer in app

7 ビュー (過去 30 日間)
Nathan Churcher
Nathan Churcher 2019 年 11 月 28 日
回答済み: Chidvi Modala 2019 年 12 月 31 日
I am using vision.Videoplayer to view video from a USB camera, however I want to create an app with a button to begin viewing the video, but how do I bring up the vision.Videoplayer in the app since App designer only has plot?

回答 (1 件)

Chidvi Modala
Chidvi Modala 2019 年 12 月 31 日
You can add a ButtonPushedFcn callback for button and add your code for viewing video from a USB camera
For your reference, You can provide the below code in the callback function. You will be able to play the video by pushing the button.
videoFReader = vision.VideoFileReader('viplanedeparture.mp4');
videoPlayer = vision.VideoPlayer;
while ~isDone(videoFReader)
frame = step(videoFReader);
step(videoPlayer,frame);
end
pause(100);
This code is taken from the Examples section of vision.VideoPlayer
The UIHTML component, introduced in 19b, might also be an option

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by