展开全部
用助手---打开新的Image Acquisition---图像获取接口(选择对应的)---代码生成---插入代码
下面是DirectShow接口的代码
* Code generated by Image Acquisition 02
open_framegrabber ('DirectShow', 1, 1, 0, 0, 0, 0, 'default', 8, 'rgb', -1, 'false', 'default', 'Integrated Camera', 0, -1, AcqHandle)
grab_image_start (AcqHandle, -1)
while (true)
grab_image_async (Image, AcqHandle, -1)
* Do something
endwhile
close_framegrabber (AcqHandle)
下面是DirectShow接口的代码
* Code generated by Image Acquisition 02
open_framegrabber ('DirectShow', 1, 1, 0, 0, 0, 0, 'default', 8, 'rgb', -1, 'false', 'default', 'Integrated Camera', 0, -1, AcqHandle)
grab_image_start (AcqHandle, -1)
while (true)
grab_image_async (Image, AcqHandle, -1)
* Do something
endwhile
close_framegrabber (AcqHandle)
更多追问追答
追问
这代码没有解决问题,还是不能定时采集啊
追答
这个只是举例,要知道你相机的接口才行啊,上面的代码是针对DirectShow接口的
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询