You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the method on the official website, a pointer error occurred at the end of the calculation, but the relevant descriptors have already been calculated!!!!!
Expression: _CrtlsValidHeapPointer(block)
{
pcl::PointCloudpcl::PointXYZ::Ptr cloud (new pcl::PointCloudpcl::PointXYZ);
pcl::PointCloudpcl::Normal::Ptr normals (new pcl::PointCloudpcl::Normal ());
... read, pass in or create a point cloud with normals ...
... (note: you can create a single PointCloud if you want) ...
// Create the PFH estimation class, and pass the input dataset+normals to it
pcl::PFHEstimation<pcl::PointXYZ, pcl::Normal, pcl::PFHSignature125> pfh;
pfh.setInputCloud (cloud);
pfh.setInputNormals (normals);
// alternatively, if cloud is of tpe PointNormal, do pfh.setInputNormals (cloud);
// Create an empty kdtree representation, and pass it to the PFH estimation object.
// Its content will be filled inside the object, based on the given input dataset (as no other search surface is given).
pcl::search::KdTreepcl::PointXYZ::Ptr tree (new pcl::search::KdTreepcl::PointXYZ ());
//pcl::KdTreeFLANNpcl::PointXYZ::Ptr tree (new pcl::KdTreeFLANNpcl::PointXYZ ()); -- older call for PCL 1.5-
pfh.setSearchMethod (tree);
// Output datasets
pcl::PointCloudpcl::PFHSignature125::Ptr pfhs (new pcl::PointCloudpcl::PFHSignature125 ());
// Use all neighbors in a sphere of radius 5cm
// IMPORTANT: the radius used here has to be larger than the radius used to estimate the surface normals!!!
pfh.setRadiusSearch (0.05);
// Compute the features
pfh.compute (pfhs);
// pfhs->size () should have the same size as the input cloud->size ()
}
The text was updated successfully, but these errors were encountered:
Which compiler do you use? Do you use CMake?
The compiler we use is the Microsoft MSVC compiler and does not use cmake.
You marked this as a "compile error". Does the problem really happen during compilation, or does it happen when you run the program?
It's not a compilation error, it's a runtime error that throws an error “Expression: _CrtlsValidHeapPointer(block)” after the “pfh.compute (pfhs);” finishes running.
Did you enable AVX and/or AVX2 for the compilation of the code? We usually highly recommend using CMake because it automatically handles these options.
Using the method on the official website, a pointer error occurred at the end of the calculation, but the relevant descriptors have already been calculated!!!!!
Expression: _CrtlsValidHeapPointer(block)
#include <pcl/point_types.h>
#include <pcl/features/pfh.h>
{
pcl::PointCloudpcl::PointXYZ::Ptr cloud (new pcl::PointCloudpcl::PointXYZ);
pcl::PointCloudpcl::Normal::Ptr normals (new pcl::PointCloudpcl::Normal ());
... read, pass in or create a point cloud with normals ...
... (note: you can create a single PointCloud if you want) ...
// Create the PFH estimation class, and pass the input dataset+normals to it
pcl::PFHEstimation<pcl::PointXYZ, pcl::Normal, pcl::PFHSignature125> pfh;
pfh.setInputCloud (cloud);
pfh.setInputNormals (normals);
// alternatively, if cloud is of tpe PointNormal, do pfh.setInputNormals (cloud);
// Create an empty kdtree representation, and pass it to the PFH estimation object.
// Its content will be filled inside the object, based on the given input dataset (as no other search surface is given).
pcl::search::KdTreepcl::PointXYZ::Ptr tree (new pcl::search::KdTreepcl::PointXYZ ());
//pcl::KdTreeFLANNpcl::PointXYZ::Ptr tree (new pcl::KdTreeFLANNpcl::PointXYZ ()); -- older call for PCL 1.5-
pfh.setSearchMethod (tree);
// Output datasets
pcl::PointCloudpcl::PFHSignature125::Ptr pfhs (new pcl::PointCloudpcl::PFHSignature125 ());
// Use all neighbors in a sphere of radius 5cm
// IMPORTANT: the radius used here has to be larger than the radius used to estimate the surface normals!!!
pfh.setRadiusSearch (0.05);
// Compute the features
pfh.compute (pfhs);
// pfhs->size () should have the same size as the input cloud->size ()
}
The text was updated successfully, but these errors were encountered: