Avoid skeleton trackin on a recorded video (openNI-demoAllFeatures)

Hello. Im trying to show at same time a previous recorded video and myself in real time. I can do it. The problem is that i want to use the skeletton tracking in real time, but i dont want to apply the skeleton trackin on the captured video. So this is what i do:

  
  
**void testApp::update()**{  
  
#ifdef TARGET_OSX // only working on Mac at the moment  
	hardware.update();  
#endif  
  
	if (isLive) {  
  
		// update all nodes  
		recordContext.update();  
		recordImage.update();  
		recordUser.update();  
		  
		if (isRecording) oniRecorder.update();  
		  
		if (isPlayback){  
		   playContext.update();  
		   playImage.update();  
		}  
       }  
}  
  
/////////////////////////////////////////////////////////////////////////////////////////////////  
  
void testApp::draw(){  
	  
	ofSetColor(255, 255, 255);  
	glPushMatrix();  
	glScalef(0.75, 0.75, 0.75);  
  
	if (isLive) {  
		recordImage.draw(0, 0, 640, 480);  
		if (isTracking)   
			recordUser.draw();  
  
	if (isPlayback)  
		playImage.draw(640, 0, 640, 480);  
	  
	}  
}  
  
  

If I dont set isPlayback=false, I can track my body without problems. But when I set it =true, the skeleton draw gets frozen.
And if I set isPlayback=true and then I start tracking, the application starts tracking my recorded video body.

I have searched in ofxTrackedUser and ofxUserGenerator and i cant found where can I disable the skeleton tracking to the recorded video, for just tracking only my real time capture. I just want to use the recorded video to mimic the gesture. May someone help me?

May i ask you if it is also possible to detect the recorded video and the live capture as 2 different users to track both at same time?

Thanks :frowning:

  
void testApp::update(){  
  
#ifdef TARGET_OSX // only working on Mac at the moment  
	hardware.update();  
#endif  
  
	if (isLive) {  
		/////////////////////////////////  
		playContext.update();  
		playImage.update();  
		/////////////////////////////////  
  
		// update all nodes  
		recordContext.update();  
		recordImage.update();  
		// update tracking/recording nodes  
		if (isTracking){   
			recordUser.update();  
			cout <<"Entering here"<<endl;  
		}  
		if (isRecording) oniRecorder.update();  
  
	} else {  
  
		// update all nodes  
		playContext.update();  
		playImage.update();  
		// update tracking/recording nodes  
		if (isTracking) playUser.update();  
		  
	}  
}  
  
//--------------------------------------------------------------  
void testApp::draw(){  
  
	ofSetColor(255, 255, 255);  
  
	glPushMatrix();  
	glScalef(0.75, 0.75, 0.75);  
  
	if (isLive) {  
	  
		//  
		playImage.draw(640, 0, 640, 480);  
		//  
		recordImage.draw(0, 0, 640, 480);  
		if (isTracking) {  
			recordUser.draw();  
cout<<"AND HERE";  
  
		}  
		  
  
	} else {  
  
		playImage.draw(640, 0, 640, 480);  
		if (isTracking) {  
			playUser.draw();  
		}  
  
	}  
  
}  
  
  
  

Hi, im still with that.
I changed the code, so i can see at same time the video previously recorded and the real time image being captured from camera. The problem is when I press “T” key, so isTracking=true, recordUser.draw() its being uptaded, but no skeleton is being drawn. I hope you can help me. Thanks.

Still with this. It seems that when im running my system, when im playing the recorded video and i use the function
recordUser.draw(), instead of tracking my body, starts tracking the playback video body :frowning: