MRPT  2.0.0
CPointCloudFilterByDistance.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-2020, 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 #pragma once
10 
14 #include <mrpt/poses/CPose3D.h>
15 #include <map>
16 
17 namespace mrpt::maps
18 {
19 /** Implementation of pointcloud filtering based on requisities for minimum
20  * neigbouring points in both,
21  * the current timestamp and a previous one.
22  *
23  * \sa CPointsMap
24  * \ingroup mrpt_maps_grp
25  */
27 {
28  public:
29  // See base docs
30  void filter(
31  /** [in,out] The input pointcloud, which will be modified upon
32  return after filtering. */
33  mrpt::maps::CPointsMap* inout_pointcloud,
34  /** [in] The timestamp of the input pointcloud */
35  const mrpt::system::TTimeStamp pc_timestamp,
36  /** [in] If nullptr, the PC is assumed to be given in global
37  coordinates. Otherwise, it will be transformed from local
38  coordinates to global using this transformation. */
39  const mrpt::poses::CPose3D& pc_reference_pose,
40  /** [in,out] additional in/out parameters */
41  TExtraFilterParams* params = nullptr) override;
42 
44  {
45  /** (Default: 0.05 m) */
46  double min_dist{0.10};
47  /** (Default: 2 deg) Stored in rad. */
49  /** (Default: 1 s) */
50  double too_old_seconds{1.0};
51  /** (Default: 1) How many previous keyframes will be compared with the
52  * latest pointcloud. */
54  /** (Default: 0.4) If the ratio [0,1] of points considered invalid
55  * ("deletion") is larger than this ratio, no point will be deleted
56  * since it'd be too suspicious and may indicate a failure of this
57  * filter. */
58  double max_deletion_ratio{.4};
59 
60  TOptions();
61  void loadFromConfigFile(
62  const mrpt::config::CConfigFileBase& source,
63  const std::string& section) override; // See base docs
64  void saveToConfigFile(
66  const std::string& section) const override;
67  };
68 
70 
71  private:
72  struct FrameInfo
73  {
76  };
77 
78  std::map<mrpt::system::TTimeStamp, FrameInfo> m_last_frames;
79 };
80 } // namespace mrpt::maps
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
int previous_keyframes
(Default: 1) How many previous keyframes will be compared with the latest pointcloud.
mrpt::vision::TStereoCalibParams params
double max_deletion_ratio
(Default: 0.4) If the ratio [0,1] of points considered invalid ("deletion") is larger than this ratio...
mrpt::Clock::time_point TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
Definition: datetime.h:40
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans or other sensors...
Definition: CPointsMap.h:65
This class allows loading and storing values and vectors of different types from a configuration text...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:85
Implementation of pointcloud filtering based on requisities for minimum neigbouring points in both...
double angle_tolerance
(Default: 2 deg) Stored in rad.
void filter(mrpt::maps::CPointsMap *inout_pointcloud, const mrpt::system::TTimeStamp pc_timestamp, const mrpt::poses::CPose3D &pc_reference_pose, TExtraFilterParams *params=nullptr) override
Apply the filtering algorithm to the pointcloud.
Virtual base class for all point-cloud filtering algorithm.
void saveToConfigFile(mrpt::config::CConfigFileBase &c, const std::string &section) const override
This method saves the options to a ".ini"-like file or memory-stored string list. ...
void loadFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string &section) override
This method load the options from a ".ini"-like file or memory-stored string list.
std::map< mrpt::system::TTimeStamp, FrameInfo > m_last_frames



Page generated by Doxygen 1.8.14 for MRPT 2.0.0 Git: b38439d21 Tue Mar 31 19:58:06 2020 +0200 at miƩ abr 1 00:50:30 CEST 2020