Unibrain API-810 User Manual Page 26

  • Download
  • Add to my manuals
  • Print
  • Page
    / 95
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 25
26
It is most useful when:
A single camera is connected (a call with 0 index is sufficient).
The order in which the cameras are created is not important, and all camera objects must be created
(a for-loop from 0 to GetConnectedCamerasCount – 1 is sufficient).
A search for a specific camera, following specific criteria is required (the same for-loop, this time
looking at the properties of each camera and stopping at the first that meets the criteria).
Visual Basic syntax
Dim Camera As FireiCamera
Dim i, NumOfCameras As Byte
NumOfCameras = Manager.GetConnectedCamerasCount
For i = 0 To NumOfCameras - 1
Camera = Manager.GetCameraFromIndex(i)
If Camera.Vendor = "Unibrain" Then Exit For
Next
C# syntax
for (int i = 0; i < Manager.GetConnectedCamerasCount(); ++i)
{
Camera = Manager.GetCameraFromIndex(i);
if (Camera.Vendor == "Unibrain")
break;
}
GetCameraFromGUID method
Prototype
public FireiCamera GetCameraFromGUID(FireiGUID guid)
Comments
This method constructs a FireiCamera object and returns it, given a valid FireiGUID object. The GUID
represented by this FireiGUID must belong to a camera connected on the system; otherwise an exception
will be thrown.
It is most useful when the camera GUID is known beforehand, and provides a more direct way of accessing
the camera as opposed to GetCameraFromIndex, because the positioning of the camera on the bus is
irrelevant.
It is also mated to the SelectCamera method, as the FireiGUID returned by that method can be passed
directly in GetCameraFromGUID to create the selected camera.
Visual Basic syntax
Dim Camera As FireiCamera
Dim GUID As FireiGUID
If Manager.SelectCamera(GUID) = True Then
Camera = Manager.GetCameraFromGUID(GUID)
End If
Page view 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 ... 94 95

Comments to this Manuals

No comments