實作SDK版本為 Beta1
使用WPF設計
控制項 button & slider
button 用法:直接拉一個textBox並在上面給值並將值傳給Kinect (Kinect 仰角角度 -27~+27)
private void button1_Click(object sender, RoutedEventArgs e)
{
kinect.NuiCamera.ElevationAngle = Int32.Parse(textBox1.Text);
}
slider用法:須將slider值設定成整數,預設為 Double 型別 參考這篇
private void slider1_PreviewMouseUp(object sender, MouseButtonEventArgs e)
{
kinect.NuiCamera.ElevationAngle = (int)slider1.Value;
textBlock1.Text = slider1.Value.ToString();
}
範例下載:KinectControl
全站熱搜
留言列表