예제 #1
0
void CurrentFrameCloudView::show (const KinfuTracker& kinfu)
{
    kinfu.getLastFrameCloud (cloud_device_);

    int c;
    cloud_device_.download (cloud_ptr_->points, c);
    cloud_ptr_->width = cloud_device_.cols ();
    cloud_ptr_->height = cloud_device_.rows ();
    cloud_ptr_->is_dense = false;

    cloud_viewer_.removeAllPointClouds ();
    cloud_viewer_.addPointCloud<PointXYZ>(cloud_ptr_);
    cloud_viewer_.spinOnce ();
}
void KinectVisualization::showCloudXYZ(const KinfuTracker& kinfu)
{
	//cout << cloud_device_xyz.cols() << endl;
	kinfu.getLastFrameCloud (cloud_device_xyz);

	int c;
	cloud_device_xyz.download (cloud_ptr_->points, c);
	cloud_ptr_->width = cloud_device_xyz.cols ();
	cloud_ptr_->height = cloud_device_xyz.rows ();
	cloud_ptr_->is_dense = false;

	//cout << cloud_ptr_->width << " " << cloud_ptr_->height << endl;
	//writeCloudFile(2, cloud_ptr_);
	cloud_viewer_xyz_.removeAllPointClouds ();
	cloud_viewer_xyz_.addPointCloud<PointXYZ>(cloud_ptr_);
}