顯示具有 Week10 標籤的文章。 顯示所有文章
顯示具有 Week10 標籤的文章。 顯示所有文章

2013年6月23日 星期日

98161074_黃竹政,98160726_陳品如,Week10,HW10

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

2.把SimpleOpenNI放入Processing
執行processing->我的文件->processing->建資料夾Libraries->把SimpleOpenNI解壓縮放入

3. 執行SimpleOpenNI範例


2013年6月22日 星期六

WEEK10, HW10, 99160663_溫媁婷

安裝步驟 :

120.125.68.53

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

執行processing :

把SimpleOpenNI放入Processing
執行processing->我的文件->processing->建資料夾Libraries->把SimpleOpenNI解壓縮放入 , 然後執行SimpleOpenNI範例 hand3d

2013年6月2日 星期日

Week10,HW10,99161082_徐文玲

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

2.把SimpleOpenNI放入Processing
執行processing->我的文件->processing->建資料夾Libraries->把SimpleOpenNI解壓縮放入

3. 執行SimpleOpenNI範例

4.用Hand3d範例修改看看













修改和增加的部分
PImage imgBG;
PImage imgHand;

  imgBG=loadImage("images.png");
  imgHand=loadImage("bear1.png"); 

 image(imgBG,0,0,1024,768);
  image(imgHand,1024/2-handVec.x,768/2-handVec.y); 
  return;


2013年5月14日 星期二

Week10,HW10,99160494_陳孟琳

1、安裝下載:
    (1) OpenNI_NITE。
    (2) SimpleOpenNI。
    (3) Processing 1.5.1。
2、將SimpleOpenNI的函式庫放至Processing:
     放置位置:文件 / processing / Libraries / SimpleOpenNI

3、重新打開processing後,在執行範例!

4、執行結果:



心得:
  今天修改範例程式Hand3d,感覺很好玩,感覺真的有學到一些東西了。

2013年5月1日 星期三

99160522_沈奕均, HW10, Week10

本週目標:期中作品計畫書+改程式碼做小遊戲
一.安裝
(一定要下載32不然會慘)

開始過processing 1.5.1版後,SimpleOpenNI 資夾放在\文件\processing\libraries
(libraries不要拼錯喔!)
(接kinect的延長線記得開電源)

二.式寫最短的程式碼
import SimpleOpenNI.*;
SimpleOpenNI openni;
void setuup(){
openni= newSimpleOpenNI(this);
openni.enableRGB();
openni.enableDepth();
size(640+640,480);
}
void draw(){
openni.update();
image(openni.depthImage(),0,0);
image(openni.RGBImage(),640,0);
}

三.改寫範例hand3D

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 imgB;
PImage imgF; 


void setup()
{
  imgB=loadImage("b.jpg");
  imgF=loadImage("f.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(imgB,0,0,1024,768);
  image(imgF,1024/2-handVec.x,768/2-handVec.y); 
  return;

}
//以下相同
結果:



本週心得:
經過老師精心講解範例程式碼後,相信自己也是有能力可以改寫程式碼的!覺得很有成就感,會繼續努力,慢慢越改越多程式碼,本週最大收穫就是從重獲自信~耶

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日 星期三

99160866 陳冠倫, week10, hw10

 





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


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




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 蔡博堯


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