Main MRPT website > C++ reference for MRPT 1.9.9
CPointCloudFilterByDistance.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 #pragma once
10 
12 #include <mrpt/poses/CPose3D.h>
16 
17 namespace mrpt
18 {
19 namespace maps
20 {
21 /** Implementation of pointcloud filtering based on requisities for minimum
22  * neigbouring points in both,
23  * the current timestamp and a previous one.
24  *
25  * \sa CPointsMap
26  * \ingroup mrpt_maps_grp
27  */
29 {
30  public:
31  // See base docs
32  void filter(
33  /** [in,out] The input pointcloud, which will be modified upon
34  return after filtering. */
35  mrpt::maps::CPointsMap* inout_pointcloud,
36  /** [in] The timestamp of the input pointcloud */
37  const mrpt::system::TTimeStamp pc_timestamp,
38  /** [in] If nullptr, the PC is assumed to be given in global
39  coordinates. Otherwise, it will be transformed from local
40  coordinates to global using this transformation. */
41  const mrpt::poses::CPose3D& pc_reference_pose,
42  /** [in,out] additional in/out parameters */
43  TExtraFilterParams* params = nullptr) override;
44 
46  {
47  /** (Default: 0.05 m) */
48  double min_dist;
49  /** (Default: 2 deg) Stored in rad. */
51  /** (Default: 1 s) */
53  /** (Default: 1) How many previous keyframes will be compared with the
54  * latest pointcloud. */
56  /** (Default: 0.4) If the ratio [0,1] of points considered invalid
57  * ("deletion") is larger than this ratio, no point will be deleted
58  * since it'd be too suspicious and may indicate a failure of this
59  * filter. */
61 
62  TOptions();
63  void loadFromConfigFile(
65  const std::string& section) override; // See base docs
66  void saveToConfigFile(
68  const std::string& section) const override;
69  };
70 
72 
73  private:
74  struct FrameInfo
75  {
78 
80  };
81 
83 };
84 }
85 } // End of namespace
mrpt::maps::CPointCloudFilterByDistance
Implementation of pointcloud filtering based on requisities for minimum neigbouring points in both,...
Definition: CPointCloudFilterByDistance.h:28
CPointCloudFilterBase.h
mrpt::maps::CPointCloudFilterByDistance::FrameInfo::pose
mrpt::poses::CPose3D pose
Definition: CPointCloudFilterByDistance.h:76
c
const GLubyte * c
Definition: glext.h:6313
mrpt::maps::CPointCloudFilterByDistance::TOptions::TOptions
TOptions()
Definition: CPointCloudFilterByDistance.cpp:204
mrpt::aligned_std_map
std::map< KEY, VALUE, std::less< KEY >, mrpt::aligned_allocator_cpp11< std::pair< const KEY, VALUE > >> aligned_std_map
Definition: aligned_std_map.h:17
mrpt::maps::CPointsMap
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans or other sensors.
Definition: CPointsMap.h:64
mrpt::maps::CPointCloudFilterBase::TExtraFilterParams
Definition: CPointCloudFilterBase.h:40
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
aligned_std_map.h
mrpt::maps::CPointCloudFilterByDistance::m_last_frames
mrpt::aligned_std_map< mrpt::system::TTimeStamp, FrameInfo > m_last_frames
Definition: CPointCloudFilterByDistance.h:82
mrpt::maps::CPointCloudFilterByDistance::TOptions::loadFromConfigFile
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.
Definition: CPointCloudFilterByDistance.cpp:213
mrpt::system::TTimeStamp
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
Definition: datetime.h:31
source
GLsizei GLsizei GLchar * source
Definition: glext.h:4082
mrpt::maps::CPointCloudFilterBase
Virtual base class for all point-cloud filtering algorithm.
Definition: CPointCloudFilterBase.h:33
mrpt::config::CConfigFileBase
This class allows loading and storing values and vectors of different types from a configuration text...
Definition: config/CConfigFileBase.h:44
mrpt::maps::CPointCloudFilterByDistance::TOptions::too_old_seconds
double too_old_seconds
(Default: 1 s)
Definition: CPointCloudFilterByDistance.h:52
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
mrpt::maps::CPointCloudFilterByDistance::FrameInfo::pc
mrpt::maps::CSimplePointsMap::Ptr pc
Definition: CPointCloudFilterByDistance.h:77
mrpt::maps::CPointCloudFilterByDistance::TOptions
Definition: CPointCloudFilterByDistance.h:45
mrpt::maps::CSimplePointsMap::Ptr
std::shared_ptr< CSimplePointsMap > Ptr
Definition: CSimplePointsMap.h:33
mrpt::config::CLoadableOptions
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
Definition: config/CLoadableOptions.h:28
mrpt::maps::CPointCloudFilterByDistance::TOptions::min_dist
double min_dist
(Default: 0.05 m)
Definition: CPointCloudFilterByDistance.h:48
mrpt::maps::CPointCloudFilterByDistance::TOptions::angle_tolerance
double angle_tolerance
(Default: 2 deg) Stored in rad.
Definition: CPointCloudFilterByDistance.h:50
mrpt::maps::CPointCloudFilterByDistance::TOptions::previous_keyframes
int previous_keyframes
(Default: 1) How many previous keyframes will be compared with the latest pointcloud.
Definition: CPointCloudFilterByDistance.h:55
CPose3D.h
CLoadableOptions.h
mrpt::maps::CPointCloudFilterByDistance::filter
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.
Definition: CPointCloudFilterByDistance.cpp:18
mrpt::maps::CPointCloudFilterByDistance::TOptions::saveToConfigFile
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.
Definition: CPointCloudFilterByDistance.cpp:223
MRPT_MAKE_ALIGNED_OPERATOR_NEW
#define MRPT_MAKE_ALIGNED_OPERATOR_NEW
Put this macro inside any class with members that require {16,32,64}-byte memory alignment (e....
Definition: aligned_allocator.h:90
string
GLsizei const GLchar ** string
Definition: glext.h:4101
mrpt::maps::CPointCloudFilterByDistance::options
TOptions options
Definition: CPointCloudFilterByDistance.h:71
CSimplePointsMap.h
mrpt::maps::CPointCloudFilterByDistance::FrameInfo
Definition: CPointCloudFilterByDistance.h:74
mrpt::maps::CPointCloudFilterByDistance::TOptions::max_deletion_ratio
double max_deletion_ratio
(Default: 0.4) If the ratio [0,1] of points considered invalid ("deletion") is larger than this ratio...
Definition: CPointCloudFilterByDistance.h:60
params
GLenum const GLfloat * params
Definition: glext.h:3534



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