1

我现在有这个代码:

Public Touchless As New TouchlessLib.TouchlessMgr
Public Camera1 As TouchlessLib.Camera = Touchless.Cameras.ElementAt(0)

但它只有一台相机。谁能帮我?

4

1 回答 1

1

看起来Touchless.Cameras是一个相机列表,通过这样做,Cameras.ElementAt(0)您可以明确地从列表中选择第一个。

尝试这个:

Public cameras() As TouchlessLib.Camera = Touchless.Cameras

然后您可以使用cameras(0)访问第一个摄像头、cameras(1)第二个摄像头,以此类推。

或者你可以像这样循环相机:

For Each cam As TouchlessLib.Camera In Touchless.Cameras
    ' do what you want with cam
next 
于 2012-12-14T17:25:41.017 回答