Kinect Face Recognition sdk 1.5到sdk 1.8

时间:2014-03-12 09:36:16

标签: sdk kinect face-recognition

我尝试运行面部识别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
    {

感谢!!!

1 个答案:

答案 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)
{
}