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

View File

@@ -42,7 +42,8 @@ void segmentObstaclesFromGround(
int minClusterSize,
bool segmentFlatObstacles,
float maxGroundHeight,
pcl::IndicesPtr * flatObstacles)
pcl::IndicesPtr * flatObstacles,
const Eigen::Vector4f & viewPoint)
{
ground.reset(new std::vector<int>);
obstacles.reset(new std::vector<int>);
@@ -60,7 +61,7 @@ void segmentObstaclesFromGround(
groundNormalAngle,
Eigen::Vector4f(0,0,1,0),
normalKSearch,
Eigen::Vector4f(0,0,100,0));
viewPoint);
if(segmentFlatObstacles)
{
@@ -155,7 +156,8 @@ void segmentObstaclesFromGround(
int minClusterSize,
bool segmentFlatObstacles,
float maxGroundHeight,
pcl::IndicesPtr * flatObstacles)
pcl::IndicesPtr * flatObstacles,
const Eigen::Vector4f & viewPoint)
{
pcl::IndicesPtr indices(new std::vector<int>);
segmentObstaclesFromGround<PointT>(
@@ -169,7 +171,8 @@ void segmentObstaclesFromGround(
minClusterSize,
segmentFlatObstacles,
maxGroundHeight,
flatObstacles);
flatObstacles,
viewPoint);
}
template<typename PointT>

View File

@@ -93,7 +93,8 @@ void segmentObstaclesFromGround(
int minClusterSize,
bool segmentFlatObstacles = false,
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>
void segmentObstaclesFromGround(
const typename pcl::PointCloud<PointT>::Ptr & cloud,
@@ -105,7 +106,8 @@ void segmentObstaclesFromGround(
int minClusterSize,
bool segmentFlatObstacles = false,
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>
void occupancy2DFromGroundObstacles(