Unibrain API-810 User Manual Page 26

  • Download
  • Add to my manuals
  • Print
  • Page
    / 97
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 25
26
Comments
This method constructs a FireiXCamera object and returns it, given an Index number. This number must
be less than GetNumOfConnectedCameras, starting from 0.
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 GetNumOfConnectedCameras – 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 6.0 syntax
Dim Camera As FireiXCamera
Dim i, NumOfCameras As Byte
NumOfCameras = Manager.GetNumOfConnectedCameras
For i = 0 To NumOfCameras – 1
Set Camera = Manager.GetCameraFromIndex(i)
If Camera.Vendor = "Unibrain" Then Exit For
Next
C++ syntax
IFireiXCamera* pICamera;
BSTR Vendor;
BYTE NumOfCameras;
HRESULT hr = pIManager->GetNumOfConnectedCameras(&NumOfCameras);
for (BYTE i = 0; i < NumOfCameras; ++i)
{
hr = pIManager->GetCameraFromIndex(i, &pICamera);
if (SUCCEEDED(hr))
{
pICamera->get_Vendor(&Vendor);
if (CString(_T("Unibrain")) == CString(Vendor))
break;
}
}
GetCameraFromGUID method
Prototype
FireiXCamera GetCameraFromGUID(IN FireiGUID GUID)
Comments
This method constructs a FireiXCamera 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 error will
occur.
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.
Page view 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 ... 96 97

Comments to this Manuals

No comments