NullPointer Exception simple openNI
in
Contributed Library Questions
•
7 months ago
Hi!
I downloaded processing, OpenNI and the kinect drivers as well as simpleOpenNi. This is also my first attempt at programming the kinect.
When I try and run this code I get a null pointer exception. Any explanation would be hugely appreciated!
- import SimpleOpenNI.*;
- SimpleOpenNI kinect;
- void setup()
- {
- size(640*2, 480);
- kinect = new SimpleOpenNI (this);
- kinect.enableRGB();
- }
- void draw()
- {
- kinect.update();
- image(kinect.rgbImage(), 640, 0);
- }
Exception in thread "Animation Thread" java.lang.NullPointerException
at processing.core.PGraphics.image(PGraphics.java:3520)
at processing.core.PApplet.image(PApplet.java:11902)
at sketch_130222a.draw(sketch_130222a.java:36)
at processing.core.PApplet.handleDraw(PApplet.java:2142)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:193)
at processing.core.PApplet.run(PApplet.java:2020)
at java.lang.Thread.run(Thread.java:662)
Thanks Everyone!
1