2014年4月28日 星期一

第十一週上課內容


下載kinect相關檔案
Latest Kinect for Windows SDK
Latest Kinect for Windows Developer Toolkit
下載 faast

1. Kinect 可以使用 (SDK安裝,插入硬體)
2. FAAST 下載/使用
(如果出現msvcp110.dll問就下載Visual Studio 2012 Redittributable檔
2.1試著寫 FAAST 手勢辨識)

試著用kinect讀取自己上半身的骨架資料


試著寫程式

int stage=0,hourseID=0;
void setup()
{
 size(600,400);
 textSize(40);  
}

void draw()
{
 if(stage==0)
 {
  background(0);
  text("wait for your Input /UP",100,100);
 } 
 else if(stage==1)
 {
   background(255,0,0);
   text("Select your hourse",100,100);
   text("How hourse"+hourseID,200,200);
 }
 else if(stage==2) background(0,255,0);
 else if(stage==3) background(0,0,255);
  else background(255,255,0);
}
void keyPressed()
{
 if(keyCode==UP)
 {
   println("UP");
   if(stage==0) stage=1;
   else if(stage==1) stage=2;
   else if(stage==2) stage=3;
   else if(stage==3) stage=4;
 } 
 if(keyCode==RIGHT) hourseID=(hourseID=1)%4;
 if(keyCode==RIGHT) hourseID=(hourseID=1)%4;
  
}



沒有留言:

張貼留言