internal static extern UInt32 addJointOrientationRecognizer(FubiUtils.SkeletonJoint joint, float minX , float minY , float minZ, float maxX, float maxY, float maxZ, bool useLocalOrientations, int atIndex, IntPtr name, float minConfidence);
internal static extern UInt32 addFingerCountRecognizer(FubiUtils.SkeletonJoint handJoint, UInt32 minFingers, UInt32 maxFingers, Int32 atIndex, IntPtr name, float minConfidence, [MarshalAs(UnmanagedType.U1)] bool useMedianCalculation, [MarshalAs(UnmanagedType.U1)] bool useFilteredData = false);
public static UInt32 addLinearMovementRecognizer(FubiUtils.SkeletonJoint joint, float dirX, float dirY, float dirZ, float minVel = 0, float maxVel = FubiUtils.Math.MaxFloat, bool useLocalPositions = false, int atIndex = -1, string name = null, float maxAngleDifference = 45.0f, bool useOnlyCorrectDirectionComponent = true) { IntPtr namePtr = Marshal.StringToHGlobalAnsi(name); UInt32 ret = FubiInternal.addLinearMovementRecognizer(joint, dirX, dirY, dirZ, minVel, maxVel, useLocalPositions, atIndex, namePtr, maxAngleDifference, useOnlyCorrectDirectionComponent); Marshal.FreeHGlobal(namePtr); return ret; }
public static UInt32 addFingerCountRecognizer(FubiUtils.SkeletonJoint handJoint, UInt32 minFingers, UInt32 maxFingers, Int32 atIndex = -1, string name = null, float minConfidence = -1.0f, bool useMedianCalculation = false) { IntPtr namePtr = Marshal.StringToHGlobalAnsi(name); UInt32 ret = FubiInternal.addFingerCountRecognizer(handJoint, minFingers, maxFingers, atIndex, namePtr, minConfidence, useMedianCalculation); Marshal.FreeHGlobal(namePtr); return ret; }
public static UInt32 addJointOrientationRecognizer(FubiUtils.SkeletonJoint joint, float minX = -180.0f, float minY = -180.0f, float minZ = -180.0f, float maxX = 180.0f, float maxY = 180.0f, float maxZ = 180.0f, bool useLocalOrientations = true, int atIndex = -1, string name = null, float minConfidence = -1) { IntPtr namePtr = Marshal.StringToHGlobalAnsi(name); UInt32 ret = FubiInternal.addJointOrientationRecognizer(joint, minX, minY, minZ, maxX, maxY, maxZ, useLocalOrientations, atIndex, namePtr, minConfidence); Marshal.FreeHGlobal(namePtr); return ret; }
public static UInt32 addJointRelationRecognizer(FubiUtils.SkeletonJoint joint, FubiUtils.SkeletonJoint relJoint, float minX = -FubiUtils.Math.MaxFloat, float minY = -FubiUtils.Math.MaxFloat, float minZ = -FubiUtils.Math.MaxFloat, float maxX = FubiUtils.Math.MaxFloat, float maxY = FubiUtils.Math.MaxFloat, float maxZ = FubiUtils.Math.MaxFloat, float minDistance = 0, float maxDistance = FubiUtils.Math.MaxFloat, bool useLocalPositions = false, Int32 atIndex = -1, string name = null, float minConfidene = -1.0f, FubiUtils.BodyMeasurement measuringUnit = FubiUtils.BodyMeasurement.NUM_MEASUREMENTS) { IntPtr namePtr = Marshal.StringToHGlobalAnsi(name); UInt32 ret = FubiInternal.addJointRelationRecognizer(joint, relJoint, minX, minY, minZ, maxX, maxY, maxZ, minDistance, maxDistance, useLocalPositions, atIndex, namePtr, minConfidene, measuringUnit); Marshal.FreeHGlobal(namePtr); return ret; }
public static uint addAngularMovementRecognizer(FubiUtils.SkeletonJoint joint, float minVelX = -FubiUtils.Math.MaxFloat, float minVelY = -FubiUtils.Math.MaxFloat, float minVelZ = -FubiUtils.Math.MaxFloat, float maxVelX = FubiUtils.Math.MaxFloat, float maxVelY = FubiUtils.Math.MaxFloat, float maxVelZ = FubiUtils.Math.MaxFloat, bool useLocalOrients = true, int atIndex = -1, string name = null, float minConfidence = -1.0f, bool useFilteredData = false) { IntPtr namePtr = Marshal.StringToHGlobalAnsi(name); UInt32 ret = FubiInternal.addAngularMovementRecognizer(joint, minVelX, minVelY, minVelZ, maxVelX, maxVelY, maxVelZ, useLocalOrients, atIndex, namePtr, minConfidence, useFilteredData); Marshal.FreeHGlobal(namePtr); return ret; }
internal static extern uint addAngularMovementRecognizer(FubiUtils.SkeletonJoint joint, float minVelX, float minVelY, float minVel, float maxVelX, float maxVelY, float maxVelZ, bool useLocalOrients, int atIndex, IntPtr name, float minConfidence, [MarshalAs(UnmanagedType.U1)] bool useFilteredData);
internal static extern UInt32 addLinearMovementRecognizer(FubiUtils.SkeletonJoint joint, float dirX, float dirY, float dirZ, float minVel, float maxVel, float minLength, float maxLength, FubiUtils.BodyMeasurement measuringUnit, [MarshalAs(UnmanagedType.U1)] bool useLocalPositions, int atIndex, IntPtr name, float maxAngleDifference, [MarshalAs(UnmanagedType.U1)] bool useOnlyCorrectDirectionComponent, [MarshalAs(UnmanagedType.U1)] bool useFilteredData = false);
internal static extern uint addLinearAccelerationRecognizer( FubiUtils.SkeletonJoint joint, float dirX, float dirY, float dirZ, float minAccel, float maxAccel, int atIndex, IntPtr name, float maxAngleDifference, [MarshalAs(UnmanagedType.U1)] bool useOnlyCorrectDirectionComponent);
internal static extern UInt32 addJointRelationRecognizer(FubiUtils.SkeletonJoint joint, FubiUtils.SkeletonJoint relJoint, float minX, float minY, float minZ, float maxX, float maxY, float maxZ, float minDistance, float maxDistance, [MarshalAs(UnmanagedType.U1)] bool useLocalPositions, Int32 atIndex, IntPtr name, float minConfidence, FubiUtils.BodyMeasurement measuringUnit, [MarshalAs(UnmanagedType.U1)] bool useFilteredData = false);
internal static extern void getSkeletonJointPosition(IntPtr trackingData, FubiUtils.SkeletonJoint joint, out float x, out float y, out float z, out float confidence, out double timeStamp, [MarshalAs(UnmanagedType.U1)] bool useLocalPositions = false);
internal static extern bool init(IntPtr openniXmlconfig, FubiUtils.SkeletonProfile profile, float filterMinCutOffFrequency = 1.0f, float filterVelocityCutOffFrequency = 1.0f, float filterCutOffSlope = 0.007f, [MarshalAs(UnmanagedType.U1)]bool mirrorStreams = true, [MarshalAs(UnmanagedType.U1)]bool registerStreams = true);
public static FubiUtils.RecognitionResult recognizeGestureOn(UInt32 recognizerIndex, UInt32 userID, out FubiUtils.RecognitionCorrectionHint correctionHint) { FubiUtils.RecognitionCorrectionHint hint = new FubiUtils.RecognitionCorrectionHint(); FubiUtils.RecognitionResult res = FubiInternal.recognizeGestureOn(recognizerIndex, userID, hint); correctionHint = hint; return res; }
public static bool initFingerSensor(FubiUtils.FingerSensorType type, float offsetPosX = 0, float offsetPosY = -600.0f, float offsetPosZ = 200.0f) { return FubiInternal.initFingerSensor(type, offsetPosX, offsetPosY, offsetPosZ); }
public static bool init(FubiUtils.SensorOptions sensorOptions, FubiUtils.FilterOptions filterOptions) { bool ret = true; if (!isInitialized()) { ret = FubiInternal.init(sensorOptions.m_depthOptions.m_width, sensorOptions.m_depthOptions.m_height, sensorOptions.m_depthOptions.m_fps, sensorOptions.m_rgbOptions.m_width, sensorOptions.m_rgbOptions.m_height, sensorOptions.m_rgbOptions.m_fps, sensorOptions.m_irOptions.m_width, sensorOptions.m_irOptions.m_height, sensorOptions.m_irOptions.m_fps, sensorOptions.m_type, sensorOptions.m_trackingProfile, filterOptions.m_filterMinCutOffFrequency, filterOptions.m_filterVelocityCutOffFrequency, filterOptions.m_filterCutOffSlope, sensorOptions.m_mirrorStreams, sensorOptions.m_registerStreams); } return ret; }
/** \addtogroup FUBICSHARP FUBI C# API * All the C# API functions (subset of the C++ functions + some additional ones) * Note: documentation not complete! For more details have a look at the C++ docu * * @{ */ public static bool init(string openniXmlconfig, FubiUtils.SkeletonProfile profile = FubiUtils.SkeletonProfile.ALL, float filterMinCutOffFrequency = 1.0f, float filterVelocityCutOffFrequency = 1.0f, float filterCutOffSlope = 0.007f, bool mirrorStreams = true, bool registerStreams = true) { bool ret = true; if (!isInitialized()) { IntPtr openNiXmlPtr = Marshal.StringToHGlobalAnsi(openniXmlconfig); ret = FubiInternal.init(openNiXmlPtr, profile, filterMinCutOffFrequency, filterVelocityCutOffFrequency, filterCutOffSlope, mirrorStreams, registerStreams); Marshal.FreeHGlobal(openNiXmlPtr); } return ret; }
public static void getImage(byte[] outputImage, FubiUtils.ImageType type, FubiUtils.ImageNumChannels numChannels, FubiUtils.ImageDepth depth, int renderOptions = (int)FubiUtils.RenderOptions.Default, int jointsToRender = (int)FubiUtils.JointsToRender.ALL_JOINTS, FubiUtils.DepthImageModification depthModifications = FubiUtils.DepthImageModification.UseHistogram, uint userId = 0, FubiUtils.SkeletonJoint jointOfInterest = FubiUtils.SkeletonJoint.NUM_JOINTS, bool moveCroppedToUpperLeft = false) { if (outputImage != null) { GCHandle h = GCHandle.Alloc(outputImage, GCHandleType.Pinned); FubiInternal.getImage(h.AddrOfPinnedObject(), type, numChannels, depth, renderOptions, jointsToRender, depthModifications, userId, jointOfInterest, moveCroppedToUpperLeft); h.Free(); return; } }
public static void getCurrentSkeletonJointPosition(UInt32 userID, FubiUtils.SkeletonJoint joint, out float x, out float y, out float z, out float confidence, out double timeStamp, bool useLocalPositions = false, bool useFilteredData = false) { IntPtr info = FubiInternal.getCurrentTrackingData(userID, useFilteredData); FubiInternal.getSkeletonJointPosition(info, joint, out x, out y, out z, out confidence, out timeStamp, useLocalPositions); }
internal static extern void getImage(IntPtr outputImage, FubiUtils.ImageType type, FubiUtils.ImageNumChannels numChannels, FubiUtils.ImageDepth depth, int renderOptions = (int)FubiUtils.RenderOptions.Default, int jointsToRender = (int)FubiUtils.JointsToRender.ALL_JOINTS, FubiUtils.DepthImageModification depthModifications = FubiUtils.DepthImageModification.UseHistogram, UInt32 userId = 0, FubiUtils.SkeletonJoint jointOfInterest = FubiUtils.SkeletonJoint.NUM_JOINTS, [MarshalAs(UnmanagedType.U1)]bool moveCroppedToUpperLeft = false);
internal static extern void getSkeletonJointOrientation(IntPtr trackingData, FubiUtils.SkeletonJoint joint, [MarshalAs(UnmanagedType.LPArray)] float[] mat, out float confidence, out double timeStamp, [MarshalAs(UnmanagedType.U1)] bool useLocalOrientations = true);
internal static extern bool initFingerSensor(FubiUtils.FingerSensorType type, float offsetPosX, float offsetPosY, float offsetPosZ);
public static FubiUtils.RecognitionResult recognizeGestureOn(string recognizerName, UInt32 userID, out FubiUtils.RecognitionCorrectionHint correctionHint) { IntPtr namePtr = Marshal.StringToHGlobalAnsi(recognizerName); FubiUtils.RecognitionCorrectionHint hint = new FubiUtils.RecognitionCorrectionHint(); FubiUtils.RecognitionResult ret = FubiInternal.recognizeGestureOn(namePtr, userID, hint); correctionHint = hint; Marshal.FreeHGlobal(namePtr); return ret; }
internal static extern bool saveImage(IntPtr fileName, int jpegQuality /*0-100*/, FubiUtils.ImageType type, FubiUtils.ImageNumChannels numChannels, FubiUtils.ImageDepth depth, int renderOptions = (int)FubiUtils.RenderOptions.Default, int jointsToRender = (int)FubiUtils.JointsToRender.ALL_JOINTS, FubiUtils.DepthImageModification depthModifications = FubiUtils.DepthImageModification.UseHistogram, UInt32 userId = 0, FubiUtils.SkeletonJoint jointOfInterest = FubiUtils.SkeletonJoint.NUM_JOINTS);
internal static extern bool init(int depthWidth, int depthHeight, int depthFPS = 30, int rgbWidth = 640, int rgbHeight = 480, int rgbFPS = 30, int irWidth = -1, int irHeight = -1, int irFPS = -1, FubiUtils.SensorType type = FubiUtils.SensorType.OPENNI2, FubiUtils.SkeletonProfile profile = FubiUtils.SkeletonProfile.ALL, float filterMinCutOffFrequency = 1.0f, float filterVelocityCutOffFrequency = 1.0f, float filterCutOffSlope = 0.007f, [MarshalAs(UnmanagedType.U1)]bool mirrorStream = true, [MarshalAs(UnmanagedType.U1)]bool registerStreams = true);
public static bool saveImage(string fileName, int jpegQuality /*0-100*/, FubiUtils.ImageType type, FubiUtils.ImageNumChannels numChannels, FubiUtils.ImageDepth depth, int renderOptions = (int)FubiUtils.RenderOptions.Default, int jointsToRender = (int)FubiUtils.JointsToRender.ALL_JOINTS, FubiUtils.DepthImageModification depthModifications = FubiUtils.DepthImageModification.UseHistogram, UInt32 userId = 0, FubiUtils.SkeletonJoint jointOfInterest = FubiUtils.SkeletonJoint.NUM_JOINTS) { IntPtr namePtr = Marshal.StringToHGlobalAnsi(fileName); bool ret = FubiInternal.saveImage(namePtr, jpegQuality, type, numChannels, depth, renderOptions, jointsToRender, depthModifications, userId, jointOfInterest); Marshal.FreeHGlobal(namePtr); return ret; }
internal static extern UInt32 addJointOrientationRecognizer(FubiUtils.SkeletonJoint joint, float minX , float minY , float minZ, float maxX, float maxY, float maxZ, bool useLocalOrientations, int atIndex, IntPtr name, float minConfidence, [MarshalAs(UnmanagedType.U1)] bool useFilteredData = false);
public static bool switchSensor(FubiUtils.SensorOptions options) { return FubiInternal.switchSensor(options.m_type, options.m_depthOptions.m_width, options.m_depthOptions.m_height, options.m_depthOptions.m_fps, options.m_rgbOptions.m_width, options.m_rgbOptions.m_height, options.m_rgbOptions.m_fps, options.m_irOptions.m_width, options.m_irOptions.m_height, options.m_irOptions.m_fps, options.m_trackingProfile, options.m_mirrorStreams, options.m_registerStreams); }
internal static extern bool switchSensor(FubiUtils.SensorType type, int depthWidth, int depthHeight, int depthFPS = 30, int rgbWidth = 640, int rgbHeight = 480, int rgbFPS = 30, int irWidth = -1, int irHeight = -1, int irFPS = -1, FubiUtils.SkeletonProfile profile = FubiUtils.SkeletonProfile.ALL, [MarshalAs(UnmanagedType.U1)]bool mirrorStream = true, [MarshalAs(UnmanagedType.U1)]bool registerStreams = true);
public static UInt32 addJointOrientationRecognizer(FubiUtils.SkeletonJoint joint, float orientX, float orientY, float orientZ, float maxAngleDiff = 45.0f, bool useLocalOrientations = true, int atIndex = -1, string name = null, float minConfidence = -1, bool useFilteredData = false) { IntPtr namePtr = Marshal.StringToHGlobalAnsi(name); UInt32 ret = FubiInternal.addJointOrientationRecognizer(joint, orientX, orientY, orientZ, maxAngleDiff, useLocalOrientations, atIndex, namePtr, minConfidence, useFilteredData); Marshal.FreeHGlobal(namePtr); return ret; }