diff --git a/modules/tracker/mbt/include/visp3/mbt/vpMbtFaceDepthNormal.h b/modules/tracker/mbt/include/visp3/mbt/vpMbtFaceDepthNormal.h index 388de1570c..6efddf40a6 100644 --- a/modules/tracker/mbt/include/visp3/mbt/vpMbtFaceDepthNormal.h +++ b/modules/tracker/mbt/include/visp3/mbt/vpMbtFaceDepthNormal.h @@ -39,7 +39,7 @@ #include #include -#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_COMMON) +#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_COMMON) && defined(VISP_HAVE_PCL_SEGMENTATION) && defined(VISP_HAVE_PCL_FILTERS) #include #include #endif @@ -63,7 +63,7 @@ class VISP_EXPORT vpMbtFaceDepthNormal { ROBUST_FEATURE_ESTIMATION = 0, ROBUST_SVD_PLANE_ESTIMATION = 1, -#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_COMMON) +#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_COMMON) && defined(VISP_HAVE_PCL_SEGMENTATION) && defined(VISP_HAVE_PCL_FILTERS) PCL_PLANE_ESTIMATION = 2 #endif }; @@ -91,7 +91,7 @@ class VISP_EXPORT vpMbtFaceDepthNormal void addLine(vpPoint &p1, vpPoint &p2, vpMbHiddenFaces *const faces, vpUniRand &rand_gen, int polygon = -1, std::string name = ""); -#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_COMMON) +#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_COMMON) && defined(VISP_HAVE_PCL_SEGMENTATION) && defined(VISP_HAVE_PCL_FILTERS) bool computeDesiredFeatures(const vpHomogeneousMatrix &cMo, unsigned int width, unsigned int height, const pcl::PointCloud::ConstPtr &point_cloud, vpColVector &desired_features, unsigned int stepX, unsigned int stepY @@ -128,7 +128,7 @@ class VISP_EXPORT vpMbtFaceDepthNormal void computeNormalVisibility(double nx, double ny, double nz, const vpColVector ¢roid_point, vpColVector &face_normal); -#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_COMMON) +#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_COMMON) && defined(VISP_HAVE_PCL_SEGMENTATION) && defined(VISP_HAVE_PCL_FILTERS) void computeNormalVisibility(float nx, float ny, float nz, const pcl::PointXYZ ¢roid_point, pcl::PointXYZ &face_normal); #endif @@ -279,7 +279,7 @@ class VISP_EXPORT vpMbtFaceDepthNormal //! std::vector m_polygonLines; -#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_COMMON) +#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_COMMON) && defined(VISP_HAVE_PCL_SEGMENTATION) && defined(VISP_HAVE_PCL_FILTERS) bool computeDesiredFeaturesPCL(const pcl::PointCloud::ConstPtr &point_cloud_face, vpColVector &desired_features, vpColVector &desired_normal, vpColVector ¢roid_point); @@ -315,7 +315,7 @@ class VISP_EXPORT vpMbtFaceDepthNormal #ifdef VISP_HAVE_NLOHMANN_JSON #include -#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_COMMON) +#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_COMMON) && defined(VISP_HAVE_PCL_SEGMENTATION) && defined(VISP_HAVE_PCL_FILTERS) NLOHMANN_JSON_SERIALIZE_ENUM(vpMbtFaceDepthNormal::vpFeatureEstimationType, { {vpMbtFaceDepthNormal::ROBUST_FEATURE_ESTIMATION, "robust"}, {vpMbtFaceDepthNormal::ROBUST_SVD_PLANE_ESTIMATION, "robustSVD"}, diff --git a/modules/tracker/mbt/src/depth/vpMbtFaceDepthNormal.cpp b/modules/tracker/mbt/src/depth/vpMbtFaceDepthNormal.cpp index 810c63d355..ad726e3af1 100644 --- a/modules/tracker/mbt/src/depth/vpMbtFaceDepthNormal.cpp +++ b/modules/tracker/mbt/src/depth/vpMbtFaceDepthNormal.cpp @@ -37,7 +37,7 @@ #include #include -#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_COMMON) +#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_SEGMENTATION) && defined(VISP_HAVE_PCL_FILTERS) && defined(VISP_HAVE_PCL_COMMON) #include #include #include @@ -146,7 +146,7 @@ void vpMbtFaceDepthNormal::addLine(vpPoint &P1, vpPoint &P2, vpMbHiddenFaces::ConstPtr &point_cloud, @@ -443,7 +443,7 @@ bool vpMbtFaceDepthNormal::computeDesiredFeatures(const vpHomogeneousMatrix &cMo // Face centroid computed by the different methods vpColVector centroid_point(3); -#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_COMMON) +#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_SEGMENTATION) && defined(VISP_HAVE_PCL_FILTERS) && defined(VISP_HAVE_PCL_COMMON) if (m_featureEstimationMethod == PCL_PLANE_ESTIMATION) { pcl::PointCloud::Ptr point_cloud_face_pcl(new pcl::PointCloud); point_cloud_face_pcl->reserve(point_cloud_face.size() / 3); @@ -604,7 +604,7 @@ bool vpMbtFaceDepthNormal::computeDesiredFeatures(const vpHomogeneousMatrix &cMo // Face centroid computed by the different methods vpColVector centroid_point(3); -#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_COMMON) +#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_SEGMENTATION) && defined(VISP_HAVE_PCL_FILTERS) && defined(VISP_HAVE_PCL_COMMON) if (m_featureEstimationMethod == PCL_PLANE_ESTIMATION) { pcl::PointCloud::Ptr point_cloud_face_pcl(new pcl::PointCloud); point_cloud_face_pcl->reserve(point_cloud_face.size() / 3); @@ -635,7 +635,7 @@ bool vpMbtFaceDepthNormal::computeDesiredFeatures(const vpHomogeneousMatrix &cMo return true; } -#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_COMMON) +#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_SEGMENTATION) && defined(VISP_HAVE_PCL_FILTERS) && defined(VISP_HAVE_PCL_COMMON) bool vpMbtFaceDepthNormal::computeDesiredFeaturesPCL(const pcl::PointCloud::ConstPtr &point_cloud_face, vpColVector &desired_features, vpColVector &desired_normal, vpColVector ¢roid_point) @@ -991,7 +991,7 @@ void vpMbtFaceDepthNormal::computeNormalVisibility(double nx, double ny, double } } -#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_COMMON) +#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_SEGMENTATION) && defined(VISP_HAVE_PCL_FILTERS) && defined(VISP_HAVE_PCL_COMMON) void vpMbtFaceDepthNormal::computeNormalVisibility(float nx, float ny, float nz, const pcl::PointXYZ ¢roid_point, pcl::PointXYZ &face_normal) {