Welcome to the MetriCam API documentation. This page gives a short overview of the MetriCam components and layout.
MetriCam is the first common and unified real-time 3-D camera SDK for .NET. It supports all major Time-of-Flight cameras from Fotonic, Mesa Imaging and PMD Technologies. Furthermore, MetriCam also includes support for popular PrimeSense sensors like Kinect and Xtion Pro.
It's major features are:
MetriCam consists of the following components:
Contains all the relevant interfaces and classes representing the various supported cameras.
This is a very basic test application for all MetriCam wrappers. It supports connecting, fetching and displaying frames and disconnecting a single camera.
The following code sample demonstrates how two use MetriCam with a PMD CamCube.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using MetriCam; namespace Simple { class Program { #region Private Fields private static IMetriCamera camera; #endregion #region Main static void Main(string[] args) { try { Console.WriteLine("Create new CamCube object."); camera = new CamCube3(); Console.WriteLine("Connect CamCube."); camera.Connect(); Console.WriteLine("Get all supported channels of the camera.\n"); for (int i = 0; i < camera.NumberOfChannels; i++) { Console.WriteLine("\t - " + camera.GetChannelName(i)); } Console.WriteLine("\nTrigger a new frame."); camera.Update(); Console.WriteLine("Receive distance image of camera."); float[,] distances = camera.GetChannel(camera.GetChannelId(ChannelType.ChannelNames[(int)ChannelType.ChannelNameIndex.DISTANCE])); Console.WriteLine("Distance in pixel (20, 30): " + distances[20, 30]); Console.WriteLine("Change integration time to 400"); ((CamCube3)camera).SetIntegrationTime(400); Console.WriteLine("Disconnect CamCube."); camera.Disconnect(); } catch (System.Exception ex) { Console.WriteLine(ex.Message); } Console.ReadKey(); } #endregion } }
1.7.2