2013年4月25日 星期四

Week10, HW10, 98160876_鄭雅軒

120.125.68.53

1.use Kinect SDK1.7
2.use OpenNI2.0
3.use processing + SimpleOpenNI 1.5
(1)OpenNI 1.5
(2)Nite1.5
(3)SensorKinect(會和1.2.衝突)
(4)裝SimpleOpenNI

Processing 1.5.1解壓執行 文件\Processing\Libraries
再重新執行File-Sketch-Libraries.SimpleOpenNI-Depth Infraved

今天教processing

2013年4月24日 星期三

99160663_溫媁婷, HW1, Week1

對於現今的社會來說,因為科技的過度發達導致人與人之間缺少了更加親密的互動.
所以我也想藉由這次學習的KINECT技術去參生一些小遊戲是能夠讓小孩與家長
有所互動的 .
http://www.youtube.com/watch?v=CMYWQ2uxKFM


Week04, HW04



1. 下載 Kinect for Windows SDK
http://www.microsoft.com/en-us/kinectforwindows/develop/developer-downloads.aspx
2. 下載 OpenNI 2 (2.1 beta x86版)
http://www.openni.org/openni-sdk/#.UT_gjzBgeCk
挖賽!!業界老師來授課耶 ( http://sdrv.ms/ZkgMXc )


跑範例囉!!





Week03, HW03

1.下載:simpleopenni , processing 1.5.1

        2.安裝順序:先將SimpleOpenNI解壓縮至processing/modes/java/libraries內,
                            再安裝OpenNI_NITE_Installer-win32-0.27

        3.打開processing,開啟Example內的SimpleOpenNI中任一範例

                                            在processing -1.5.1/modes/java/liraries建立
                                            MSAFluid資料夾



                                       呈現出不同效果



期中作品企劃書,Week09,HW09,99160150_林秉燁,99160494_陳孟琳

期中作品企劃書

組員:99160150 林秉燁、
            99160494 陳孟琳。


構想一:舉紅旗白旗!

遊戲說明:
一個口令,一個動作,左手拿白旗,右手拿紅旗。聽指令動作,錯誤者淘汰。

口令:
紅旗舉起來  白旗放下來  白旗升上去  紅旗不要舉
紅旗白旗不要降  白旗不要升  紅旗舉起來  紅旗白旗降下來
紅旗白旗升上去  紅旗降下來  白旗舉起來  白旗不要升
紅旗升上去  紅旗白旗放下來  白旗不要降  紅旗白旗升起來
紅旗不要升  白旗不要降  紅旗白旗降下來  白旗升起來
白旗不要舉  紅旗升上去  白旗舉起來  紅旗白旗不要升
紅旗白旗放下來  白旗放下來  紅旗不要降  紅旗不要升

延伸:
從一人遊戲延伸到多人遊戲。































========================================================================

構想二 :出氣筒!

遊戲說明:
出氣筒是一個對於心理方面具有療癒效果的,根據研究報告指出:心理長期壓抑會造成很嚴重的後果,如:人們往往在離婚、丟掉工作等重大事件後出現心理問題,實際上這個狀況應該是心理問題先出現了,由於沒有很好地調整,沒有很好地對待這個問題,沒有早期解決,到後來這個問題就會逐漸加重。所以他能適時抒發您的壓力,使生活步調慢慢調回來。而本遊戲未來開發方向希望能以相片上傳功更換您所想出氣的對象等。這是款有助於身心健康的遊戲!!




99160866 陳冠倫, week10, hw10

 





         
          今天主要是討論期中企劃  還有老師利用processing中的範例程式寫出簡單的打蟲蟲遊戲


120.125.68.53(老師主機)

TODO : 查核期中作品企劃

範例程式

HW10,Week10


安裝 OpenNI 1.5 、Nite1.5與 Processing1.5.1

執行範例DepthInfrared


99160061_洪蓁乾, HW10, Week10

第十週
一.
    1.使用Processing執行SimpleOpenNI、繳交期中作品企劃書,老師有範例
    2.(120.125.68.53)下載Processing及SimpleOpenNI範例、安裝驅動程式
    3.解壓縮並直接執行Processing後,會發現在電腦的我的文件資料夾裡多了一個"Processing"資料夾,點進去手       動新增"Libraries"資料夾,並將SimpleOpenNI.rar壓縮檔內的"SimpleOpenNI"拉進去。
    4.開啟範例"DepthInfrarcd"並執行試試看。
二.
    三種選擇:
    1.使用kinect SDK 1.7
    2.使用OpenNI 2.0
    3.使用Processing + SimpleOpenNI 1.5
      a.OpenNI 1.5
      b.Nite 1.5
      c.Sensor kinect
      d.裝simple OpenNI




99163116_鄭祥斌, HW05, Week05,


99163116_鄭祥斌, HW04, HW04,


99160273_程柔淇,99160912_王承安,Week09,HW09,Midterm




題目: 模型變變變



利用Unity內建的模組,搭配kinect偵測手掌的中心點,在兩隻手都有偵測到的情況下,

當右手碰觸到模型時,會顯示X軸,且只能移動X軸改變大小,

當左手碰觸到模型時,會顯示Y軸,且只能移動Y軸改變大小,

當兩手碰觸到模型時,會顯示Z軸,且只能移動Z軸改變大小。



99160132_劉翊晨, HW10, Week10

      今天按照老師的方法下載了processing和SimpleOpenNI 1.5,先執行processing再把SimpleOpenNI1.5放入processing的資料夾裡新增的Library資料夾,然後由以上步驟執行範例。

98162123 陳志軒 HW10

本週進度:

三種選擇:
(1)使用Kinect SDK 1.7
(2)使用OpenNI 2.0
(3)使用Processing + SimpleOpenNI 1.5
1.OpenNI 1.5
2.Nite 1.5
3.Sensor Kinect
4.安裝SimpleOpenNI

Processing 1.5.1 解壓後執行,再從文件中的Processing裡建立Libraries資料夾,將SimpleOpenNI放入資料夾內,重新啟動Processing。

執行範例:




    老師今天還有教我們如何寫程式,只是速度有點快,聽還不是很懂,希望老師可以再慢一點,可以讓我們聽清楚一點,接下來還是要靠自己多多去練習了!


Week10_邱垂傑_徐煒智_HW10_期中作品企畫書


3D小畫家

我們要在三維空間中能畫出3D的圖形,並且有四格視窗可以讓我們看到我們畫的東西,使用Kinect找出手掌骨架的點,可以換許多不同顏色的筆。



1.我們要先將Kinect接上Unity軟體
2.找到手骨架的點
3.可以畫線,線會跟著手的路徑一起移動
4.四格視窗,攝影機的視角切換
5.改變線的顏色

Homework 10 邱昱杰

今日重點:使用Processing執行SimpleOpenNI、繳交期中作品報告書、看老師示範

STEP1
連結到老師電腦,下載Processing及SimpleOpenNI範例、安裝驅動程式

STEP2
解壓縮並直接執行Processing後,會發現在電腦的我的文件資料夾裡多了一個"Processing"資料夾,點進去手動新增"Libraries"資料夾,並將SimpleOpenNI.rar壓縮檔內的"SimpleOpenNI"拉進去。

STEP3
開啟範例"DepthInfrarcd"並執行試試看。
DepthInfrarcd內程式碼

DepthInfrarcd執行結果


STEP4
新增一個空白專案,然後依照範例打入程式碼,並執行

自訂範例執行結果

 STEP5
開啟HANDS3D範例並執行

Hands3D執行結果

最後祝老師教召順利平安!

Week10,99160734_陳嘉云 , HW10,

1.安裝processing,openni,nite
2.執行processing->打開我的文件->打開processing->建資料夾Libraries->把SimpleOpenNI解壓縮放入
3.執行processing
























4.執行畫面


















5.加入png圖片

















程式碼由範例Hands3D修改:

import SimpleOpenNI.*;
//import processing.opengl.*;

SimpleOpenNI context;
float        zoomF =0.5f;
float        rotX = radians(180);  // by default rotate the hole scene 180deg around the x-axis,
                                   // the data from openni comes upside down
float        rotY = radians(0);
boolean      handsTrackFlag = false;
PVector      handVec = new PVector();
ArrayList    handVecList = new ArrayList();
int          handVecListSize = 30;
String       lastGesture = "";

PImage imgBG;
PImage imgHand; 

void setup()
{
  imgBG=loadImage("images.png");
  imgHand=loadImage("bear1.png"); 
 
 
  size(1024,768,P3D);  // strange, get drawing error in the cameraFrustum if i use P3D, in opengl there is no problem
  //size(1024,768,OPENGL);

  context = new SimpleOpenNI(this);
 
  // disable mirror
  context.setMirror(false);

  // enable depthMap generation
  if(context.enableDepth() == false)
  {
     println("Can't open the depthMap, maybe the camera is not connected!");
     exit();
     return;
  }

  // enable hands + gesture generation
  context.enableGesture();
  context.enableHands();
 
  // add focus gestures  / here i do have some problems on the mac, i only recognize raiseHand ? Maybe cpu performance ?
  context.addGesture("Wave");
  context.addGesture("Click");
  context.addGesture("RaiseHand");
 
  // set how smooth the hand capturing should be
  //context.setSmoothingHands(.5);
 
  stroke(255,255,255);
  smooth();
 
  perspective(radians(45),
              float(width)/float(height),
              10.0f,150000.0f);
 }

void draw()
{
  // update the cam
  context.update();
 
  image(imgBG,0,0,1024,768);
  image(imgHand,1024/2-handVec.x,768/2-handVec.y); 
  return;
}
// -----------------------------------------------------------------
// hand events

void onCreateHands(int handId,PVector pos,float time)
{
  println("onCreateHands - handId: " + handId + ", pos: " + pos + ", time:" + time);

  handsTrackFlag = true;
  handVec = pos;
 
  handVecList.clear();
  handVecList.add(pos);
}

void onUpdateHands(int handId,PVector pos,float time)
{
  //println("onUpdateHandsCb - handId: " + handId + ", pos: " + pos + ", time:" + time);
  handVec = pos;
 
  handVecList.add(0,pos);
  if(handVecList.size() >= handVecListSize)
  { // remove the last point
    handVecList.remove(handVecList.size()-1);
  }
}

void onDestroyHands(int handId,float time)
{
  println("onDestroyHandsCb - handId: " + handId + ", time:" + time);
 
  handsTrackFlag = false;
  context.addGesture(lastGesture);
}

// -----------------------------------------------------------------
// gesture events

void onRecognizeGesture(String strGesture, PVector idPosition, PVector endPosition)
{
  println("onRecognizeGesture - strGesture: " + strGesture + ", idPosition: " + idPosition + ", endPosition:" + endPosition);
 
  lastGesture = strGesture;
  context.removeGesture(strGesture);
  context.startTrackingHands(endPosition);
 
}

void onProgressGesture(String strGesture, PVector position,float progress)
{
  //println("onProgressGesture - strGesture: " + strGesture + ", position: " + position + ", progress:" + progress);
}

// -----------------------------------------------------------------
// Keyboard event
void keyPressed()
{
  switch(key)
  {
  case ' ':
    context.setMirror(!context.mirror());
    break;
  }
   
  switch(keyCode)
  {
    case LEFT:
      rotY += 0.1f;
      break;
    case RIGHT:
      rotY -= 0.1f;
      break;
    case UP:
      if(keyEvent.isShiftDown())
        zoomF += 0.01f;
      else
        rotX += 0.1f;
      break;
    case DOWN:
      if(keyEvent.isShiftDown())
      {
        zoomF -= 0.01f;
        if(zoomF < 0.01)
          zoomF = 0.01;
      }
      else
        rotX -= 0.1f;
      break;
  }
}

HW10 week10 98161031 陳巧玲


120.125.68.53(第53台老師機)
三種選擇:
1)使用kinect sdk 1.7
2)使用openNI2.0
3)使用processing+simpleopneNI 1.5

蟲蟲危機感應手的教學,可以用來應用在我們的遊戲之中

wee10 課堂練習

三種選擇:
(1)使用kinect SDK 1.7
(2)使用OpenNI 2.0
(3)使用Processing + SimpleOpenNI 1.5
      a.OpenNI 1.5
      b.Nite 1.5
      c.Sensor kinect
      d.裝simple OpenNI

第十周 課堂作業

第十周 課堂作業

<小熊維尼 出門野餐>

在範例程式中
可使用HAND3D
記錄手部資訊


再加入背景及人物

維尼熊

 背景


最後可以試玩看看




程式碼


/* --------------------------------------------------------------------------
 * SimpleOpenNI Hands3d Test
 * --------------------------------------------------------------------------
 * Processing Wrapper for the OpenNI/Kinect library
 * http://code.google.com/p/simple-openni
 * --------------------------------------------------------------------------
 * prog:  Max Rheiner / Interaction Design / zhdk / http://iad.zhdk.ch/
 * date:  02/27/2011 (m/d/y)
 * ----------------------------------------------------------------------------
 * This demos shows how to use the gesture/hand generator.
 * It's not the most reliable yet, a two hands example will follow
 * ----------------------------------------------------------------------------
 */
 
import SimpleOpenNI.*;
//import processing.opengl.*;

SimpleOpenNI context;
float        zoomF =0.5f;
float        rotX = radians(180);  // by default rotate the hole scene 180deg around the x-axis, 
                                   // the data from openni comes upside down
float        rotY = radians(0);
boolean      handsTrackFlag = false;
PVector      handVec = new PVector();
ArrayList    handVecList = new ArrayList();
int          handVecListSize = 30;
String       lastGesture = "";

PImage imgBG,imgHand;

void setup()
{
  imgBG=loadImage("images.jpg");
  imgHand=loadImage("bb.jpg");
  size(1024,768,P3D);  // strange, get drawing error in the cameraFrustum if i use P3D, in opengl there is no problem
  //size(1024,768,OPENGL); 

  context = new SimpleOpenNI(this);
   
  // disable mirror
  context.setMirror(false);

  // enable depthMap generation 
  if(context.enableDepth() == false)
  {
     println("Can't open the depthMap, maybe the camera is not connected!"); 
     exit();
     return;
  }

  // enable hands + gesture generation
  context.enableGesture();
  context.enableHands();
  
  // add focus gestures  / here i do have some problems on the mac, i only recognize raiseHand ? Maybe cpu performance ?
  context.addGesture("Wave");
  context.addGesture("Click");
  context.addGesture("RaiseHand");
  
  // set how smooth the hand capturing should be
  //context.setSmoothingHands(.5);
  
  stroke(255,255,255);
  smooth();
  
  perspective(radians(45),
              float(width)/float(height),
              10.0f,150000.0f);
 }

void draw()
{
  // update the cam
  context.update();
  image(imgBG,0,0,1024,768);
  image(imgHand,1024/2-handVec.x,768/2-handVec.y);
  return;
 
}

// -----------------------------------------------------------------
// hand events

void onCreateHands(int handId,PVector pos,float time)
{
  println("onCreateHands - handId: " + handId + ", pos: " + pos + ", time:" + time);
 
  handsTrackFlag = true;
  handVec = pos;
  
  handVecList.clear();
  handVecList.add(pos);
}

void onUpdateHands(int handId,PVector pos,float time)
{
  //println("onUpdateHandsCb - handId: " + handId + ", pos: " + pos + ", time:" + time);
  handVec = pos;
  
  handVecList.add(0,pos);
  if(handVecList.size() >= handVecListSize)
  { // remove the last point 
    handVecList.remove(handVecList.size()-1); 
  }
}

void onDestroyHands(int handId,float time)
{
  println("onDestroyHandsCb - handId: " + handId + ", time:" + time);
  
  handsTrackFlag = false;
  context.addGesture(lastGesture);
}

// -----------------------------------------------------------------
// gesture events

void onRecognizeGesture(String strGesture, PVector idPosition, PVector endPosition)
{
  println("onRecognizeGesture - strGesture: " + strGesture + ", idPosition: " + idPosition + ", endPosition:" + endPosition);
  
  lastGesture = strGesture;
  context.removeGesture(strGesture); 
  context.startTrackingHands(endPosition);
  
}

void onProgressGesture(String strGesture, PVector position,float progress)
{
  //println("onProgressGesture - strGesture: " + strGesture + ", position: " + position + ", progress:" + progress);
}

// -----------------------------------------------------------------
// Keyboard event
void keyPressed()
{
  switch(key)
  {
  case ' ':
    context.setMirror(!context.mirror());
    break;
  }
    
  switch(keyCode)
  {
    case LEFT:
      rotY += 0.1f;
      break;
    case RIGHT:
      rotY -= 0.1f;
      break;
    case UP:
      if(keyEvent.isShiftDown())
        zoomF += 0.01f;
      else
        rotX += 0.1f;
      break;
    case DOWN:
      if(keyEvent.isShiftDown())
      {
        zoomF -= 0.01f;
        if(zoomF < 0.01)
          zoomF = 0.01;
      }
      else
        rotX -= 0.1f;
      break;
  }
}

99160770_吳姿儀,Week10,HW10

1. 安裝下載
(1) OpenNI_NITE
<1> OpenNI 1.5
<2> Nite 1.5
<3> Sensor Kinect
<4> sensor win32----------->不裝
--------裝上Kinect裝置--------
(2) SimpleOpenNI
(3) Processing 1.5.1

2. 新建SimpleOpenNI函式庫至Processing
文件->processing->Libraries=>新建資料夾
(SimpleOpenNI資料夾丟入Libraries資料夾)
*要先執行過一次Processing文件才會產生processing資料夾*

3. SimpleOpenNI範例
*重新打開Processing*
File->Sketchbook->Libraries->SimpleOpenNI->example
or
File->Examples->Contributed Libraries->SimpleOpenNI->OpenNI


範例1>>>DepthInfrared(函式庫範例)

範例2>>>Depth+RGB

範例3>>>Hand3d(函式庫範例)


範例4>>>用Hand3d範例修改
(1) 增加背景圖
(2) 增加跟著手移動的圖

心得:
今天繳交期中作品企畫書,老師強調遊戲的故事性、創新性和畫面呈現方式,目前有兩個遊戲構想,
還要再討論和考慮要選擇哪個遊戲比較有趣和可行性。
今天用Processing跑SimpleOpenNI範例,也練習了兩個修改範例程式,比較有感覺Kinect程式的運作。


WEEK10, HW10, 98160185_張家薰,


120.125.68.53

1.use Kinect SDK1.7
2.use OpenNI2.0
3.use processing + SimpleOpenNI 1.5
(1)OpenNI 1.5
(2)Nite1.5
(3)SensorKinect(會和1.2.衝突)
(4)裝SimpleOpenNI

Processing 1.5.1解壓執行 文件\Processing\Libraries
再重新執行File-Sketch-Libraries.SimpleOpenNI-Depth Infraved

今天教processing


HW10 WEEK10 98160425 蔡博堯


這是第十周的上課練習以及所開的範例
老師教得相當有趣
今天老師甚至有教自己如何寫程式
回家再研究一下

HW10,99160061_洪蓁乾, 99160663_溫媁婷, Midterm, Week09

點點吃水果

1. 遊戲概述:
    (1)從前從前有一位英雄掉入陷阱變成了光點,甚麼事情都不能做,而翻了幾千萬本書籍發
         現,傳說中只要收集到四種不同的特殊水果就能夠召喚出萬物之靈來去實現一個願望。
    (2)利用kinect來真測我們人兩隻手掌的位置,再來偵測我們手指的位置。
    (3)遊戲開始會有主角出現,在我們的場景裡去收集不同的水果(分數),積分越高者越強,依
        分數的不同來轉換遊戲的難易度與速度,

2.方法:
    (1)遊戲的主角是一個光點,光點是用我們偵測到的手指去控制它,依技術手指靠近螢幕光
         點變大,遠離螢幕光點變小。
    (2)場景跟我們的水果會一直往後移動,光點要把握經過的水果(分數)
    (3)特殊的水果會在不同的時間點,不定時的出現去讓玩遊戲的人完成目標
    (4)當我們的光點與我們的水果一樣的位置時,就是吃水果。

場景:
粗稿:

 



HW6 98161031 陳巧玲

至120.125.68.53下載
1. kinect SDK 1.7 ( 接kinect跳過線上update )
2. kinect developertoolkit 1.7

kinect toolkit broeser,選C#
1.kinect-exploer WPF
可以調整攝影機角度


2.內部有影片等可觀看

3.像maya塑造模型一般,靜止不動就會漸漸將形狀補滿,但是若是偏移太大的話會當掉

4.有點像合成照片,站後退一點效果會更好

5.有點像鬼片效果

6.偵測全身並且配合聲音進行的一款小遊戲 

7.人會變色,不知道是距離關係還是時間關係

8.語音遊戲若是需要增強語音功能可以進行設定


9.偵測全身點


hw08 week08 98160425 蔡博堯



下載並安裝:
(1)KinectSDK-v1.7-Setup
(2)OpenNI-Windows-x86-2.1.0
(3)Nite-Windows-x86-2.0.01
(4)KinectDeveloperToolkit-v1.7.0-Setup
(5)Processing-1.5.1-windows

---------------------------
因今天都不順 改教GitHub:
(1)到GitHub建立帳號