本文整理汇总了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();
}
}
示例2: StopKinect
/// <summary>
/// Kinectの動作を停止する
/// </summary>
/// <param name="kinect"></param>
private static void StopKinect( KinectSensor kinect )
{
if ( kinect.IsRunning ) {
kinect.Stop();
kinect.Dispose();
}
}
示例3: StopKinect
void StopKinect(KinectSensor sensor)
{
if (sensor != null)
{
sensor.Stop();
sensor.AudioSource.Stop();
}
}
示例4: UninitializeKinectSensor
private void UninitializeKinectSensor(KinectSensor kinect)
{
if (kinect != null)
{
kinect.Stop();
//kinect.DepthFrameReady -= new EventHandler<DepthImageFrameReadyEventArgs>(kinectSensor_DepthFrameReady);
}
}
示例5: StopKinect
private void StopKinect(KinectSensor sensor)
{
if (sensor == null || !sensor.IsRunning)
return;
sensor.Stop();
if (sensor.AudioSource != null)
sensor.AudioSource.Stop();
}
示例6: StopKinect
public void StopKinect(KinectSensor sensor)
{
if (sensor != null)
{
if (sensor.IsRunning)
{
sensor.Stop();
Expansor.IsExpanded = true;
}
}
}
示例7: StopKinect
private void StopKinect(KinectSensor sensorToStop)
{
if (sensorToStop != null)
{
if (sensorToStop.IsRunning)
{
sensorToStop.Stop();
if (sensorToStop.AudioSource != null)
{
sensorToStop.AudioSource.Stop();
}
}
}
}
示例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();
}
}
}
}
示例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";
}
}
示例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;
}
}
}
示例11: UninitializeKinectSensor
private void UninitializeKinectSensor(KinectSensor sensor)
{
if (sensor != null)
{
sensor.Stop();
sensor.DepthFrameReady -= Kinect_DepthFrameReady;
}
}
示例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();
}
}
示例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);
}
}
}
}
示例14: StopKinect
private void StopKinect(KinectSensor sensor)
{
if (sensor != null)
{
if (sensor.IsRunning)
{
//stop sensor
sensor.Stop();
}
}
}
示例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();
}
}