|
@@ -26,6 +26,7 @@ namespace bbiwarg.DataSource
|
|
|
private IDataHandle<Iisu.Data.Vector3[]>[] fingerTipPositions3D = new IDataHandle<Iisu.Data.Vector3[]>[2];
|
|
|
private IDataHandle<int>[] handSides = new IDataHandle<int>[2];
|
|
|
private IDataHandle<Iisu.Data.IImageData> depthImage;
|
|
|
+ private IDataHandle<Iisu.Data.IImageData> colorImage;
|
|
|
|
|
|
/*
|
|
|
* Creates an Iisu data source.
|
|
@@ -58,6 +59,8 @@ namespace bbiwarg.DataSource
|
|
|
|
|
|
// data
|
|
|
depthImage = device.RegisterDataHandle<Iisu.Data.IImageData>("SOURCE.CAMERA.DEPTH.Image");
|
|
|
+
|
|
|
+ colorImage = device.RegisterDataHandle<Iisu.Data.IImageData>("SOURCE.CAMERA.COLOR.Image");
|
|
|
|
|
|
handOpen[0] = device.RegisterDataHandle<bool>("CI.HAND1.IsOpen");
|
|
|
handOpen[1] = device.RegisterDataHandle<bool>("CI.HAND2.IsOpen");
|
|
@@ -134,6 +137,18 @@ namespace bbiwarg.DataSource
|
|
|
return new DepthImage(width, height, depthData);
|
|
|
}
|
|
|
|
|
|
+ public ColorImage getColorImage()
|
|
|
+ {
|
|
|
+ Iisu.Data.IImageInfos imageInfos = depthImage.Value.ImageInfos;
|
|
|
+ int width = (int)imageInfos.Width;
|
|
|
+ int height = (int)imageInfos.Height;
|
|
|
+ int numBytes = (int)imageInfos.BytesRaw;
|
|
|
+
|
|
|
+ Console.WriteLine("width: " + width + " height: " + height + " numBytes: " + numBytes);
|
|
|
+
|
|
|
+ return new ColorImage();
|
|
|
+ }
|
|
|
+
|
|
|
private void checkHandIndex(uint handIndex)
|
|
|
{
|
|
|
if (handIndex < 1 || handIndex > 2)
|