Ejemplo n.º 1
0
//---------------------------------------------------------------------------
ofxKinectNui::~ofxKinectNui(){
	close();

	// clear pixels data
	if(videoPixels.isAllocated()){
		videoPixels.clear();
	}
	if(depthPixels.isAllocated()){
		depthPixels.clear();
	}
	if(distancePixels.isAllocated()){
		distancePixels.clear();
	}
	if(labelPixels.isAllocated()){
		labelPixels.clear();
	}
	if(calibratedVideoPixels.isAllocated()){
		calibratedVideoPixels.clear();
	}
	for(int i = 0; i < ofxKinectNui::KINECT_PLAYERS_INDEX_NUM; ++i) {
		if(labelPixelsCv[i].isAllocated()) {
			labelPixelsCv[i].clear();
		}
	}

	removeKinectListener(this);

	bIsInited = false;
	bIsOpened = false;
	bIsNearmode = false;
	bIsMirror = true;
	bGrabsVideo = false;
	bGrabsDepth = false;
	bGrabsLabel = false;
	bGrabsSkeleton = false;
	bGrabsCalibratedVideo = false;
	bIsFrameNew = false;
	bIsFoundSkeleton = false;
	bIsNearmode = false;
}
Ejemplo n.º 2
0
//---------------------------------------------------------------------------
ofxKinectNui::~ofxKinectNui(){
	close();

	// clear pixels data
	if(videoPixels.isAllocated()){
		videoPixels.clear();
	}
	if(depthPixels.isAllocated()){
		depthPixels.clear();
	}
	if(distancePixels.isAllocated()){
		distancePixels.clear();
	}
	if(labelPixels.isAllocated()){
		labelPixels.clear();
	}
	if(calibratedVideoPixels.isAllocated()){
		calibratedVideoPixels.clear();
	}
	if(labelPixelsCv != NULL){
		delete[] labelPixelsCv;
		labelPixelsCv = NULL;
	}

	removeKinectListener(this);

	bIsInited = false;
	bIsOpened = false;
	bIsNearmode = false;
	bGrabsVideo = false;
	bGrabsDepth = false;
	bGrabsLabel = false;
	bGrabsSkeleton = false;
	bGrabsCalibratedVideo = false;
	bIsFrameNew = false;
}