コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="KinectFaceDetector"/> class.
 /// </summary>
 /// <param name="pipeline">Pipeline this sensor is a part of</param>
 /// <param name="kinectSensor">Psi Kinect device from which we get our associated bodies</param>
 /// <param name="configuration">Configuration to use</param>
 public KinectFaceDetector(Pipeline pipeline, Kinect.KinectSensor kinectSensor, KinectFaceDetectorConfiguration configuration = null)
 {
     this.pipeline      = pipeline;
     this.configuration = configuration ?? new KinectFaceDetectorConfiguration();
     this.kinectSensor  = kinectSensor;
     this.Faces         = pipeline.CreateEmitter <List <KinectFace> >(this, nameof(this.Faces));
     this.bodyReceiver  = new KinectBodyReceiver(pipeline, this);
     kinectSensor.Bodies.PipeTo(this.bodyReceiver);
 }
コード例 #2
0
ファイル: KinectFaceDetector.cs プロジェクト: maria-chang/psi
 /// <summary>
 /// Initializes a new instance of the <see cref="KinectFaceDetector"/> class.
 /// </summary>
 /// <param name="pipeline">Pipeline this sensor is a part of</param>
 /// <param name="kinectSensor">Psi Kinect device from which we get our associated bodies</param>
 /// <param name="configuration">Configuration to use</param>
 public KinectFaceDetector(Pipeline pipeline, Kinect.KinectSensor kinectSensor, KinectFaceDetectorConfiguration configuration)
 {
     pipeline.RegisterPipelineStartHandler(this, this.OnPipelineStart);
     this.pipeline      = pipeline;
     this.configuration = configuration;
     this.kinectSensor  = kinectSensor;
     this.Faces         = pipeline.CreateEmitter <List <KinectFace> >(this, nameof(this.Faces));
     this.bodyReceiver  = new KinectBodyReceiver(pipeline, this);
     kinectSensor.Bodies.PipeTo(this.bodyReceiver);
 }