5#include <SemanticObjectRelations/ShapeExtraction/util/SoftMinMax.h>
6#include <SemanticObjectRelations/Shapes.h>
14 template <
class Po
intT>
18 const std::map<uint32_t, pcl::PointIndices> segmentIndices =
20 const std::map<uint32_t, AxisAlignedBoundingBox> aabbs =
29 return ::getShapesFromAABBs<pcl::PointXYZL>(pointCloud);
35 return ::getShapesFromAABBs<pcl::PointXYZRGBL>(pointCloud);
41 semrel::ShapeList shapes;
42 shapes.reserve(segmentAABBs.size());
43 for (
const auto& [label, aabb] : segmentAABBs)
45 shapes.emplace_back(
new semrel::Box(aabb, semrel::ShapeID(label)));
52 template <
class Po
intT>
56 const std::map<uint32_t, pcl::PointIndices> segmentIndices =
59 std::map<uint32_t, AxisAlignedBoundingBox> segmentAABBs;
60 for (
const auto& [label, indices] : segmentIndices)
73 return ::getShapesFromSoftAABBs(pointCloud, outlierRatio);
80 return ::getShapesFromSoftAABBs(pointCloud, outlierRatio);
#define ARMARX_CHECK_LESS_EQUAL(lhs, rhs)
This macro evaluates whether lhs is less or equal (<=) rhs and if it turns out to be false it will th...
void checkLessEqual(float a, float b, const std::string &msg="")
semrel::ShapeList getShapesFromSoftAABBs(const pcl::PointCloud< pcl::PointXYZL > &pointCloud, float outlierRatio)
Return the AABBs of each point cloud segment in a pointCloud.
semrel::ShapeList getShapesFromAABBs(const pcl::PointCloud< pcl::PointXYZL > &pointCloud)
Get the AABBs of each point cloud segment in pointCloud.
std::map< uint32_t, semrel::AxisAlignedBoundingBox > getAABBs(const pcl::PointCloud< PointT > &pointCloud, const std::map< uint32_t, IndicesT > &segmentIndices)
Get the AABB of each point cloud segment.
semrel::AxisAlignedBoundingBox getSoftAABB(const pcl::PointCloud< PointT > &pointCloud, const pcl::PointIndices &segmentIndices, float outlierRatio)
Get the soft AABB of the given point cloud segment.
This file offers overloads of toIce() and fromIce() functions for STL container types.
This file is part of ArmarX.