Kinect4 [kinect] Minority Report Photos 2 다음은 3장의 그림을 손으로 이동하거나 확대할 수 있는 예제이다. SimpleOpenNI.*;SimpleOpenNI kinect; int closestValue; int closestX; int closestY; float lastX;float lastY;float image1X;float image1Y; //이미지 크기 변환 float image1scale; int image1width = 100; int image1height = 100; float image2X; float image2Y; float image2scale; int image2width = 100; int image2height = 100; float image3X; float image3Y; float image3scale; int.. 2013. 1. 21. [kinect] Minority Report Photos 1 다음은 Kinect센서에서 가까운 포인트를 찾아서 그림을 이동 시키는 예제이다. import SimpleOpenNI.*; SimpleOpenNI kinect; int closestValue; int closestX; int closestY; float lastX; float lastY; // 이미지의 X,Y좌표를 위한 변수 float image1X; float image1Y; // 이미지가 움직이는지 확인하는 변수 boolean imageMoving; // 프로세싱에서 이미지를 처리하기 위한 변수 PImage image1; void setup() { size(640, 480); kinect = new SimpleOpenNI(this);kinect.enableDepth();//초기에는 이미지가 움직이도록 .. 2013. 1. 21. [kinect] Invisible Pencil import SimpleOpenNI.*;SimpleOpenNI kinect; int closestValue;int closestX;int closestY;float lastX;float lastY; void setup(){ size(640, 480); kinect = new SimpleOpenNI(this); kinect.enableDepth();}void draw(){ closestValue = 8000; kinect.update(); int[] depthValues = kinect.depthMap(); for(int y=0;y 2013. 1. 20. [kinect] 가장 가까운 지점 구하기 import SimpleOpenNI.*;SimpleOpenNI kinect;int closestValue;int closestX;int closestY;void setup(){size(640, 480);kinect = new SimpleOpenNI(this);kinect.enableDepth();}void draw(){closestValue = 8000;kinect.update();int[] depthValues = kinect.depthMap();for(int y = 0; y < 480; y++){// look at each pixel in the rowfor(int x = 0; x < 640; x++){int i = x + y * 640; int currentDepthValue = depthValue.. 2013. 1. 15. 이전 1 다음