supereight
map_integrator.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2021 Smart Robotics Lab, Imperial College London, Technical University of Munich
3  * SPDX-FileCopyrightText: 2021 Nils Funk
4  * SPDX-FileCopyrightText: 2021 Sotiris Papatheodorou
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 #ifndef SE_MAP_INTEGRATOR_HPP
9 #define SE_MAP_INTEGRATOR_HPP
10 
11 #include <cstddef>
12 #include <iterator>
13 
14 #include "se/common/math_util.hpp"
20 
21 namespace se {
22 namespace allocator {
23 
37 template<typename MapT, typename SensorT>
38 std::vector<se::OctantBase*> frustum(MapT& map,
39  SensorT& sensor,
40  const se::Image<float>& depth_img,
41  const Eigen::Matrix4f& T_WS,
42  const float band);
43 
44 } // namespace allocator
45 
46 
47 
48 namespace fetcher {
62 template<typename MapT, typename SensorT>
63 inline std::vector<se::OctantBase*>
64 frustum(MapT& map, const SensorT& sensor, const Eigen::Matrix4f& T_WS);
65 } // namespace fetcher
66 
67 
68 
79 static inline Eigen::Vector3f get_sample_coord(const Eigen::Vector3i& octant_coord,
80  const int octant_size);
81 
82 
83 
84 template<typename MapT>
86  public:
87  MapIntegrator(MapT& map);
88 
98  template<typename SensorT>
99  void integrateDepth(const SensorT& sensor,
100  const se::Image<float>& depth_img,
101  const Eigen::Matrix4f& T_WS,
102  const unsigned int frame);
103 
104  private:
105  MapT& map_;
106 };
107 
108 
109 
110 } // namespace se
111 
112 #include "impl/map_integrator_impl.hpp"
113 
114 #endif // SE_MAP_INTEGRATOR_HPP
std::vector< se::OctantBase * > frustum(MapT &map, SensorT &sensor, const se::Image< float > &depth_img, const Eigen::Matrix4f &T_WS, const float band)
Allocate frustum in band around the surface.
static Eigen::Vector3f get_sample_coord(const Eigen::Vector3i &octant_coord, const int octant_size)
compute the sample coordinates for a given octant coordinate
Definition: map_integrator.hpp:85
Helper wrapper to allocate and de-allocate octants in the octree.
Definition: colour_utils.hpp:17