Skip to content

Commit

Permalink
[CLEAN] Check VISP_HAVE_PCL_FILTERS and VISP_HAVE_PCL_SEGMENTATION
Browse files Browse the repository at this point in the history
  • Loading branch information
rlagneau committed Apr 22, 2024
1 parent 15914d2 commit 2855066
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions modules/tracker/mbt/include/visp3/mbt/vpMbtFaceDepthNormal.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include <iostream>

#include <visp3/core/vpConfig.h>
#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 <pcl/point_cloud.h>
#include <pcl/point_types.h>
#endif
Expand All @@ -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
};
Expand Down Expand Up @@ -91,7 +91,7 @@ class VISP_EXPORT vpMbtFaceDepthNormal
void addLine(vpPoint &p1, vpPoint &p2, vpMbHiddenFaces<vpMbtPolygon> *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<pcl::PointXYZ>::ConstPtr &point_cloud,
vpColVector &desired_features, unsigned int stepX, unsigned int stepY
Expand Down Expand Up @@ -128,7 +128,7 @@ class VISP_EXPORT vpMbtFaceDepthNormal

void computeNormalVisibility(double nx, double ny, double nz, const vpColVector &centroid_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 &centroid_point,
pcl::PointXYZ &face_normal);
#endif
Expand Down Expand Up @@ -279,7 +279,7 @@ class VISP_EXPORT vpMbtFaceDepthNormal
//!
std::vector<PolygonLine> 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<pcl::PointXYZ>::ConstPtr &point_cloud_face,
vpColVector &desired_features, vpColVector &desired_normal,
vpColVector &centroid_point);
Expand Down Expand Up @@ -315,7 +315,7 @@ class VISP_EXPORT vpMbtFaceDepthNormal

#ifdef VISP_HAVE_NLOHMANN_JSON
#include<nlohmann/json.hpp>
#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"},
Expand Down
12 changes: 6 additions & 6 deletions modules/tracker/mbt/src/depth/vpMbtFaceDepthNormal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <visp3/mbt/vpMbtFaceDepthNormal.h>
#include <visp3/mbt/vpMbtTukeyEstimator.h>

#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 <pcl/common/centroid.h>
#include <pcl/filters/extract_indices.h>
#include <pcl/segmentation/sac_segmentation.h>
Expand Down Expand Up @@ -146,7 +146,7 @@ void vpMbtFaceDepthNormal::addLine(vpPoint &P1, vpPoint &P2, vpMbHiddenFaces<vpM
}
}

#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::computeDesiredFeatures(const vpHomogeneousMatrix &cMo, unsigned int width,
unsigned int height,
const pcl::PointCloud<pcl::PointXYZ>::ConstPtr &point_cloud,
Expand Down Expand Up @@ -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<pcl::PointXYZ>::Ptr point_cloud_face_pcl(new pcl::PointCloud<pcl::PointXYZ>);
point_cloud_face_pcl->reserve(point_cloud_face.size() / 3);
Expand Down Expand Up @@ -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<pcl::PointXYZ>::Ptr point_cloud_face_pcl(new pcl::PointCloud<pcl::PointXYZ>);
point_cloud_face_pcl->reserve(point_cloud_face.size() / 3);
Expand Down Expand Up @@ -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<pcl::PointXYZ>::ConstPtr &point_cloud_face,
vpColVector &desired_features, vpColVector &desired_normal,
vpColVector &centroid_point)
Expand Down Expand Up @@ -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 &centroid_point,
pcl::PointXYZ &face_normal)
{
Expand Down

0 comments on commit 2855066

Please sign in to comment.