当前位置: 首页>>代码示例>>C#>>正文


C# KinectSensor.Stop方法代码示例

本文整理汇总了C#中Microsoft.Kinect.KinectSensor.Stop方法的典型用法代码示例。如果您正苦于以下问题:C# KinectSensor.Stop方法的具体用法?C# KinectSensor.Stop怎么用?C# KinectSensor.Stop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.Kinect.KinectSensor的用法示例。


在下文中一共展示了KinectSensor.Stop方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: StopKinect

 private void StopKinect(KinectSensor sensorToStop)
 {
     if (sensorToStop != null)
     {
         sensorToStop.Stop();
     }
 }
开发者ID:tkowalczyk,项目名称:KinectSimpleAppChooser,代码行数:7,代码来源:MainWindow.xaml.cs

示例2: StopKinect

 /// <summary>
 /// Kinectの動作を停止する
 /// </summary>
 /// <param name="kinect"></param>
 private static void StopKinect( KinectSensor kinect )
 {
     if ( kinect.IsRunning ) {
         kinect.Stop();
         kinect.Dispose();
     }
 }
开发者ID:hatsunea,项目名称:KinectSDKBook4CS,代码行数:11,代码来源:MainWindow.xaml.cs

示例3: StopKinect

 void StopKinect(KinectSensor sensor)
 {
     if (sensor != null)
     {
         sensor.Stop();
         sensor.AudioSource.Stop();
     }
 }
开发者ID:LucianLungu,项目名称:KinectSetupDev,代码行数:8,代码来源:MainWindow.xaml.cs

示例4: UninitializeKinectSensor

 private void UninitializeKinectSensor(KinectSensor kinect)
 {
     if (kinect != null)
     {
         kinect.Stop();
         //kinect.DepthFrameReady -= new EventHandler<DepthImageFrameReadyEventArgs>(kinectSensor_DepthFrameReady);
     }
 }
开发者ID:BillHuangg,项目名称:Kinect-Depth-Processing,代码行数:8,代码来源:KinectManager.cs

示例5: StopKinect

        private void StopKinect(KinectSensor sensor)
        {
            if (sensor == null || !sensor.IsRunning)
                return;
            sensor.Stop();

            if (sensor.AudioSource != null)
                sensor.AudioSource.Stop();
        }
开发者ID:latish,项目名称:Kinect_Demo,代码行数:9,代码来源:MainWindow.xaml.cs

示例6: StopKinect

 public void StopKinect(KinectSensor sensor)
 {
     if (sensor != null)
     {
         if (sensor.IsRunning)
         {
             sensor.Stop();
             Expansor.IsExpanded = true;
         }
     }
 }
开发者ID:delebrindel,项目名称:Kino,代码行数:11,代码来源:MTouch.xaml.cs

示例7: StopKinect

        private void StopKinect(KinectSensor sensorToStop)
        {
            if (sensorToStop != null)
            {
                if (sensorToStop.IsRunning)
                {
                    sensorToStop.Stop();

                    if (sensorToStop.AudioSource != null)
                    {
                        sensorToStop.AudioSource.Stop();
                    }

                }
            }
        }
开发者ID:tkowalczyk,项目名称:KinectTiltCameraColorViewer,代码行数:16,代码来源:MainWindow.xaml.cs

示例8: StopKinect

        //void newSensor_AllFramesReady(object sender, AllFramesReadyEventArgs e)
        //{
        //    
        //}

        private void StopKinect(KinectSensor sensor)
        {
            if (sensor != null)
            {
                if (sensor.IsRunning)
                {
                    //stop sensor 
                    sensor.Stop();

                    //stop audio if not null
                    if (sensor.AudioSource != null)
                    {
                        sensor.AudioSource.Stop();
                    }
                }
            }
        }
开发者ID:nathad02,项目名称:CITS3200--Group-H,代码行数:22,代码来源:MainWindow.xaml.cs

示例9: KinectManager

        public KinectManager()
        {
            kinectConverter = new KinectConverter();
            AssimpConverter = kinectConverter;
            deviceStatusArgs = new KineapStatusChangedArgs();
            KinectSensor.KinectSensors.StatusChanged += new EventHandler<StatusChangedEventArgs>(Sensor_StatusChanged);
            sensor = KinectSensor.KinectSensors.FirstOrDefault();

            if (sensor != null) // If a Kinect is detected on startup, assigns its current status
            {
                deviceStatusArgs.CurrentStatus = GetStatus(sensor.Status);
                deviceStatusArgs.OriginalDeviceStatus = sensor.Status.ToString();
                Device_StatusChanged(deviceStatusArgs);
                if (sensor.IsRunning) // This verification is important because if the software crashes unexpectedly, the sensor might still be on when relauching the software
                    sensor.Stop();
            }
            else // If not, assigns default status 'Disconnected'
            {
                deviceStatusArgs.CurrentStatus = GetStatus(KinectStatus.Disconnected);
                deviceStatusArgs.OriginalDeviceStatus = "No Kinect was found on startup";
            }
        }
开发者ID:loic-lavergne,项目名称:mckineap,代码行数:22,代码来源:KinectManager.cs

示例10: StopKinect

        /// <summary>
        /// Kinectの動作を停止する
        /// </summary>
        /// <param name="kinect"></param>
        private void StopKinect( KinectSensor kinect )
        {
            if ( kinect != null ) {
            if ( kinect.IsRunning ) {
              // 音声のスレッドを停止する
              isContinue = false;

              // フレーム更新イベントを削除する
              kinect.ColorFrameReady -= kinect_ColorFrameReady;
              kinect.DepthFrameReady -= kinect_DepthFrameReady;
              kinect.SkeletonFrameReady -= kinect_SkeletonFrameReady;

              // Kinectの停止と、ネイティブリソースを解放する
              kinect.Stop();
              kinect.Dispose();

              imageRgb.Source = null;
              imageDepth.Source = null;
            }
              }
        }
开发者ID:hatsunea,项目名称:KinectSDKBook4CS,代码行数:25,代码来源:MainWindow.xaml.cs

示例11: UninitializeKinectSensor

 private void UninitializeKinectSensor(KinectSensor sensor)
 {
     if (sensor != null)
     {
         sensor.Stop();
         sensor.DepthFrameReady -= Kinect_DepthFrameReady;
     }
 }
开发者ID:Kazhunter,项目名称:Kinect,代码行数:8,代码来源:MainWindow.xaml.cs

示例12: UninitializeKinectServices

        private static void UninitializeKinectServices(KinectSensor sensor)
        {
            if (null == sensor)
            {
                return;
            }

            // Stop streaming
            sensor.Stop();

            if (null != sensor.AudioSource)
            {
                sensor.AudioSource.Stop();
            }

            if (null != sensor.SkeletonStream)
            {
                sensor.SkeletonStream.Disable();
            }

            if (null != sensor.DepthStream)
            {
                sensor.DepthStream.Disable();
            }

            if (null != sensor.ColorStream)
            {
                sensor.ColorStream.Disable();
            }
        }
开发者ID:ojurado,项目名称:tecsup-pakuso,代码行数:30,代码来源:KinectSensorManager.cs

示例13: StopKinect

        /// <summary>
        /// stop the Kinect sensor
        /// </summary>
        /// <param name="sensor">the Kinect to stop</param>
        public void StopKinect(KinectSensor sensor)
        {
            if (sensor != null)
            {
                if (sensor.IsRunning)
                {
                    //stop sensor
                    sensor.Stop();
                    LogHelper.logInput("Sensor stopped", LogHelper.logType.INFO, this);

                    //stopAudio if not null
                    if (sensor.AudioSource != null)
                    {
                        sensor.AudioSource.Stop();
                        LogHelper.logInput("Microphone stopped", LogHelper.logType.INFO, this);
                    }
                }
            }
        }
开发者ID:HaKDMoDz,项目名称:kinectQlikView,代码行数:23,代码来源:KinectHelper.cs

示例14: StopKinect

 private void StopKinect(KinectSensor sensor)
 {
     if (sensor != null)
     {
         if (sensor.IsRunning)
         {
             //stop sensor
             sensor.Stop();
         }
     }
 }
开发者ID:nerndt,项目名称:iRobotKinect,代码行数:11,代码来源:Form1.cs

示例15: UninitializeKinectServices

        /// <summary>
        /// Uninitialize kinect device. This method is based on kinect SDK reference code.
        /// </summary>
        /// <param name="sensor">Devide to be uninitialized</param>
        private void UninitializeKinectServices(KinectSensor sensor)
        {
            // Stop streaming
            sensor.Stop();

            // Disable skeletonengine, as only one Kinect can have it enabled at a time.
            if (sensor.SkeletonStream != null)
            {
                sensor.SkeletonStream.Disable();
            }
        }
开发者ID:PuniCZ,项目名称:KinectGestureRecognition,代码行数:15,代码来源:KinectGestureAPI.cs


注:本文中的Microsoft.Kinect.KinectSensor.Stop方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。