我尝试运行面部识别kinect。 我想将代码sdk sdk 1.5转换为1.8。我该如何替换它:
if (kinect != null)
{
//Initialize to return Color images
kinect.Initialize(RuntimeOptions.UseColor);//<---this
//Initialize Image Flux
kinect.VideoFrameReady += new EventHandler<ImageFrameReadyEventArgs>(nui_VideoFrameReady);//<---this
kinect.VideoStream.Open(ImageStreamType.Video, 2, ImageResolution.Resolution640x480, ImageType.Color);//<---this
}
}
void nui_VideoFrameReady(object sender, ImageFrameReadyEventArgs e)//<---this
{
感谢!!!
答案 0 :(得分:0)
void Start()
{
KinectSensor kinect = KinectSensor.KinectSensors.FirstOrDefault();
if (kinect != null)
{
kinect.ColorStream.Enable(ColorImageFormat.RgbResolution640x480Fps30);
kinect.ColorFrameReady += OnColorFrameReady;
kinect.Start();
}
}
void OnColorFrameReady(object sender, ColorImageFrameReadyEventArgs args)
{
}