简体   繁体   中英

How can add a 3D text on each cluster's center to show its size (number of points) using pcl

I am new in PCL.I have a mini task related to color based region growing segmentation.The goal of the task is to cluster the cloud based on color and show the cluster size or number of points contain each cluster at it's center. The clustering part I have done already but i don't know the second part. Can anyone help me ?

Thanks in advanced.

One way to achieve this would be using the pcl::visualization::PCLVisualizer and its method .addText3D()

Here's its header from the cl::visualization::PCLVisualizer Class Reference :

template<typename PointT > 
bool pcl::visualization::PCLVisualizer::addText3D   (   
        const std::string &     text,
        const PointT &      position,
        double      textScale = 1.0,
        double      r = 1.0,
        double      g = 1.0,
        double      b = 1.0,
        const std::string &     id = "",
        int     viewport = 0 
    ) 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM