2014-03-12 69 views
0

我嘗試運行面部識別kinect。 我想將代碼sdk sdk 1.5轉換爲1.8。我該如何取代:Kinect Face Recognition sdk 1.5 to sdk 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

您使用哪種語言?我假設C#,但你說v1.5這將使我認爲這些命名約定C++。 –

回答

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