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::pbmap
26 {
27 /** A class used to infer some semantic meaning to the planes of a PbMap. This
28  * knowledge
29  * is inferred through some heristics to determine if a plane correspond to the
30  * floor, or
31  * to a wall ("structural plane") or if instead it is a contextual plane (e.g.
32  * TV, worktop).
33  *
34  * \ingroup mrpt_pbmap_grp
35  */
37 {
38  public:
39  // Context-Planes recognition functions:
40  ///*!Floor plane id*/
41  // int FloorPlaneMap;
42 
43  // Constructor
44  PlaneInferredInfo(PbMap& mPbM) : mPbMap(mPbM){};
45 
46  /*!Check if the input plane fulfill some heuristics and so we can infer some
47  knowledge, e.g. the plane correspond to the floor,
48  a wall, the ceiling, in the world. It also makes use of the current
49  sensor pose to verify some assumptions. // Modificar con un define esto
50  ultimo
51  */
52  bool searchTheFloor(Eigen::Matrix4f& poseSensor, Plane& plane);
53 
54  // Functions to check if a plane has been fully seen. We use heuristics that
55  // are likely but not sure to give the correct result
56  /*!Check if the input planar patch (after segmentation) is cut by the image.
57  It checks that the inliers "planeIndices" fulfill a minimum distance
58  "threshold" with the border
59  of the image, whose size is defined by "widthSampledImage" x
60  "heightSampledImage"
61  */
62  bool isPlaneCutbyImage(
63  std::vector<int>& planeIndices, unsigned& widthSampledImage,
64  unsigned& heightSampledImage, unsigned threshold);
65 
66  /*!Check if the input planar patch (after segmentation) is cut by the image.
67  * It checks that the nearer 3D points to the plane's convex hull are behind
68  * the plane
69  */
71  Plane& plane, pcl::PointCloud<pcl::PointXYZRGBA>::Ptr& frame,
72  std::vector<int>& planeIndices, unsigned threshold);
73 
74  /*!Check if the input plane represents completely a 3D planar surface. It
75  uses some heuristics to mark a plane as "Complete" when its area does not
76  grow after
77  subsequent observations.
78  */
79  void isFullExtent(Plane& plane, double newArea);
80 
81  private:
83 };
84 }
85 #endif
86 
87 #endif
88 
89 
A class used to store a planar feature (Plane for short).
Definition: Plane.h:44
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.
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 ...
A class used to infer some semantic meaning to the planes of a PbMap.
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...
bool searchTheFloor(Eigen::Matrix4f &poseSensor, Plane &plane)
! Check if the input plane correpond to the floor.
A class used to store a Plane-based Map (PbMap).
Definition: pbmap/PbMap.h:45



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020