Main MRPT website > C++ reference for MRPT 1.9.9
PlaneInferredInfo.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 /* Plane-based Map (PbMap) library
11  * Construction of plane-based maps and localization in it from RGBD Images.
12  * Writen by Eduardo Fernandez-Moral. See docs for <a
13  * href="group__mrpt__pbmap__grp.html" >mrpt-pbmap</a>
14  */
15 
16 #ifndef __PlaneInferredInfo_H
17 #define __PlaneInferredInfo_H
18 
19 #include <mrpt/config.h>
20 #if MRPT_HAS_PCL
21 
22 #include <mrpt/pbmap/PbMap.h>
23 #include <mrpt/pbmap/Plane.h>
24 
25 namespace mrpt
26 {
27 namespace pbmap
28 {
29 /** A class used to infer some semantic meaning to the planes of a PbMap. This
30  * knowledge
31  * is inferred through some heristics to determine if a plane correspond to the
32  * floor, or
33  * to a wall ("structural plane") or if instead it is a contextual plane (e.g.
34  * TV, worktop).
35  *
36  * \ingroup mrpt_pbmap_grp
37  */
39 {
40  public:
41  // Context-Planes recognition functions:
42  ///*!Floor plane id*/
43  // int FloorPlaneMap;
44 
45  // Constructor
46  PlaneInferredInfo(PbMap& mPbM) : mPbMap(mPbM){};
47 
48  /*!Check if the input plane fulfill some heuristics and so we can infer some
49  knowledge, e.g. the plane correspond to the floor,
50  a wall, the ceiling, in the world. It also makes use of the current
51  sensor pose to verify some assumptions. // Modificar con un define esto
52  ultimo
53  */
54  bool searchTheFloor(Eigen::Matrix4f& poseSensor, Plane& plane);
55 
56  // Functions to check if a plane has been fully seen. We use heuristics that
57  // are likely but not sure to give the correct result
58  /*!Check if the input planar patch (after segmentation) is cut by the image.
59  It checks that the inliers "planeIndices" fulfill a minimum distance
60  "threshold" with the border
61  of the image, whose size is defined by "widthSampledImage" x
62  "heightSampledImage"
63  */
64  bool isPlaneCutbyImage(
65  std::vector<int>& planeIndices, unsigned& widthSampledImage,
66  unsigned& heightSampledImage, unsigned threshold);
67 
68  /*!Check if the input planar patch (after segmentation) is cut by the image.
69  * It checks that the nearer 3D points to the plane's convex hull are behind
70  * the plane
71  */
73  Plane& plane, pcl::PointCloud<pcl::PointXYZRGBA>::Ptr& frame,
74  std::vector<int>& planeIndices, unsigned threshold);
75 
76  /*!Check if the input plane represents completely a 3D planar surface. It
77  uses some heuristics to mark a plane as "Complete" when its area does not
78  grow after
79  subsequent observations.
80  */
81  void isFullExtent(Plane& plane, double newArea);
82 
83  private:
85 };
86 }
87 } // End of namespaces
88 
89 #endif
90 
91 #endif
mrpt::pbmap::PlaneInferredInfo::mPbMap
PbMap & mPbMap
Definition: PlaneInferredInfo.h:84
Plane.h
mrpt::pbmap::PlaneInferredInfo::isPlaneCutbyImage
bool isPlaneCutbyImage(std::vector< int > &planeIndices, unsigned &widthSampledImage, unsigned &heightSampledImage, unsigned threshold)
! Check if the input plane has points too close to the image limits.
Definition: PlaneInferredInfo.cpp:85
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
mrpt::pbmap::PlaneInferredInfo::isFullExtent
void isFullExtent(Plane &plane, double newArea)
! Check if the area of input plane is stable and bounded (e.g < 1 m2) along the last keyframes that o...
Definition: PlaneInferredInfo.cpp:239
mrpt::pbmap::Plane
A class used to store a planar feature (Plane for short).
Definition: Plane.h:46
mrpt::pbmap::PbMap
A class used to store a Plane-based Map (PbMap).
Definition: pbmap/PbMap.h:47
mrpt::pbmap::PlaneInferredInfo::isSurroundingBackground
bool isSurroundingBackground(Plane &plane, pcl::PointCloud< pcl::PointXYZRGBA >::Ptr &frame, std::vector< int > &planeIndices, unsigned threshold)
! Check if the surrounding points of the input plane in the input frame are behind the plane
Definition: PlaneInferredInfo.cpp:114
mrpt::pbmap::PlaneInferredInfo::searchTheFloor
bool searchTheFloor(Eigen::Matrix4f &poseSensor, Plane &plane)
! Check if the input plane correpond to the floor.
Definition: PlaneInferredInfo.cpp:35
PbMap.h
mrpt::pbmap::PlaneInferredInfo
A class used to infer some semantic meaning to the planes of a PbMap.
Definition: PlaneInferredInfo.h:38



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST