SHOTColor error

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SHOTColor error

nabila
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>
int
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.
time.tic();
        // Estimate the normals.
        pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> normalEstimation;
        normalEstimation.setInputCloud(cloud);
        normalEstimation.setRadiusSearch(0.03);
        pcl::search::KdTree<pcl::PointXYZ>::Ptr kdtree(new pcl::search::KdTree<pcl::PointXYZ>);
        normalEstimation.setSearchMethod(kdtree);
        normalEstimation.compute(*normals);

        // SHOT estimation object.
        pcl::SHOTColorEstimation<pcl::PointXYZ, pcl::Normal, pcl::SHOT1344> shot;
        shot.setInputCloud(cloud);
        shot.setInputNormals(normals);
        // 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.
        shot.setRadiusSearch(0.02);

        shot.compute(*descriptors);

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.
Reply | Threaded
Open this post in threaded view
|

Re: SHOTColor error

Ber461
Please see my answer in the PCL users maillist:

http://www.pcl-users.org/SHOTColor-error-td4038279.html

Sidenote to admins: I think we should place a big, red, flashing banner at the top of the page saying "This list is for PCL development stuff only! To get support go to www.pcl-users.org"