util3d::segmentObstaclesFromGround: added viewPoint argument (default 0,0,100)

This commit is contained in:
matlabbe
2016-07-04 11:47:10 -04:00
parent c2a7b2f13a
commit 02d4ca5c8b
2 changed files with 11 additions and 6 deletions
@@ -42,7 +42,8 @@ void segmentObstaclesFromGround(
int minClusterSize, int minClusterSize,
bool segmentFlatObstacles, bool segmentFlatObstacles,
float maxGroundHeight, float maxGroundHeight,
pcl::IndicesPtr * flatObstacles) pcl::IndicesPtr * flatObstacles,
const Eigen::Vector4f & viewPoint)
{ {
ground.reset(new std::vector<int>); ground.reset(new std::vector<int>);
obstacles.reset(new std::vector<int>); obstacles.reset(new std::vector<int>);
@@ -60,7 +61,7 @@ void segmentObstaclesFromGround(
groundNormalAngle, groundNormalAngle,
Eigen::Vector4f(0,0,1,0), Eigen::Vector4f(0,0,1,0),
normalKSearch, normalKSearch,
Eigen::Vector4f(0,0,100,0)); viewPoint);
if(segmentFlatObstacles) if(segmentFlatObstacles)
{ {
@@ -155,7 +156,8 @@ void segmentObstaclesFromGround(
int minClusterSize, int minClusterSize,
bool segmentFlatObstacles, bool segmentFlatObstacles,
float maxGroundHeight, float maxGroundHeight,
pcl::IndicesPtr * flatObstacles) pcl::IndicesPtr * flatObstacles,
const Eigen::Vector4f & viewPoint)
{ {
pcl::IndicesPtr indices(new std::vector<int>); pcl::IndicesPtr indices(new std::vector<int>);
segmentObstaclesFromGround<PointT>( segmentObstaclesFromGround<PointT>(
@@ -169,7 +171,8 @@ void segmentObstaclesFromGround(
minClusterSize, minClusterSize,
segmentFlatObstacles, segmentFlatObstacles,
maxGroundHeight, maxGroundHeight,
flatObstacles); flatObstacles,
viewPoint);
} }
template<typename PointT> template<typename PointT>
@@ -93,7 +93,8 @@ void segmentObstaclesFromGround(
int minClusterSize, int minClusterSize,
bool segmentFlatObstacles = false, bool segmentFlatObstacles = false,
float maxGroundHeight = 0.0f, float maxGroundHeight = 0.0f,
pcl::IndicesPtr * flatObstacles = 0); pcl::IndicesPtr * flatObstacles = 0,
const Eigen::Vector4f & viewPoint = Eigen::Vector4f(0,0,100,0));
template<typename PointT> template<typename PointT>
void segmentObstaclesFromGround( void segmentObstaclesFromGround(
const typename pcl::PointCloud<PointT>::Ptr & cloud, const typename pcl::PointCloud<PointT>::Ptr & cloud,
@@ -105,7 +106,8 @@ void segmentObstaclesFromGround(
int minClusterSize, int minClusterSize,
bool segmentFlatObstacles = false, bool segmentFlatObstacles = false,
float maxGroundHeight = 0.0f, float maxGroundHeight = 0.0f,
pcl::IndicesPtr * flatObstacles = 0); pcl::IndicesPtr * flatObstacles = 0,
const Eigen::Vector4f & viewPoint = Eigen::Vector4f(0,0,100,0));
template<typename PointT> template<typename PointT>
void occupancy2DFromGroundObstacles( void occupancy2DFromGroundObstacles(