Labfans是一个针对大学生、工程师和科研工作者的技术社区。 论坛首页 | 联系我们(Contact Us)
MATLAB爱好者论坛-LabFans.com
返回   MATLAB爱好者论坛-LabFans.com > 其它 > 资料存档
资料存档 资料存档
回复
 
主题工具 显示模式
旧 2019-12-10, 20:41   #1
poster
高级会员
 
注册日期: 2019-11-21
帖子: 3,006
声望力: 66
poster 正向着好的方向发展
帖子 显示不同轴上的相机输入-MATLAB

我在MATLAB的GUI中有3个网络摄像机和3个轴。如何将webcaminput1放置在axis1上,将webcaminput2放置在axis2上,将webcaminput3放置在axis3上?



回答:

如果您提供有关如何从网络摄像头获取输入并将其显示在屏幕上的更多详细信息,将很有帮助。

我假设您正在使用“图像采集工具箱”。显示网络摄像头输入的常用代码是

vid = videoinput('winvideo'); preview(vid) PREVIEW也可以接受图像对象句柄作为第二个参数。因此,您可以先创建图像对象,然后使用其轴进行预览:

vid1 = videoinput('winvideo',1); % create video input object from the 1st source vid2 = videoinput('winvideo',2); % create video input object from the 2nd source subplot(211) h1 = image; % create image object axis ij % flip the image preview(vid1,h1) % display 1st webcam preview subplot(212) % same for the 2nd camera h2 = image; axis ij preview(vid2,h2) 我没有多个网络摄像头,所以我没有测试此代码,但我希望它可以在多个摄像机上使用。



更多&回答...
poster 当前离线   回复时引用此帖
回复


发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛禁用 表情符号
论坛启用 [IMG] 代码
论坛启用 HTML 代码



所有时间均为北京时间。现在的时间是 20:44


Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.