![]() |
显示不同轴上的相机输入-MATLAB
我在MATLAB的GUI中有3个网络摄像机和3个轴。如何将webcaminput1放置在axis1上,将webcaminput2放置在axis2上,将webcaminput3放置在axis3上?
[B]回答:[/B] 如果您提供有关如何从网络摄像头获取输入并将其显示在屏幕上的更多详细信息,将很有帮助。 我假设您正在使用“图像采集工具箱”。显示网络摄像头输入的常用代码是 vid = videoinput('winvideo'); preview(vid) [URL="http://www.mathworks.com/access/helpdesk/help/toolbox/imaq/preview.html"]PREVIEW[/URL]也可以接受图像对象句柄作为第二个参数。因此,您可以先创建图像对象,然后使用其轴进行预览: 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) 我没有多个网络摄像头,所以我没有测试此代码,但我希望它可以在多个摄像机上使用。 [url=https://stackoverflow.com/questions/2842153]更多&回答...[/url] |
所有时间均为北京时间。现在的时间是 09:05。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.