跪求!!!我的Kinect角度太高,检测不到腿,怎么调?

跪求!!!我的Kinect角度太高,检测不到腿,怎么调?,第1张

第一,很明显你所站的位置距离KINECT距离太近。目测少于2.5米。

第二,KINECT摆放位置略高。

综上两点建议你:

1,你可以买一个ZOOM倍率放大器,150左右。可有效解决距离不够问题。

2,可以将KINECT直接置于桌面,降低高度从而解决角度问题。

以上为我个人经验及建议,供你参考。

[csharp] view plain copy

using System

using System.Collections.Generic

using System.Linq

using System.Text

using System.Windows

using System.Windows.Controls

using System.Windows.Data

using System.Windows.Documents

using System.Windows.Input

using System.Windows.Media

using System.Windows.Media.Imaging

using System.Windows.Navigation

using System.Windows.Shapes

using Microsoft.Kinect

namespace WpfApplication2

{

/// <summary>

/// MainWindow.xaml 的交互逻辑

/// </summary>

public partial class MainWindow : Window

{

public MainWindow()//vs2010自动生成的。

{

InitializeComponent()

}

private KinectSensor _kinect//一个全局变量,自然是用来调用Kinect用的,

private void startKinect()

{

if (KinectSensor.KinectSensors.Count >0)//如果有一个Kinect是可以使用的。

{

_kinect = KinectSensor.KinectSensors[0]//打开第一个Kinect

MessageBox.Show("kinect 目前的状态为:" + _kinect.Status)//这里调用一个messagebox来显示现在的状态。

_kinect.ColorStream.Enable(ColorImageFormat.RgbResolution640x480Fps30)

_kinect.DepthStream.Enable(DepthImageFormat.Resolution640x480Fps30)

_kinect.SkeletonStream.Enable()//使能skeleton

_kinect.AllFramesReady +=

new EventHandler<AllFramesReadyEventArgs>(_kinect_AllFramesReady) //大概意思就是添加一个事件处理程序吧,类似于单片机中的//中断。

_kinect.Start()//设置完成之后启动Kinect

}//if

else

{

MessageBox.Show("没有任何Kinect设备")

}

}//start kinect

void _kinect_AllFramesReady(object sender, AllFramesReadyEventArgs e)//打开并显示彩色图像的具体程序。

{

using (ColorImageFrame colorFrame = e.OpenColorImageFrame())

{

if (colorFrame == null)

{

return

}//if null

byte[] pixels = new byte[colorFrame.PixelDataLength]

colorFrame.CopyPixelDataTo(pixels)

int stride = colorFrame.Width * 4

imageCamera.Source =//这个imageCamera变量时在mainFrame中定义的一个Image控件。

BitmapSource.Create(colorFrame.Width, colorFrame.Height,

96, 96, PixelFormats.Bgr32, null, pixels, stride)

}

//throw new NotImplementedException()

}

private void Window_Loaded(object sender, RoutedEventArgs e)//当第一次窗体加载时,调用StartKinect。

{

startKinect()

}

}

}

[csharp] view plain copy

xbox360kinect每次开机都需要校对可以重新校准和重新设置Kinect来解决。

Xbox360是微软的第2代家用游戏主机。2016年4月21日,在问世近10年后,微软Xbox360游戏主机停产。微软Xbox业务主管菲尔·斯宾塞(PhilSpencer)周三在博文中宣布,将继续为现有Xbox360提供硬件和软件支持。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/tougao/7866036.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-10
下一篇 2023-04-10

发表评论

登录后才能评论

评论列表(0条)

保存