Problem with PCLHistogramVisualizer FPFH

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Problem with PCLHistogramVisualizer FPFH

Jue_KA
Hello,

I want to display the FPFH Histograms I computed with this code:

boost::shared_ptr<pcl::visualization::PCLHistogramVisualizer>
HistoVis(pcl::PointCloud<pcl::FPFHSignature33>::Ptr cloud17, int length)
{
  boost::shared_ptr<pcl::visualization::PCLHistogramVisualizer> histogram
(new pcl::visualization::PCLHistogramVisualizer);
  histogram->addFeatureHistogram (*cloud17, length, "cloud", 640, 480);
  histogram->setBackgroundColor(255, 255, 255);

  return (histogram);
}

//in main
  pcl::FPFHEstimation<pcl::PointXYZ, pcl::PointNormal, pcl::FPFHSignature33>
fpfh;
  pcl::search::KdTree<pcl::PointXYZ>::Ptr tree_fpfh (new
pcl::search::KdTree<pcl::PointXYZ>);
  pcl::PointCloud<pcl::FPFHSignature33>::Ptr fpfhFeatures (new
pcl::PointCloud<pcl::FPFHSignature33>);
  fpfh.setSearchMethod(tree_fpfh);
  fpfh.setSearchSurface(cloud_down);
  fpfh.setInputNormals(cloud_normals);
  fpfh.setInputCloud(keypoints_xyz);
  fpfh.setRadiusSearch(radius_fpfh);
  fpfh.compute(*fpfhFeatures);

Now I want to display the histogram:

  boost::shared_ptr<pcl::visualization::PCLHistogramVisualizer> histogram;
     histogram = HistoVis(fpfhFeatures,33);

The Code builds fine and as I want to run it a window pops up, disappears
and I get this error on the terminal:

ERROR: In
/build/vtk6-dmAaMa/vtk6-6.2.0+dfsg1/Rendering/OpenGL/vtkOpenGLTexture.cxx,
line 200
vtkOpenGLTexture (0x4510de0): No scalar values found for texture input!

pcl_view_3c: /usr/include/boost/smart_ptr/shared_ptr.hpp:648: typename
boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->()
const [with T = pcl::visualization::PCLVisualizer; typename
boost::detail::sp_member_access<T>::type =
pcl::visualization::PCLVisualizer*]: Assertion `px != 0' failed.
Aborted (core dumped)


Can somebody help me? I can't see a mistake in my code.





--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users