提交 30b28d7f 编写于 作者: K Koen Buys

* updated @pcl::search:OrganizedNeighbor@ to be back functional, radiusSearch...

* updated @pcl::search:OrganizedNeighbor@ to be back functional, radiusSearch is working back, 4-6x faster then KdTree, Knearest still need to implement this

git-svn-id: svn+ssh://svn.pointclouds.org/pcl/trunk@3215 a9d63959-f2ad-4865-b262-bf0e56cfafb6
上级 68375dda
......@@ -306,7 +306,9 @@ namespace pcl
*/
inline void setSearchMethod (const KdTreePtr &tree) { tree_ = tree; }
/** \brief Get a pointer to the search method used. */
/** \brief Get a pointer to the search method used.
* @todo fix this for a generic search tree
*/
inline KdTreePtr getSearchMethod () { return (tree_); }
/** \brief Set the spatial cluster tolerance as a measure in the L2 Euclidean space
......
......@@ -110,6 +110,7 @@ pcl::extractEuclideanClusters (const PointCloud<PointT> &cloud,
}
//////////////////////////////////////////////////////////////////////////////////////////////
/** @todo: fix the return value, make sure the exit is not needed anymore*/
template <typename PointT> void
pcl::extractEuclideanClusters (const PointCloud<PointT> &cloud,
const std::vector<int> &indices,
......@@ -151,7 +152,13 @@ pcl::extractEuclideanClusters (const PointCloud<PointT> &cloud,
while (sq_idx < (int)seed_queue.size ())
{
// Search for sq_idx
if (!tree->radiusSearch (seed_queue[sq_idx], tolerance, nn_indices, nn_distances))
int ret = tree->radiusSearch (seed_queue[sq_idx], tolerance, nn_indices, nn_distances);
if( ret == -1)
{
PCL_ERROR("[pcl::extractEuclideanClusters] Received error code -1 from radiusSearch\n");
exit(0);
}
if (!ret)
{
sq_idx++;
continue;
......
......@@ -31,7 +31,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* $id $
*/
#ifndef PCL_SEGMENTATION_IMPL_EXTRACT_LABELED_CLUSTERS_H_
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册