SHOTColor error

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

SHOTColor error

This post has NOT been accepted by the mailing list yet.
Hi every body,

I would like to modify the implementation of SHOT descriptor to SHOTColor. This is a code:

#include <pcl/io/pcd_io.h>
#include <pcl/features/normal_3d.h>
#include <pcl/features/shot.h>
main(int argc, char** argv)

        // Object for storing the point cloud.
        pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
        // Object for storing the normals.
        pcl::PointCloud<pcl::Normal>::Ptr normals(new pcl::PointCloud<pcl::Normal>);
        // Object for storing the SHOT descriptors for each point.
        pcl::PointCloud<pcl::SHOT1344>::Ptr descriptors(new pcl::PointCloud<pcl::SHOT1344>());

        // Read a PCD file from disk.
        if (pcl::io::loadPCDFile<pcl::PointXYZ>(argv[1], *cloud) != 0)
                return -1;

        // Note: you would usually perform downsampling now. It has been omitted here
        // for simplicity, but be aware that computation can take a long time.
        // Estimate the normals.
        pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> normalEstimation;
        pcl::search::KdTree<pcl::PointXYZ>::Ptr kdtree(new pcl::search::KdTree<pcl::PointXYZ>);

        // SHOT estimation object.
        pcl::SHOTColorEstimation<pcl::PointXYZ, pcl::Normal, pcl::SHOT1344> shot;
        // The radius that defines which of the keypoint's neighbors are described.
        // If too large, there may be clutter, and if too small, not enough points may be found.


std::cout << "output points.size (): " << descriptors->points.size () << std::endl;
  return 0;

And i found this error
[100%] Building CXX object CMakeFiles/computeSHOT.dir/src/PCL_SHOT.cpp.o
Linking CXX executable computeSHOT
CMakeFiles/computeSHOT.dir/src/PCL_SHOT.cpp.o:(.rodata._ZTVN3pcl19SHOTColorEstimationINS_8PointXYZENS_6NormalENS_8SHOT1344ENS_14ReferenceFrameEEE[_ZTVN3pcl19SHOTColorEstimationINS_8PointXYZENS_6NormalENS_8SHOT1344ENS_14ReferenceFrameEEE]+0x58): référence indéfinie vers « pcl::SHOTColorEstimation<pcl::PointXYZ, pcl::Normal, pcl::SHOT1344, pcl::ReferenceFrame>::computeFeature(pcl::PointCloud<pcl::SHOT1344>&) »
CMakeFiles/computeSHOT.dir/src/PCL_SHOT.cpp.o:(.rodata._ZTVN3pcl19SHOTColorEstimationINS_8PointXYZENS_6NormalENS_8SHOT1344ENS_14ReferenceFrameEEE[_ZTVN3pcl19SHOTColorEstimationINS_8PointXYZENS_6NormalENS_8SHOT1344ENS_14ReferenceFrameEEE]+0x60): référence indéfinie vers « pcl::SHOTColorEstimation<pcl::PointXYZ, pcl::Normal, pcl::SHOT1344, pcl::ReferenceFrame>::computePointSHOT(int, std::vector<int, std::allocator<int> > const&, std::vector<float, std::allocator<float> > const&, Eigen::Matrix<float, -1, 1, 0, -1, 1>&) »
collect2: error: ld returned 1 exit status
make[2]: *** [computeSHOT] Erreur 1
make[1]: *** [CMakeFiles/computeSHOT.dir/all] Erreur 2
make: *** [all] Erreur 2

Can you help me please.
Thank you at advance.