Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9257503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:10:28+00:00 2026-06-18T12:10:28+00:00

In Processing, I can successfully draw depth maps from 2 Kinects using SimpleOpenNI, but

  • 0

In Processing, I can successfully draw depth maps from 2 Kinects using SimpleOpenNI, but I’m now trying to draw 2 “scenes” (from enableScene() vs enableDepth()). Both Kinects are detected but when I draw the output, I see the same scene is drawn twice (whereas using enableDepth() always gave me 2 different depth images). Any ideas what I’m doing wrong? Thanks in advance.

/* --------------------------------------------------------------------------
 * SimpleOpenNI Multi Camera Test
 * --------------------------------------------------------------------------
 */

import SimpleOpenNI.*;

SimpleOpenNI cam1;
SimpleOpenNI cam2;

void setup()
{
  size(640 * 2 + 10,480); 

  // start OpenNI, loads the library
  SimpleOpenNI.start();

  // init the cameras
  cam1 = new SimpleOpenNI(0,this);
  cam2 = new SimpleOpenNI(1,this);

  // set the camera generators ** HAD TO REVERSE ORDER FOR BOTH KINECTS TO WORK

  // enable Scene
  if(cam2.enableScene() == false)
  {
     println("Can't open the scene for Camera 2"); 
     exit();
     return;
  }

  // enable depthMap generation 
  if(cam1.enableScene() == false)
  {
     println("Can't open the scene for Camera 1"); 
     exit();
     return;
  }

  background(10,200,20);
}

void draw()
{
  // update the cams
  SimpleOpenNI.updateAll();

  image(cam1.sceneImage(),0,0);

  image(cam2.sceneImage(),640 + 10,0);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:10:29+00:00Added an answer on June 18, 2026 at 12:10 pm

    I’ve done another text using the sceneMap() functionality but it looks like there is indeed an issue with SimpleOpenNI not updating properly internally:

    /* --------------------------------------------------------------------------
     * SimpleOpenNI Multi Camera Test
     * --------------------------------------------------------------------------
     */
    
    import SimpleOpenNI.*;
    
    SimpleOpenNI cam1;
    SimpleOpenNI cam2;
    
    int numPixels = 640*480;
    int[] sceneM1 = new int[numPixels];
    int[] sceneM2 = new int[numPixels];
    PImage scene1,scene2;
    
    void setup()
    {
      size(640 * 2 + 10,480 * 2 + 10); 
    
      // start OpenNI, loads the library
      SimpleOpenNI.start();
    
      // init the cameras
      cam1 = new SimpleOpenNI(0,this);
      cam2 = new SimpleOpenNI(1,this);
    
      // set the camera generators ** HAD TO REVERSE ORDER FOR BOTH KINECTS TO WORK
    
      // enable Scene
      if(cam2.enableScene() == false)
      {
         println("Can't open the scene for Camera 2"); 
         exit();
         return;
      }
    //  cam2.enableDepth();//this fails when using only 1 bus
    
      // enable depthMap generation 
      if(cam1.enableScene() == false)
      {
         println("Can't open the scene for Camera 1"); 
         exit();
         return;
      }
      cam1.enableDepth();
    
      scene1 = createImage(640,480,RGB);
      scene2 = createImage(640,480,RGB);
    
      background(10,200,20);
    }
    
    void draw()
    {
      // update the cams
      SimpleOpenNI.updateAll();
    
      image(cam1.depthImage(),0,0);
      image(cam1.sceneImage(),0,0);
    
      cam1.sceneMap(sceneM1);
      cam2.sceneMap(sceneM2);
      updateSceneImage(sceneM1,scene1);
      updateSceneImage(sceneM2,scene2);
      image(scene1,0,490);
      image(scene2,650,490);
    }
    void updateSceneImage(int[] sceneMap,PImage sceneImage){
      for(int i = 0; i < numPixels; i++) sceneImage.pixels[i] = sceneMap[i] * 255;
      sceneImage.updatePixels();
    }
    

    Using something like

    cam1.update();
    cam2.update();
    

    rather than

    SimpleOpenNI.updateAll();
    

    doesn’t change anything.

    An issue was filed, hopefully it will be resolved.
    In the meantime, try using OpenNI in a different language/framework.
    OpenFrameworks has many similarities to Processing (and many differences
    as well to be honest, but it’s not rocket science).
    Try the experimental ofxOpenNI addon to test multiple cameras, hopefully it will resolve your issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm successfully sent single int values from Processing to Arduino, but now I need
I can't get around a peculiar problem with SimpleOpenNI for Processing ao I'm asking
I have two separate servers for alfresco and share. I can successfully login from
I'm using the FAPI for building and processing a form, and I successfully created
I have successfully compiled my code, but it says this: Note: You can also
I am trying to extract features using OpenCV's HoG API, however I can't seem
I have membase server setup, and am successfully using a memcache bucket, but I
Possible Duplicate: Java : Is there a good natural language processing library Can anybody
Is there an image processing algorithm that can fill these gaps within an image?
I have a simple processing sketch (you can post the code and observe the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.