Interactive floor using Processing

edited July 2015 in Kinect

Hi,everyone! Do anyone can give me some examples how to setup **Interactive Projection Floor ** using Processing? How is the best way? How Library allows create it? Thanks!

Answers

  • Answer ✓

    Well, for a start, you will probably need a projector to project the image on the floor.

    You might also want a webcam (or Kinect) to detect peoples' body parts so you know where things need to be interacting.

    Then you just have to write the visual stuff, and draw something that can be interacted with.

    So, there you go. Three steps.

    - Get projector to project a sketch's image.
    - Get a detector to detect peoples' body parts.
    - Draw things in your sketch that interact.
    

    The first two of these are hardware tasks. You'll probably want to find a Camera or Kinect library to get the data from your detector. Check the examples, and the Libraries section of the reference.

    The third task - working out what you want to draw - is something you can get the most help with here.

    So, what do you want to draw?

  • edited July 2015

    Cool!

    TfGuy44

    I got a Kinect. I got a projector. And I'm using KinectProjector Toolkit library for this job.

    I did a bodytrack recognize fine by kinect as well.It's working great.

    ---Resuming I got It.---

    My question now is(beginner).

    If I want set image into the code ..Wherever I want. How can I do this?How can I declare image into my code ? I mean, wich place I can declare it? After or before void setup for example?

    Note.For this job I already have my image floor I just would like to change the image and Discovery wher can I do this.

    Thanks!

  • edited July 2015

    I tried PImage Load Image I just dont know de order request by this code

  • Answer ✓

    You'll get a better response if you format your code. Here's how:

    http://forum.processing.org/two/discussion/8045/how-to-format-code-and-text

  • Answer ✓

    Well, your PImage needs to be loaded in setup() and used in draw(), so it needs to be a global variable. You only need to load it once, so put the loading in setup(), since setup only runs once. You want to draw it ever frame, however, so put the drawing of it in draw(), which draws every frame.

    PImage img;
    
    void setup(){
      size(600,400);
      img = loadImage( "myImage.PNG" ); // Your filename may differ.
    }
    
    void draw(){
      background(0);
      image( img, 0, 0 );
    }
    
  • All Right!! One more time I got it. It's done and working well.

    I just set my image in back ground.Fine!!

    One more class please??:) About body skeleton ...

    I almost removed all my full body track into the code and I just leave only my track foot working. It is a red ellipse capturing all my movie by kinect. My question is! Can I change the tracked ellipse for a image inside a ellipse? How can I change my interactive ellipse?

    Thank you very much You have helped me a lot.

  • Add conditionals to only track it if it is within the elliptical area you care about. (?)

    void setup(){
      size(400,400);
      smooth();
    }
    
    void draw(){
      background(255);
      stroke(0,128,0);
      strokeWeight(3);
      noFill();
      ellipse(200,200,350,350);
      if( dist(mouseX,mouseY,200,200) <= 175 ){
        noStroke();
        fill(128,0,0);
        ellipse(mouseX,mouseY,10,10);
      }
    }
    

    Or maybe I didn't understand you.

  • TfGuy44, Sorry! I will try explain again by pic.Sem título You see this RED ELLIPSE? Is it possible change this ellipsse for a Image Picture for example? If yes.How can I do this? It a example by Kinectprojector Toolkit Library.

  • Answer ✓

    Well, yeah. Instead of drawing a red ellipse, which probably looks like this:

    fill(255,0,0);
    ellipse( someXvalue, someYvalue, w, h );
    

    Just draw your image instead:

    image( img, someXvalue, someYvalue );
    
  • I'ts become easy when you learn! :)>- Cheers man! I get it" TKS

Sign In or Register to comment.