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 | |
void * | operator new (size_t size) |
void * | operator new[] (size_t size) |
void | operator delete (void *ptr) throw () |
void | operator delete[] (void *ptr) throw () |
void | operator delete (void *memory, void *ptr) throw () |
void * | operator new (size_t size, const std::nothrow_t &) throw () |
void | operator delete (void *ptr, const std::nothrow_t &) throw () |
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. More... | |
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. More... | |
void | computeMassCenterAndArea () |
Compute the patch's convex-hull area and mass center. More... | |
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 () |
virtual mxArray * | writeToMatlab () const |
Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class. More... | |
mrpt::utils::CObjectPtr | duplicateGetSmartPtr () const |
Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer). More... | |
CObject * | clone () const |
Cloning interface for smart pointers. More... | |
Static Public Member Functions | |
static void * | operator new (size_t size, void *ptr) |
Public Attributes | |
unsigned | id |
! Parameters to allow the plane-based representation of the map by a graph More... | |
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 More... | |
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 More... | |
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 More... | |
pcl::PointCloud< pcl::PointXYZRGBA >::Ptr | polygonContourPtr |
pcl::PointCloud< pcl::PointXYZRGBA >::Ptr | outerPolygonPtr |
pcl::PointCloud< pcl::PointXYZRGBA >::Ptr | planePointCloudPtr |
Static Public Attributes | |
static const mrpt::utils::TRuntimeClassId | classCObject |
RTTI stuff | |
static const mrpt::utils::TRuntimeClassId | classCSerializable |
Protected Member Functions | |
CSerializable virtual methods | |
void | writeToStream (mrpt::utils::CStream &out, int *getVersion) const |
Introduces a pure virtual method responsible for writing to a CStream. More... | |
void | readFromStream (mrpt::utils::CStream &in, int version) |
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori. More... | |
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 | |
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 |
Returns information about the class of an object in runtime. More... | |
virtual mrpt::utils::CObject * | duplicate () const |
Returns a copy of the object, indepently of its class. More... | |
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 | ( | ) |
|
inlineinherited |
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 |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
|
inlineinherited |
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 |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::utils::CSerializable.
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 | ( | 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.
bool mrpt::pbmap::Plane::isSamePlane | ( | Eigen::Matrix4f & | Rt, |
Plane & | plane_, | ||
const float & | cosAngleThreshold, | ||
const float & | distThreshold, | ||
const float & | proxThreshold | ||
) |
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 | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
protectedvirtual |
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori.
in | The input binary stream where the object data must read from. |
version | The version of the object stored in the stream: use this version number in your code to know how to read the incoming data. |
std::exception | On any error, see CStream::ReadBuffer |
Implements mrpt::utils::CSerializable.
void mrpt::pbmap::Plane::transform | ( | Eigen::Matrix4f & | Rt | ) |
|
inlinevirtualinherited |
Introduces a pure virtual method responsible for writing to a mxArray
Matlab object, typically a MATLAB struct
whose contents are documented in each derived class.
mxArray
(caller is responsible of memory freeing) or NULL is class does not support conversion to MATLAB. Definition at line 79 of file CSerializable.h.
|
protectedvirtual |
Introduces a pure virtual method responsible for writing to a CStream.
This can not be used directly be users, instead use "stream << object;" for writing it to a stream.
out | The output binary stream where object must be dumped. |
getVersion | If NULL, the object must be dumped. If not, only the version of the object dump must be returned in this pointer. This enables the versioning of objects dumping and backward compatibility with previously stored data. |
std::exception | On any error, see CStream::WriteBuffer |
Implements mrpt::utils::CSerializable.
|
staticprotected |
|
private |
|
staticinherited |
|
staticinherited |
Definition at line 42 of file CSerializable.h.
|
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.8.9.1 for MRPT 1.3.2 SVN:Unversioned directory at Thu Dec 10 00:07:55 UTC 2015 |