MRPT  1.9.9
PlaneInferredInfo.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://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 #pragma once
17 
18 #include <mrpt/config.h>
19 #if MRPT_HAS_PCL
20 
21 #include <mrpt/pbmap/PbMap.h>
22 #include <mrpt/pbmap/Plane.h>
23 
24 namespace mrpt::pbmap
25 {
26 /** A class used to infer some semantic meaning to the planes of a PbMap. This
27  * knowledge
28  * is inferred through some heristics to determine if a plane correspond to the
29  * floor, or
30  * to a wall ("structural plane") or if instead it is a contextual plane (e.g.
31  * TV, worktop).
32  *
33  * \ingroup mrpt_pbmap_grp
34  */
36 {
37  public:
38  // Context-Planes recognition functions:
39  ///*!Floor plane id*/
40  // int FloorPlaneMap;
41 
42  // Constructor
43  PlaneInferredInfo(PbMap& mPbM) : mPbMap(mPbM){};
44 
45  /*!Check if the input plane fulfill some heuristics and so we can infer some
46  knowledge, e.g. the plane correspond to the floor,
47  a wall, the ceiling, in the world. It also makes use of the current
48  sensor pose to verify some assumptions. // Modificar con un define esto
49  ultimo
50  */
51  bool searchTheFloor(Eigen::Matrix4f& poseSensor, Plane& plane);
52 
53  // Functions to check if a plane has been fully seen. We use heuristics that
54  // are likely but not sure to give the correct result
55  /*!Check if the input planar patch (after segmentation) is cut by the image.
56  It checks that the inliers "planeIndices" fulfill a minimum distance
57  "threshold" with the border
58  of the image, whose size is defined by "widthSampledImage" x
59  "heightSampledImage"
60  */
61  bool isPlaneCutbyImage(
62  std::vector<int>& planeIndices, unsigned& widthSampledImage,
63  unsigned& heightSampledImage, unsigned threshold);
64 
65  /*!Check if the input planar patch (after segmentation) is cut by the image.
66  * It checks that the nearer 3D points to the plane's convex hull are behind
67  * the plane
68  */
70  Plane& plane, pcl::PointCloud<pcl::PointXYZRGBA>::Ptr& frame,
71  std::vector<int>& planeIndices, unsigned threshold);
72 
73  /*!Check if the input plane represents completely a 3D planar surface. It
74  uses some heuristics to mark a plane as "Complete" when its area does not
75  grow after
76  subsequent observations.
77  */
78  void isFullExtent(Plane& plane, double newArea);
79 
80  private:
82 };
83 } // namespace mrpt::pbmap
84 #endif
A class used to store a planar feature (Plane for short).
Definition: Plane.h:43
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:44



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ee555d257 Fri Aug 16 10:05:39 2019 +0200 at vie ago 16 10:10:14 CEST 2019