i would like to addDepthThreshold to Kinect view
and it make the process really slow 
it’s normal ?
#include “testApp.h”
//using namespace cv;
//using namespace ofxCv;
void testApp::setup(){
//grabber.initGrabber(640,480);
ofSetLogLevel(OF_LOG_NOTICE);
numDevices = openNIDevices[0].getNumDevices();
myDepthThreshold = ofxOpenNIDepthThreshold(550,1500, false, false,true, true, true);
for (int deviceID = 0; deviceID < numDevices; deviceID++){
//openNIDevices[deviceID].setLogLevel(OF_LOG_VERBOSE);
openNIDevices[deviceID].setup();
openNIDevices[deviceID].addDepthGenerator();
openNIDevices[deviceID].addImageGenerator();
openNIDevices[deviceID].setRegister(true); // this registers all the image pixels to the depth pixels
openNIDevices[deviceID].setMirror(true); // flips the image and depth sensors
openNIDevices[deviceID].addDepthThreshold(myDepthThreshold);
openNIDevices[deviceID].start();
myDepths[deviceID].allocate(640, 480, OF_IMAGE_COLOR_ALPHA);
}
verdana.loadFont(ofToDataPath(“verdana.ttf”), 24);
gui.addTitle(“A group”);
gui.addSlider(“Near”,near,0,2000);
gui.addSlider(“Far”,far,1000,10000);
gui.addToggle(“setDephtValue”,setDephtValue);
gui.loadFromXML();
gui.show();
}
void testApp::update(){
for (int deviceID = 0; deviceID < numDevices; deviceID++){
openNIDevices[deviceID].update();
ofxOpenNIDepthThreshold &myDepthThreshold = openNIDevices[deviceID].getDepthThreshold(0);
if(setDephtValue){
myDepthThreshold.setNearThreshold(near);
myDepthThreshold.setFarThreshold(far);
setDephtValue = false;
}
myDepths[deviceID].setFromPixels(myDepthThreshold.getMaskPixels());
}
}
void testApp::draw(){
ofSetColor(255, 255, 255);
ofPushMatrix();
cout << “numDevices”<<numDevices<<"\n";
for (int deviceID = 0; deviceID < numDevices; deviceID++){
ofTranslate(0, deviceID * 480);
//openNIDevices[deviceID].drawDebug(); // draws all generators
//openNIDevices[deviceID].drawDepth(0, 0);
//openNIDevices[deviceID].drawImage(640, 0);
//myDepthThreshold.drawROI();
myDepths[deviceID].draw(0,0);
}
ofPopMatrix();
ofSetColor(0, 255, 0);
string msg = " MILLIS: " + ofToString(ofGetElapsedTimeMillis()) + " FPS: " + ofToString(ofGetFrameRate());
verdana.drawString(msg, 20, numDevices * 480 - 20);
gui.draw();
}