Loading...
Logo
Processing Forum
beedot's Profile
1 Posts
1 Responses
0 Followers

Activity Trend

Last 30 days
Show:
Private Message
    Hi there , I am using the SimpleOpenNI library for processing, in conjunction with the Kinect hardware. I am trying to recreate this effect:


    I can create vertical gaps in the point cloud by changing the number in the update portion of the array [   for (int i = 0; i < depthPoints.length; i+=5) ] . 

    Rather, I would like to create horizontal gaps within the point cloud, but I'm not sure how to write the code to ignore chunks of the array in this way. 


    CURRENT CODE:
    1. import processing.opengl.*;
    2. import SimpleOpenNI.*;
    3. SimpleOpenNI kinect;

    4. void setup() {
    5.   size(1024, 768, OPENGL);
    6.   kinect = new SimpleOpenNI(this);
    7.   kinect.enableDepth();
    8. }

    9. void draw() {
    10.   background(0);
    11.   kinect.update();
    12.   
    13.   translate(width/2, height/2, 0);
    14.   rotateX(radians(180));

    15.   stroke(255);
    16.   strokeWeight(1);
    17.   
    18.   PVector[] depthPoints = kinect.depthMapRealWorld();
    19.   for (int i = 0; i < depthPoints.length; i+=5)
    20.   {
    21.     PVector currentPoint = depthPoints[i];
    22.     point(currentPoint.x, currentPoint.y, currentPoint.z);
    23.   }
    24. }

    If anyone has any tips or advice on how to achieve this effect it would be greatly appreciated!