#include iostream#include pcliopcd_ioh#include pclpoint_typesh#include pclfiltersvoxel_gridh#include pclfiltersstatistical_outlier_removalh#include pclvisualizationpcl_visualizerh#include pclfeaturesn
这段代码有几个问题导致程序退出线程:
-
缺少头文件cmath:添加#include
以包含数学函数库。 -
缺少命名空间std:在main函数开始之前添加using namespace std;语句。
-
使用M_PI常量:如果编译器不支持M_PI常量的定义,可以手动定义它。在main函数开始之前添加#define M_PI 3.14159265358979323846。
-
霍夫空间的尺寸问题:在创建houghSpace时,将thetaRes、phiRes和rhoRes的值改为180。
经过这些修改,代码应该可以正常运行。
原文地址: https://www.cveoy.top/t/topic/hN3x 著作权归作者所有。请勿转载和采集!