コード例 #1
0
        public Tracker(ref Sensor.Calibration calibration)
        {
            if (Interlocked.Increment(ref instancesCounter) != 1)
            {
                Interlocked.Decrement(ref instancesCounter);
                throw new NotSupportedException("Oops! Current version of Body Tracking SDK does not support creation of multiple body tracker. Sorry!");
            }

            if (NativeApi.TrackerCreate(ref calibration, out var handle) != NativeCallResults.Result.Succeeded || handle == null || handle.IsInvalid)
                throw new BodyTrackingException("Cannot initialize body tracking infrastructure");

            this.handle = handle;
            this.handle.Disposed += Handle_Disposed;
        }
コード例 #2
0
 public static extern NativeCallResults.Result TrackerCreate(
     [In] ref Sensor.Calibration sensorCalibration,
     TrackerConfiguration config,
     out NativeHandles.TrackerHandle?trackerHandle);
コード例 #3
0
 public static extern NativeCallResults.Result PlaybackGetCalibration(
     NativeHandles.PlaybackHandle playbackHandle,
     out Sensor.Calibration calibration);
コード例 #4
0
ファイル: Playback.cs プロジェクト: teachteamnfp/k4a.net
 /// <summary>Get the camera calibration for Azure Kinect device used during recording.</summary>
 /// <param name="calibration">Output: calibration data.</param>
 /// <remarks>The calibration may not exist if the device was not specified during recording.</remarks>
 /// <exception cref="ObjectDisposedException">This method cannot be called for disposed object.</exception>
 /// <exception cref="PlaybackException">Cannot read calibration data from recording. See logs for details.</exception>
 public void GetCalibration(out Sensor.Calibration calibration)
 => CheckResult(NativeApi.PlaybackGetCalibration(handle.ValueNotDisposed, out calibration));