select "Windows Form Application"
2. Add Reference Setting
add "OpenNI.Net.dll" and "XnVNITE.net_1_3_1" to tab "Referece" .
3. Write, Build & Debug
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using OpenNI;★
using NITE;★
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
try
{
const string CONFIG_XML_PATH = "C:\\kinect\\SamplesConfig.xml";
Context xn_cxt = new Context(CONFIG_XML_PATH);
SessionManager ssnMng = new SessionManager(xn_cxt, "Wave,Click", "RaiseHand");
MessageBox.Show("Success");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}
reference:
0 件のコメント:
コメントを投稿