A class used to store a planar feature (Plane for short).
It is described with geometric features representing the shape and relative location of the patch (area, normal vector, elongation, 3D-convex hull, etc.) and radiometric features (the most representative color).
#include <mrpt/pbmap/Plane.h>
Public Member Functions | |
Plane () | |
void | forcePtsLayOnPlane () |
void | calcConvexHull (pcl::PointCloud< pcl::PointXYZRGBA >::Ptr &pointCloud, std::vector< size_t > &indices=DEFAULT_VECTOR) |
! Calculate the plane's convex hull with the monotone chain algorithm. | |
void | calcConvexHullandParams (pcl::PointCloud< pcl::PointXYZRGBA >::Ptr &pointCloud, std::vector< size_t > &indices=DEFAULT_VECTOR) |
float | compute2DPolygonalArea () |
Compute the area of a 2D planar polygon patch - using a given normal. | |
void | computeMassCenterAndArea () |
Compute the patch's convex-hull area and mass center. | |
void | calcElongationAndPpalDir () |
bool | isPlaneNearby (Plane &plane, const float distThreshold) |
bool | isSamePlane (Plane &plane, const float &cosAngleThreshold, const float &distThreshold, const float &proxThreshold) |
bool | isSamePlane (Eigen::Matrix4f &Rt, Plane &plane_, const float &cosAngleThreshold, const float &distThreshold, const float &proxThreshold) |
bool | hasSimilarDominantColor (Plane &plane, const float colorThreshold) |
void | mergePlane (Plane &plane) |
void | mergePlane2 (Plane &plane) |
void | transform (Eigen::Matrix4f &Rt) |
void | calcMainColor () |
void | calcMainColor2 () |
void | calcPlaneHistH () |
Public Attributes | |
unsigned | id |
! Parameters to allow the plane-based representation of the map by a graph | |
unsigned | numObservations |
unsigned | semanticGroup |
std::set< unsigned > | nearbyPlanes |
std::map< unsigned, unsigned > | neighborPlanes |
std::string | label |
std::string | label_object |
std::string | label_context |
Eigen::Vector3f | v3center |
! Geometric description | |
Eigen::Vector3f | v3normal |
float | d |
Eigen::Matrix4f | information |
float | curvature |
Eigen::Vector3f | v3PpalDir |
float | elongation |
float | areaVoxels |
float | areaHull |
bool | bFullExtent |
bool | bFromStructure |
unsigned | nFramesAreaIsStable |
Eigen::Vector3f | v3colorNrgb |
! Radiometric description | |
float | dominantIntensity |
bool | bDominantColor |
Eigen::Vector3f | v3colorNrgbDev |
Eigen::Vector3f | v3colorC1C2C3 |
std::vector< float > | hist_H |
std::vector< double > | prog_area |
std::vector< double > | prog_elongation |
std::vector< Eigen::Vector3f > | prog_C1C2C3 |
std::vector< Eigen::Vector3f > | prog_Nrgb |
std::vector< float > | prog_intensity |
std::vector< std::vector< float > > | prog_hist_H |
std::vector< int32_t > | inliers |
! Convex Hull | |
pcl::PointCloud< pcl::PointXYZRGBA >::Ptr | polygonContourPtr |
pcl::PointCloud< pcl::PointXYZRGBA >::Ptr | outerPolygonPtr |
pcl::PointCloud< pcl::PointXYZRGBA >::Ptr | planePointCloudPtr |
Protected Member Functions | |
CSerializable virtual methods | |
void | writeToStream (mrpt::utils::CStream &out, int *getVersion) const MRPT_OVERRIDE |
void | readFromStream (mrpt::utils::CStream &in, int version) MRPT_OVERRIDE |
Private Member Functions | |
void | getPlaneNrgb () |
void | getPlaneC1C2C3 () |
Private Attributes | |
std::vector< float > | r |
std::vector< float > | g |
std::vector< float > | b |
std::vector< float > | intensity |
std::vector< float > | c1 |
std::vector< float > | c2 |
std::vector< float > | c3 |
RTTI stuff <br> | |
typedef PlanePtr | SmartPtr |
static mrpt::utils::CLASSINIT | _init_Plane |
static mrpt::utils::TRuntimeClassId | classPlane |
static const mrpt::utils::TRuntimeClassId * | classinfo |
static const mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const MRPT_OVERRIDE |
virtual mrpt::utils::CObject * | duplicate () const MRPT_OVERRIDE |
static mrpt::utils::CObject * | CreateObject () |
static PlanePtr | Create () |
typedef PlanePtr mrpt::pbmap::Plane::SmartPtr |
|
staticprotected |
void mrpt::pbmap::Plane::calcConvexHull | ( | pcl::PointCloud< pcl::PointXYZRGBA >::Ptr & | pointCloud, |
std::vector< size_t > & | indices = DEFAULT_VECTOR |
||
) |
! Calculate the plane's convex hull with the monotone chain algorithm.
void mrpt::pbmap::Plane::calcConvexHullandParams | ( | pcl::PointCloud< pcl::PointXYZRGBA >::Ptr & | pointCloud, |
std::vector< size_t > & | indices = DEFAULT_VECTOR |
||
) |
void mrpt::pbmap::Plane::calcElongationAndPpalDir | ( | ) |
Calculate plane's elongation and principal direction
void mrpt::pbmap::Plane::calcMainColor | ( | ) |
Calculate plane's main color using "MeanShift" method
void mrpt::pbmap::Plane::calcMainColor2 | ( | ) |
void mrpt::pbmap::Plane::calcPlaneHistH | ( | ) |
float mrpt::pbmap::Plane::compute2DPolygonalArea | ( | ) |
Compute the area of a 2D planar polygon patch - using a given normal.
polygonContourPtr | the point cloud (planar) |
normal | the plane normal |
void mrpt::pbmap::Plane::computeMassCenterAndArea | ( | ) |
Compute the patch's convex-hull area and mass center.
|
static |
|
static |
|
virtual |
void mrpt::pbmap::Plane::forcePtsLayOnPlane | ( | ) |
Force the plane inliers to lay on the plane
|
private |
|
private |
Calculate plane's main color in normalized rgb space
|
virtual |
bool mrpt::pbmap::Plane::hasSimilarDominantColor | ( | Plane & | plane, |
const float | colorThreshold | ||
) |
bool mrpt::pbmap::Plane::isPlaneNearby | ( | Plane & | plane, |
const float | distThreshold | ||
) |
Returns true when the closest distance between the patches "this" and "plane" is under distThreshold.
bool mrpt::pbmap::Plane::isSamePlane | ( | Eigen::Matrix4f & | Rt, |
Plane & | plane_, | ||
const float & | cosAngleThreshold, | ||
const float & | distThreshold, | ||
const float & | proxThreshold | ||
) |
bool mrpt::pbmap::Plane::isSamePlane | ( | Plane & | plane, |
const float & | cosAngleThreshold, | ||
const float & | distThreshold, | ||
const float & | proxThreshold | ||
) |
Returns true if the two input planes represent the same physical surface for some given angle and distance thresholds. If the planes are the same they are merged in this and the function returns true. Otherwise it returns false.
void mrpt::pbmap::Plane::mergePlane | ( | Plane & | plane | ) |
Merge the two input patches into "updatePlane". Recalculate center, normal vector, area, inlier points (filtered), convex hull, etc.
void mrpt::pbmap::Plane::mergePlane2 | ( | Plane & | plane | ) |
|
protected |
void mrpt::pbmap::Plane::transform | ( | Eigen::Matrix4f & | Rt | ) |
|
protected |
|
staticprotected |
|
private |
|
static |
|
static |
unsigned mrpt::pbmap::Plane::id |
std::vector<int32_t> mrpt::pbmap::Plane::inliers |
std::string mrpt::pbmap::Plane::label |
std::map<unsigned,unsigned> mrpt::pbmap::Plane::neighborPlanes |
pcl::PointCloud<pcl::PointXYZRGBA>::Ptr mrpt::pbmap::Plane::outerPolygonPtr |
pcl::PointCloud<pcl::PointXYZRGBA>::Ptr mrpt::pbmap::Plane::planePointCloudPtr |
pcl::PointCloud<pcl::PointXYZRGBA>::Ptr mrpt::pbmap::Plane::polygonContourPtr |
std::vector<Eigen::Vector3f> mrpt::pbmap::Plane::prog_C1C2C3 |
std::vector<std::vector<float> > mrpt::pbmap::Plane::prog_hist_H |
Eigen::Vector3f mrpt::pbmap::Plane::v3center |
Eigen::Vector3f mrpt::pbmap::Plane::v3colorNrgb |
Page generated by Doxygen 1.9.6 for MRPT 1.4.0 SVN: at Fri Jan 20 00:13:14 UTC 2023 |