Can I use UIAxes to stream live video from a camera and how?

1 回表示 (過去 30 日間)
Huayan Wang
Huayan Wang 2018 年 2 月 6 日
コメント済み: Ahmer Shahid 2018 年 11 月 13 日
I am using R2017b App designer to develop an image acquisition program.
Anybody can tell me can I do it through the UIAxes component and how to do it? Or is there other way to make it happen with the App designer?
Thanks in advance!
  2 件のコメント
Jan
Jan 2018 年 2 月 6 日
Can you do what by an UIAxes? "Develop an image acquisition program" does not explain any details.
Huayan Wang
Huayan Wang 2018 年 2 月 6 日
Hi Jan,
Thanks for the quick reply.
I want to stream live video from a camera through the UIAxes component.
I used to do it with command preview(vidobj, himage) I tried preview(vidobj, app.UIAxes) in the app designer. But it didn't work. I want to know how to make the UIAxes stream live video from my camera.
Thank you!

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

回答 (1 件)

Prajith Chilummula
Prajith Chilummula 2018 年 2 月 23 日
Please checkout the code snippet and inform whether it works.
vidobj = videoinput('winvideo');
triggerconfig(vidobj, 'manual');
start(vidobj)
while(vidobj.FramesAcquired <= 200)
snapshot = getsnapshot(vidobj);
imshow(mov,'Parent',app.UIAxes);
drawnow limitrate
end
stop(vidobj)
  1 件のコメント
Ahmer Shahid
Ahmer Shahid 2018 年 11 月 13 日
I use this code It runs very slowly not like a live streaming and also when I close the GUI the camera is still open. Kindly help me to resolve this problem Thanks.

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

Community Treasure Hunt

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

Start Hunting!

Translated by