15 #ifndef __PBMAP_PLANE_H
16 #define __PBMAP_PLANE_H
18 #include <mrpt/config.h>
26 #include <pcl/point_types.h>
27 #include <pcl/common/pca.h>
31 #define USE_COMPLETNESS_HEURISTICS 1
32 #define USE_INFERRED_STRUCTURE 1
59 bFromStructure(false),
61 polygonContourPtr(new pcl::PointCloud<pcl::PointXYZRGBA>),
62 planePointCloudPtr(new pcl::PointCloud<pcl::PointXYZRGBA>)
70 void forcePtsLayOnPlane();
76 void calcConvexHull(pcl::PointCloud<pcl::PointXYZRGBA>::Ptr &pointCloud, std::vector<size_t> &indices = DEFAULT_VECTOR );
78 void calcConvexHullandParams(pcl::PointCloud<pcl::PointXYZRGBA>::Ptr &pointCloud, std::vector<size_t> &indices = DEFAULT_VECTOR );
84 float compute2DPolygonalArea ();
88 void computeMassCenterAndArea();
93 void calcElongationAndPpalDir();
97 bool isPlaneNearby(
Plane &plane,
const float distThreshold);
101 bool isSamePlane(
Plane &plane,
const float &cosAngleThreshold,
const float &distThreshold,
const float &proxThreshold);
103 bool isSamePlane(Eigen::Matrix4f &Rt,
Plane &plane_,
const float &cosAngleThreshold,
const float &distThreshold,
const float &proxThreshold);
105 bool hasSimilarDominantColor(
Plane &plane,
const float colorThreshold);
110 void mergePlane(
Plane &plane);
111 void mergePlane2(
Plane &plane);
113 void transform(Eigen::Matrix4f &Rt);
176 void calcMainColor();
177 void calcMainColor2();
178 void calcPlaneHistH();
185 std::vector<float>
r;
186 std::vector<float>
g;
187 std::vector<float>
b;
194 std::vector<float>
c1;
195 std::vector<float>
c2;
196 std::vector<float>
c3;
197 void getPlaneC1C2C3();
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
std::vector< double > prog_area
std::string label_context
std::vector< Eigen::Vector3f > prog_Nrgb
pcl::PointCloud< pcl::PointXYZRGBA >::Ptr polygonContourPtr
The virtual base class which provides a unified interface for all persistent objects in MRPT...
A class used to store a planar feature (Plane for short).
Eigen::Vector3f v3PpalDir
Eigen::Vector3f v3colorNrgbDev
static std::vector< size_t > DEFAULT_VECTOR
Eigen::Vector3f v3colorNrgb
! Radiometric description
std::vector< Eigen::Vector3f > prog_C1C2C3
std::vector< float > prog_intensity
std::set< unsigned > nearbyPlanes
pcl::PointCloud< pcl::PointXYZRGBA >::Ptr planePointCloudPtr
std::vector< float > intensity
std::vector< double > prog_elongation
#define DEFINE_SERIALIZABLE_POST_CUSTOM_LINKAGE(class_name, _LINKAGE_)
std::map< unsigned, unsigned > neighborPlanes
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
std::vector< std::vector< float > > prog_hist_H
pcl::PointCloud< pcl::PointXYZRGBA >::Ptr outerPolygonPtr
unsigned id
! Parameters to allow the plane-based representation of the map by a graph
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_LINKAGE(class_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
std::vector< int32_t > inliers
! Convex Hull
std::vector< float > hist_H
Eigen::Vector3f v3center
! Geometric description
Eigen::Matrix4f information
unsigned nFramesAreaIsStable
Eigen::Vector3f v3colorC1C2C3