Main MRPT website > C++ reference for MRPT 1.4.0
List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
mrpt::pbmap::Plane Class Reference

Detailed Description

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).

Definition at line 48 of file Plane.h.

#include <mrpt/pbmap/Plane.h>

Inheritance diagram for mrpt::pbmap::Plane:
Inheritance graph

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_tinliers
 ! 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::TRuntimeClassIdclassinfo
 
static const mrpt::utils::TRuntimeClassId_GetBaseClass ()
 
virtual const mrpt::utils::TRuntimeClassIdGetRuntimeClass () const MRPT_OVERRIDE
 
virtual mrpt::utils::CObjectduplicate () const MRPT_OVERRIDE
 
static mrpt::utils::CObjectCreateObject ()
 
static PlanePtr Create ()
 

Member Typedef Documentation

◆ SmartPtr

A typedef for the associated smart pointer

Definition at line 51 of file Plane.h.

Constructor & Destructor Documentation

◆ Plane()

mrpt::pbmap::Plane::Plane ( )
inline

Definition at line 54 of file Plane.h.

Member Function Documentation

◆ _GetBaseClass()

static const mrpt::utils::TRuntimeClassId * mrpt::pbmap::Plane::_GetBaseClass ( )
staticprotected

◆ calcConvexHull()

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.

◆ calcConvexHullandParams()

void mrpt::pbmap::Plane::calcConvexHullandParams ( pcl::PointCloud< pcl::PointXYZRGBA >::Ptr &  pointCloud,
std::vector< size_t > &  indices = DEFAULT_VECTOR 
)

◆ calcElongationAndPpalDir()

void mrpt::pbmap::Plane::calcElongationAndPpalDir ( )

Calculate plane's elongation and principal direction

◆ calcMainColor()

void mrpt::pbmap::Plane::calcMainColor ( )

Calculate plane's main color using "MeanShift" method

◆ calcMainColor2()

void mrpt::pbmap::Plane::calcMainColor2 ( )

◆ calcPlaneHistH()

void mrpt::pbmap::Plane::calcPlaneHistH ( )

◆ compute2DPolygonalArea()

float mrpt::pbmap::Plane::compute2DPolygonalArea ( )

Compute the area of a 2D planar polygon patch - using a given normal.

Parameters
polygonContourPtrthe point cloud (planar)
normalthe plane normal

◆ computeMassCenterAndArea()

void mrpt::pbmap::Plane::computeMassCenterAndArea ( )

Compute the patch's convex-hull area and mass center.

◆ Create()

static PlanePtr mrpt::pbmap::Plane::Create ( )
static

◆ CreateObject()

static mrpt::utils::CObject * mrpt::pbmap::Plane::CreateObject ( )
static

◆ duplicate()

virtual mrpt::utils::CObject * mrpt::pbmap::Plane::duplicate ( ) const
virtual

◆ forcePtsLayOnPlane()

void mrpt::pbmap::Plane::forcePtsLayOnPlane ( )

Force the plane inliers to lay on the plane

◆ getPlaneC1C2C3()

void mrpt::pbmap::Plane::getPlaneC1C2C3 ( )
private

◆ getPlaneNrgb()

void mrpt::pbmap::Plane::getPlaneNrgb ( )
private

Calculate plane's main color in normalized rgb space

◆ GetRuntimeClass()

virtual const mrpt::utils::TRuntimeClassId * mrpt::pbmap::Plane::GetRuntimeClass ( ) const
virtual

◆ hasSimilarDominantColor()

bool mrpt::pbmap::Plane::hasSimilarDominantColor ( Plane plane,
const float  colorThreshold 
)

◆ isPlaneNearby()

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.

◆ isSamePlane() [1/2]

bool mrpt::pbmap::Plane::isSamePlane ( Eigen::Matrix4f &  Rt,
Plane plane_,
const float &  cosAngleThreshold,
const float &  distThreshold,
const float &  proxThreshold 
)

◆ isSamePlane() [2/2]

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.

◆ mergePlane()

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.

◆ mergePlane2()

void mrpt::pbmap::Plane::mergePlane2 ( Plane plane)

◆ readFromStream()

void mrpt::pbmap::Plane::readFromStream ( mrpt::utils::CStream in,
int  version 
)
protected

◆ transform()

void mrpt::pbmap::Plane::transform ( Eigen::Matrix4f &  Rt)

◆ writeToStream()

void mrpt::pbmap::Plane::writeToStream ( mrpt::utils::CStream out,
int *  getVersion 
) const
protected

Member Data Documentation

◆ _init_Plane

mrpt::utils::CLASSINIT mrpt::pbmap::Plane::_init_Plane
staticprotected

Definition at line 51 of file Plane.h.

◆ areaHull

float mrpt::pbmap::Plane::areaHull

Definition at line 139 of file Plane.h.

◆ areaVoxels

float mrpt::pbmap::Plane::areaVoxels

Definition at line 138 of file Plane.h.

◆ b

std::vector<float> mrpt::pbmap::Plane::b
private

Definition at line 185 of file Plane.h.

◆ bDominantColor

bool mrpt::pbmap::Plane::bDominantColor

Definition at line 149 of file Plane.h.

◆ bFromStructure

bool mrpt::pbmap::Plane::bFromStructure

Definition at line 141 of file Plane.h.

◆ bFullExtent

bool mrpt::pbmap::Plane::bFullExtent

Definition at line 140 of file Plane.h.

◆ c1

std::vector<float> mrpt::pbmap::Plane::c1
private

Calculate plane's main color in C1C2C3 representation

Definition at line 192 of file Plane.h.

◆ c2

std::vector<float> mrpt::pbmap::Plane::c2
private

Definition at line 193 of file Plane.h.

◆ c3

std::vector<float> mrpt::pbmap::Plane::c3
private

Definition at line 194 of file Plane.h.

◆ classinfo

const mrpt::utils::TRuntimeClassId* mrpt::pbmap::Plane::classinfo
static

Definition at line 51 of file Plane.h.

◆ classPlane

mrpt::utils::TRuntimeClassId mrpt::pbmap::Plane::classPlane
static

Definition at line 51 of file Plane.h.

◆ curvature

float mrpt::pbmap::Plane::curvature

Definition at line 135 of file Plane.h.

◆ d

float mrpt::pbmap::Plane::d

Definition at line 133 of file Plane.h.

◆ dominantIntensity

float mrpt::pbmap::Plane::dominantIntensity

Definition at line 148 of file Plane.h.

◆ elongation

float mrpt::pbmap::Plane::elongation

Definition at line 137 of file Plane.h.

◆ g

std::vector<float> mrpt::pbmap::Plane::g
private

Definition at line 184 of file Plane.h.

◆ hist_H

std::vector<float> mrpt::pbmap::Plane::hist_H

Definition at line 153 of file Plane.h.

◆ id

unsigned mrpt::pbmap::Plane::id

! Parameters to allow the plane-based representation of the map by a graph

Definition at line 117 of file Plane.h.

◆ information

Eigen::Matrix4f mrpt::pbmap::Plane::information

Definition at line 134 of file Plane.h.

◆ inliers

std::vector<int32_t> mrpt::pbmap::Plane::inliers

! Convex Hull

Definition at line 166 of file Plane.h.

◆ intensity

std::vector<float> mrpt::pbmap::Plane::intensity
private

Definition at line 186 of file Plane.h.

◆ label

std::string mrpt::pbmap::Plane::label

Labels to store semantic attributes

Definition at line 124 of file Plane.h.

◆ label_context

std::string mrpt::pbmap::Plane::label_context

Definition at line 126 of file Plane.h.

◆ label_object

std::string mrpt::pbmap::Plane::label_object

Definition at line 125 of file Plane.h.

◆ nearbyPlanes

std::set<unsigned> mrpt::pbmap::Plane::nearbyPlanes

Definition at line 120 of file Plane.h.

◆ neighborPlanes

std::map<unsigned,unsigned> mrpt::pbmap::Plane::neighborPlanes

Definition at line 121 of file Plane.h.

◆ nFramesAreaIsStable

unsigned mrpt::pbmap::Plane::nFramesAreaIsStable

Definition at line 142 of file Plane.h.

◆ numObservations

unsigned mrpt::pbmap::Plane::numObservations

Definition at line 118 of file Plane.h.

◆ outerPolygonPtr

pcl::PointCloud<pcl::PointXYZRGBA>::Ptr mrpt::pbmap::Plane::outerPolygonPtr

Definition at line 168 of file Plane.h.

◆ planePointCloudPtr

pcl::PointCloud<pcl::PointXYZRGBA>::Ptr mrpt::pbmap::Plane::planePointCloudPtr

Definition at line 169 of file Plane.h.

◆ polygonContourPtr

pcl::PointCloud<pcl::PointXYZRGBA>::Ptr mrpt::pbmap::Plane::polygonContourPtr

Definition at line 167 of file Plane.h.

◆ prog_area

std::vector<double> mrpt::pbmap::Plane::prog_area

Definition at line 155 of file Plane.h.

◆ prog_C1C2C3

std::vector<Eigen::Vector3f> mrpt::pbmap::Plane::prog_C1C2C3

Definition at line 157 of file Plane.h.

◆ prog_elongation

std::vector<double> mrpt::pbmap::Plane::prog_elongation

Definition at line 156 of file Plane.h.

◆ prog_hist_H

std::vector<std::vector<float> > mrpt::pbmap::Plane::prog_hist_H

Definition at line 160 of file Plane.h.

◆ prog_intensity

std::vector<float> mrpt::pbmap::Plane::prog_intensity

Definition at line 159 of file Plane.h.

◆ prog_Nrgb

std::vector<Eigen::Vector3f> mrpt::pbmap::Plane::prog_Nrgb

Definition at line 158 of file Plane.h.

◆ r

std::vector<float> mrpt::pbmap::Plane::r
private

Definition at line 183 of file Plane.h.

◆ semanticGroup

unsigned mrpt::pbmap::Plane::semanticGroup

Definition at line 119 of file Plane.h.

◆ v3center

Eigen::Vector3f mrpt::pbmap::Plane::v3center

! Geometric description

Definition at line 131 of file Plane.h.

◆ v3colorC1C2C3

Eigen::Vector3f mrpt::pbmap::Plane::v3colorC1C2C3

Definition at line 152 of file Plane.h.

◆ v3colorNrgb

Eigen::Vector3f mrpt::pbmap::Plane::v3colorNrgb

! Radiometric description

Definition at line 147 of file Plane.h.

◆ v3colorNrgbDev

Eigen::Vector3f mrpt::pbmap::Plane::v3colorNrgbDev

Definition at line 150 of file Plane.h.

◆ v3normal

Eigen::Vector3f mrpt::pbmap::Plane::v3normal

Definition at line 132 of file Plane.h.

◆ v3PpalDir

Eigen::Vector3f mrpt::pbmap::Plane::v3PpalDir

Definition at line 136 of file Plane.h.




Page generated by Doxygen 1.9.7 for MRPT 1.4.0 SVN: at Tue Jun 13 14:27:49 UTC 2023