"context.enableScene() does not exist" -- Troubles with SimpleOpenNi and Processing

6,557 views
Skip to first unread message

Arnaud Perrillat

unread,
Sep 4, 2013, 12:16:40 PM9/4/13
to simple-ope...@googlegroups.com

Hello, im' trying to make an app with processing using kinect, and SimpleOpenNi. I tried to follow this tutorial http://www.creativeapplications.net/processing/kinect-physics-tutorial-for-processing/ , but i'm stuck at the very beginning : when i launch the first script processing returns me this error : "The function enableScene() does not exist" Also, the function sceneImage() doen't work.

I installed KinectSDK, OpenNi, NiTe, SimpleOpenNi lib, tried on 3 differents versions of processing (1.5.1, 2.0.1 x86, 2.0.2 x64) with win7&win8. I really can't find any solution on the web, if someone have some any clue, i'd be glad ! Thanks !

Matteo Lupetti

unread,
Sep 4, 2013, 2:30:19 PM9/4/13
to simple-ope...@googlegroups.com
in the new version the method enableScene() was changed in enableUser()

Arnaud Perrillat

unread,
Sep 4, 2013, 2:38:33 PM9/4/13
to simple-ope...@googlegroups.com
Hey, thanks a lot, this one work! :)

But now, I got the same problem with sceneImage()... --'


2013/9/4 Matteo Lupetti <ubi...@gmail.com>

--
Sie erhalten diese Nachricht, weil Sie in Google Groups ein Thema der Gruppe "simple-openni-discuss" abonniert haben.
Um Ihr Abonnement für dieses Thema zu beenden, rufen Sie die URL https://groups.google.com/d/topic/simple-openni-discuss/18B6ea-w0ac/unsubscribe auf.
Um Ihr Abonnement für diese Gruppe und alle ihre Themen zu beenden, senden Sie eine E-Mail an simple-openni-di...@googlegroups.com.
Weitere Optionen: https://groups.google.com/groups/opt_out



--
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Arnaud Perrillat
Interaction Design
Ecole de Design Nantes Atlantique

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Matteo Lupetti

unread,
Sep 9, 2013, 12:32:08 PM9/9/13
to simple-ope...@googlegroups.com
because it's changed in userImage() :P


Il giorno mercoledì 4 settembre 2013 20:38:33 UTC+2, Arnaud Perrillat ha scritto:
Hey, thanks a lot, this one work! :)

But now, I got the same problem with sceneImage()... --'


2013/9/4 Matteo Lupetti <ubi...@gmail.com>
in the new version the method enableScene() was changed in enableUser()

Il giorno mercoledì 4 settembre 2013 18:16:40 UTC+2, Arnaud Perrillat ha scritto:

Hello, im' trying to make an app with processing using kinect, and SimpleOpenNi. I tried to follow this tutorial http://www.creativeapplications.net/processing/kinect-physics-tutorial-for-processing/ , but i'm stuck at the very beginning : when i launch the first script processing returns me this error : "The function enableScene() does not exist" Also, the function sceneImage() doen't work.

I installed KinectSDK, OpenNi, NiTe, SimpleOpenNi lib, tried on 3 differents versions of processing (1.5.1, 2.0.1 x86, 2.0.2 x64) with win7&win8. I really can't find any solution on the web, if someone have some any clue, i'd be glad ! Thanks !

--
Sie erhalten diese Nachricht, weil Sie in Google Groups ein Thema der Gruppe "simple-openni-discuss" abonniert haben.
Um Ihr Abonnement für dieses Thema zu beenden, rufen Sie die URL https://groups.google.com/d/topic/simple-openni-discuss/18B6ea-w0ac/unsubscribe auf.
Um Ihr Abonnement für diese Gruppe und alle ihre Themen zu beenden, senden Sie eine E-Mail an simple-openni-discuss+unsub...@googlegroups.com.
Weitere Optionen: https://groups.google.com/groups/opt_out

Quang Đông

unread,
Sep 10, 2013, 9:21:02 AM9/10/13
to simple-ope...@googlegroups.com
Ok, so userImage();
But i only want get user depth image, not background ! Because if userImage draw, the background also draw...
Have any solution for get exact user depth ?

Thank you

Matteo Lupetti

unread,
Sep 11, 2013, 5:44:01 AM9/11/13
to simple-ope...@googlegroups.com
Try to use userMap()

bsq

unread,
Sep 11, 2013, 10:29:43 AM9/11/13
to simple-ope...@googlegroups.com
Thank you so much ! 
I will try this ! :3

bsq

unread,
Sep 12, 2013, 7:40:58 AM9/12/13
to simple-ope...@googlegroups.com
So userMap() is array ! NOT PImage !!! Can not draw this with userMap();

Matteo Lupetti

unread,
Sep 17, 2013, 6:44:29 AM9/17/13
to simple-ope...@googlegroups.com
it is the map of the user image, you can copy the information of the array in a PImage of the same size.
for reference look here http://processing.org/reference/pixels.html

bsq

unread,
Sep 20, 2013, 11:40:46 AM9/20/13
to simple-ope...@googlegroups.com
Thank you ! My mistake ! Easy to get this picture !

mark...@hotmail.com

unread,
Nov 19, 2013, 9:53:05 AM11/19/13
to simple-ope...@googlegroups.com
Hi so I changed userImage to userMap and now i get "cannot convert from int to PImage". Do you know how to solve this? What code to enter?

Ewelina Bakała

unread,
Apr 2, 2014, 10:19:42 AM4/2/14
to simple-ope...@googlegroups.com
try this, the code draws detected users in red and the background in black

import SimpleOpenNI.*;

SimpleOpenNI  context;
PImage img;
int irW,irH;


void setup()
{
  context = new SimpleOpenNI(this);
  context.enableDepth();
  context.enableUser();
  if(context.isInit() == false)
  {
     println("Can't init SimpleOpenNI, maybe the camera is not connected!"); 
     exit();
     return;  
  }
  size(640, 480);

  img = new PImage(irW,irH); 
  img.loadPixels();

}

void draw()
{
  context.update();

  int[] u = context.userMap();
  for(int i =0;i<u.length;i++){
    if(u[i]==0){
      img.pixels[i] = color(0);
    }
    else  {
      img.pixels[i] = color(255,0,0);
    }
  }
   
  img.updatePixels(); 
  image(img, 0, 0);
Reply all
Reply to author
Forward
0 new messages