您的位置:首页 >PCL Windows安装后测试代码详解
发布于2025-11-17 阅读(0)
扫一扫,手机访问
using namespace std;
int main(int argc, char** argv)
{
pcl::PointCloud
for (float z(-1.0); z <= 1.0; z += 0.05)
{
for (float angle(0.0); angle <= 360.0; angle += 5.0)
{
pcl::PointXYZRGB point;
point.x = 0.5 * cosf(pcl::deg2rad(angle));
point.y = sinf(pcl::deg2rad(angle));
point.z = z;
uint32_t rgb = (static_cast<uint32_t>(r) << 16 |
static_cast<uint32_t>(g) << 8 |
static_cast<uint32_t>(b));
point.rgb = *reinterpret_cast<float*>(&rgb);
point_cloud_ptr->points.push_back(point);
}
if (z < 1.0)
{
r -= 10;
g += 10;
}
}
point_cloud_ptr->width = static_cast<uint32_t>(point_cloud_ptr->points.size());
point_cloud_ptr->height = 1;
pcl::visualization::CloudViewer viewer("result");
viewer.showCloud(point_cloud_ptr);
while (!viewer.wasStopped()) {}
return 0;
}
![[C++][PCL]pcl在windows上安装后测试代码2](/uploads/20251117/176335003441586.jpg)
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
正版软件
正版软件
正版软件
正版软件
正版软件
1
2
3
4
5
6
7
8
9