Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/162.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ PCL和CMake问题:链接时未定义StatisticaLoutlierRemoving_C++_C++11_Cmake_Point Cloud Library - Fatal编程技术网

C++ PCL和CMake问题:链接时未定义StatisticaLoutlierRemoving

C++ PCL和CMake问题:链接时未定义StatisticaLoutlierRemoving,c++,c++11,cmake,point-cloud-library,C++,C++11,Cmake,Point Cloud Library,我目前正在尝试使用PCL过滤点云,这要感谢没有使用ROS的StatisticaLoutlierRemove,只使用我通过安装的PCL。我在代码中使用了,链接时出现以下错误: CMakeFiles/tests/11_pcl/removeOutliers.dir/removeOutliers.cpp.o: In function `pcl::StatisticalOutlierRemoval<pcl::PointXYZRGB>::applyFilter(std::vector<in

我目前正在尝试使用PCL过滤点云,这要感谢没有使用ROS的StatisticaLoutlierRemove,只使用我通过安装的PCL。我在代码中使用了,链接时出现以下错误:

CMakeFiles/tests/11_pcl/removeOutliers.dir/removeOutliers.cpp.o: In function `pcl::StatisticalOutlierRemoval<pcl::PointXYZRGB>::applyFilter(std::vector<int, std::allocator<int> >&)':
removeOutliers.cpp:(.text._ZN3pcl25StatisticalOutlierRemovalINS_11PointXYZRGBEE11applyFilterERSt6vectorIiSaIiEE[_ZN3pcl25StatisticalOutlierRemovalINS_11PointXYZRGBEE11applyFilterERSt6vectorIiSaIiEE]+0x1): undefined reference to `pcl::StatisticalOutlierRemoval<pcl::PointXYZRGB>::applyFilterIndices(std::vector<int, std::allocator<int> >&)'
CMakeFiles/tests/11_pcl/removeOutliers.dir/removeOutliers.cpp.o:(.rodata._ZTVN3pcl25StatisticalOutlierRemovalINS_11PointXYZRGBEEE[_ZTVN3pcl25StatisticalOutlierRemovalINS_11PointXYZRGBEEE]+0x48): undefined reference to `pcl::StatisticalOutlierRemoval<pcl::PointXYZRGB>::applyFilter(pcl::PointCloud<pcl::PointXYZRGB>&)'
以及:

在我的cpp文件中,我仅尝试使用以下方法初始化异常值删除:

pcl::StatisticalOutlierRemoval<pcl::PointXYZRGB> sor;
pcl::statisticaloutliersor;
我有以下标题:

#include <pcl/common/common_headers.h>
#include <pcl/features/normal_3d.h>
#include <pcl/io/pcd_io.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/console/parse.h>

//Filters
#include <pcl/point_types.h>
#include <pcl/filters/statistical_outlier_removal.h>
#包括
#包括
#包括
#包括
#包括
//过滤器
#包括
#包括

我想我的PCL中可能缺少一个组件。。。有什么想法吗?

好的,我找到了解决办法。我实际上在PCL(过滤器)中缺少一个组件


现在一切正常。

好的,我找到了解决办法。我实际上在PCL(过滤器)中缺少一个组件

现在一切都很好

pcl::StatisticalOutlierRemoval<pcl::PointXYZRGB> sor;
#include <pcl/common/common_headers.h>
#include <pcl/features/normal_3d.h>
#include <pcl/io/pcd_io.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/console/parse.h>

//Filters
#include <pcl/point_types.h>
#include <pcl/filters/statistical_outlier_removal.h>
find_package(PCL 1.3 REQUIRED COMPONENTS common io visualization filters)