EuclideanClusterExtraction fails to build index on flann

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

EuclideanClusterExtraction fails to build index on flann

Geucimar
This post was updated on .
Hi guys,

I'm trying to make a segmentation from Kinect v2 using EuclideanClusterExtraction as shown this page Cluster Extraction, but when running, I got the error below:

c:\program files\flann\include\flann\flann.hpp:140: error: Debugger
encountered an exception: Exception at 0x7ffc34a801dd, code: 0xc0000005:
read access violation at: 0x0, flags=0x0 (first chance)

on  flann.hpp when trying to run nnIndex_->buildIndex().

        pcl::search::KdTree<pcl::PointXYZ>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZ>);
        tree->setInputCloud (cloud_filtered);  //<-- THE ERROR STARTS HERE

        std::vector<pcl::PointIndices> cluster_indices;
        pcl::EuclideanClusterExtraction<pcl::PointXYZ> ec;
        ec.setClusterTolerance (0.02); // 2cm
        ec.setMinClusterSize (100);
        ec.setMaxClusterSize (25000);
        ec.setSearchMethod (tree);
        ec.setInputCloud (cloud_filtered);
        ec.extract (cluster_indices);
        clustering.setInputCloud(cloud);
        std::vector<pcl::PointIndices> clusters;
        clustering.extract(clusters);

I also tried running with table_scene_lms400.pcd but I got the same error.
Could someone help me?

I'm using:
pcl 1.8.1 + master
flann 1.9.1
Reply | Threaded
Open this post in threaded view
|

Re: EuclideanClusterExtraction fails to build index on flann

Geucimar
Could someone help me?



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: EuclideanClusterExtraction fails to build index on flann

Sérgio Agostinho
My wild guess is that you did not initialize cloud, which is a shared pointer, and set input cloud is trying to dereference a null pointer.


2017-11-14 16:24 GMT+00:00 Geucimar <[hidden email]>:
Could someone help me?


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