This example shows how to connect to the camera and get device info.
Device found.
Name: LIPSTS800
URI: \\?\usb#vid_2df2&pid_0213#200901010001#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
USB Product ID: 531
USB Vendor ID: 11762
Vendor: LIPS
using System;
using System.Threading;
using OpenNIWrapper;
OpenNI.OnDeviceConnected += OpenNiOnDeviceConnected;
OpenNI.OnDeviceDisconnected += OpenNiOnDeviceDisconnected;
DeviceInfo[] devices = OpenNI.EnumerateDevices();
DeviceInfo[] devices = OpenNI.EnumerateDevices();
if (devices.Length == 0)
{
Console.WriteLine("Cannot find available OpenNI2 device.\n");
}
else
{
DeviceInfo info = devices[0];
Console.WriteLine("\nDevice found.");
Console.WriteLine("Name: " + info.Vendor + info.Name);
Console.WriteLine("URI: " + info.Uri);
Console.WriteLine("USB Product ID: " + info.UsbProductId);
Console.WriteLine("USB Vendor ID: " + info.UsbVendorId);
Console.WriteLine("Vendor: " + info.Vendor);
}
Device device = devices[0].OpenDevice();
OpenNI.Shutdown();
Environment.Exit(0);