Example #1
0
        private void Provider_CaptureArrived(object sender, Microsoft.Azure.Kinect.Sensor.Capture e)
        {
            try
            {
                if (e.Color != null)
                {
                    if (this.firstFrameTime == null)
                    {
                        this.firstFrameTime = e.Color.DeviceTimestamp;
                    }

                    if (this.FixExposure > TimeSpan.Zero && !this.exposureFixed && (e.Color.DeviceTimestamp - this.firstFrameTime.Value) > this.FixExposure)
                    {
                        var exposureValue = e.Color.Exposure;
                        this.provider.SetExposure(exposureValue);
                        this.exposureFixed = true;
                    }
                }

                lock (this.recordingLock)
                {
                    this.recording?.WriteCapture(e);
                }
            }
            catch (Exception ex)
            {
                this.logger.LogWarning(ex, $"Error handling capture arrived in recording for {this.ProviderKey}");
            }
        }
Example #2
0
 private void ProviderHoldCameraStartedHandler(object sender, Microsoft.Azure.Kinect.Sensor.Capture e)
 {
     // This handler holds the cameras started
 }