|
@@ -25,11 +25,14 @@ namespace bbiwarg.DataSource
|
|
|
private IDataHandle<Iisu.Data.Vector3>[] palmNormals3D = new IDataHandle<Iisu.Data.Vector3>[2];
|
|
|
private IDataHandle<int[]>[] fingerStatus = new IDataHandle<int[]>[2];
|
|
|
private IDataHandle<Iisu.Data.Vector3[]>[] fingerTipPositions3D = new IDataHandle<Iisu.Data.Vector3[]>[2];
|
|
|
+ private IDataHandle<Iisu.Data.Vector2[]>[] fingerTipPositions2D = new IDataHandle<Iisu.Data.Vector2[]>[2];
|
|
|
private IDataHandle<int>[] handSides = new IDataHandle<int>[2];
|
|
|
private IDataHandle<Iisu.Data.IImageData> depthImage;
|
|
|
private IDataHandle<Iisu.Data.IImageData> colorImage;
|
|
|
private IDataHandle<Iisu.Data.IImageData> confidenceImage;
|
|
|
private IDataHandle<Iisu.Data.IImageData> uvImage;
|
|
|
+ private IParameterHandle<float> hfov;
|
|
|
+ private IParameterHandle<float> vfov;
|
|
|
|
|
|
/*
|
|
|
* Creates an Iisu data source.
|
|
@@ -58,8 +61,10 @@ namespace bbiwarg.DataSource
|
|
|
device.RegisterParameterHandle<int>("SOURCE.MOVIE.PlayMode").Value = 0; // playMode = once
|
|
|
else
|
|
|
device.RegisterParameterHandle<int>("SOURCE.DEPTHSENSE.AmplitudeThreshold").Value = 100; // confidence-threshhold
|
|
|
-
|
|
|
+
|
|
|
frameRate = device.RegisterParameterHandle<float>("SOURCE.FrameRate");
|
|
|
+ hfov = device.RegisterParameterHandle<float>("SOURCE.CAMERA.DEPTH.HFOV");
|
|
|
+ vfov = device.RegisterParameterHandle<float>("SOURCE.CAMERA.DEPTH.VFOV");
|
|
|
|
|
|
// events
|
|
|
device.EventManager.RegisterEventListener("DEVICE.Status", new Iisu.EventDelegates.Device.Status(onDeviceStatusChanged));
|
|
@@ -93,6 +98,9 @@ namespace bbiwarg.DataSource
|
|
|
|
|
|
fingerTipPositions3D[0] = device.RegisterDataHandle<Iisu.Data.Vector3[]>("CI.HAND1.FingerTipPositions3D");
|
|
|
fingerTipPositions3D[1] = device.RegisterDataHandle<Iisu.Data.Vector3[]>("CI.HAND2.FingerTipPositions3D");
|
|
|
+
|
|
|
+ fingerTipPositions2D[0] = device.RegisterDataHandle<Iisu.Data.Vector2[]>("CI.HAND1.FingerTipPositions2D");
|
|
|
+ fingerTipPositions2D[1] = device.RegisterDataHandle<Iisu.Data.Vector2[]>("CI.HAND2.FingerTipPositions2D");
|
|
|
|
|
|
handSides[0] = device.RegisterDataHandle<int>("CI.HAND1.Side");
|
|
|
handSides[1] = device.RegisterDataHandle<int>("CI.HAND1.Side");
|
|
@@ -133,6 +141,14 @@ namespace bbiwarg.DataSource
|
|
|
return (int) frameRate.Value;
|
|
|
}
|
|
|
|
|
|
+ public float getHFOV() {
|
|
|
+ return hfov.Value;
|
|
|
+ }
|
|
|
+
|
|
|
+ public float getVFOV() {
|
|
|
+ return vfov.Value;
|
|
|
+ }
|
|
|
+
|
|
|
public DepthImage getDepthImage()
|
|
|
{
|
|
|
Iisu.Data.IImageInfos imageInfos = depthImage.Value.ImageInfos;
|
|
@@ -273,6 +289,16 @@ namespace bbiwarg.DataSource
|
|
|
return results;
|
|
|
}
|
|
|
|
|
|
+ public Vector[] getFingerTipPositions2D(uint handIndex)
|
|
|
+ {
|
|
|
+ checkHandIndex(handIndex);
|
|
|
+ Iisu.Data.Vector2[] positions = fingerTipPositions2D[handIndex - 1].Value;
|
|
|
+ Vector[] results = new DenseVector[positions.Length];
|
|
|
+ for (int i = 0; i < positions.Length; ++i)
|
|
|
+ results[i] = new DenseVector(positions[i].ToArray());
|
|
|
+ return results;
|
|
|
+ }
|
|
|
+
|
|
|
public HandSide getHandSide(uint handIndex)
|
|
|
{
|
|
|
checkHandIndex(handIndex);
|