supereight
multires_ofusion_core.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2019-2021 Smart Robotics Lab, Imperial College London, Technical University of Munich
3  * SPDX-FileCopyrightText: 2019-2021 Nils Funk
4  * SPDX-FileCopyrightText: 2021 Sotiris Papatheodorou
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 #ifndef SE_MULTIRES_OFUSION_CORE_HPP
9 #define SE_MULTIRES_OFUSION_CORE_HPP
10 
11 #include <limits>
12 
13 #include "se/common/str_utils.hpp"
14 #include "se/map/data.hpp"
15 #include "se/map/octant/octant.hpp"
16 
17 namespace se {
18 
19 
20 
28 template<typename ConfigT>
29 inline float compute_three_sigma(const se::field_t depth_value,
30  const float sigma_min,
31  const float sigma_max,
32  const ConfigT config);
33 
34 
35 
43 template<typename ConfigT>
44 inline float compute_tau(const se::field_t depth_value,
45  const float tau_min,
46  const float tau_max,
47  const ConfigT config);
48 
49 
50 
51 namespace updater {
52 
53 
62 template<typename DataT>
63 inline bool
64 weighted_mean_update(DataT& data, const se::field_t sample_value, const se::weight_t max_weight);
65 
66 
67 
78 template<typename DataT, typename ConfigT>
79 inline bool update_voxel(DataT& data,
80  const float range_diff,
81  const float tau,
82  const float three_sigma,
83  const ConfigT config);
84 
85 
86 
94 template<typename DataT, typename ConfigT>
95 inline void free_node(DataT& node_data, const ConfigT config);
96 
97 
105 template<typename DataT, typename ConfigT>
106 inline bool free_voxel(DataT& voxel_data, const ConfigT config);
107 
108 
118 template<typename NodeT, typename BlockT>
119 inline typename NodeT::DataType propagate_to_parent_node(se::OctantBase* octant_ptr,
120  const unsigned int frame);
121 
122 
123 
131 template<typename BlockT>
132 inline void propagate_block_to_coarsest_scale(se::OctantBase* octant_ptr);
133 
134 
135 
136 } // namespace updater
137 } // namespace se
138 
139 #include "impl/multires_ofusion_core_impl.hpp"
140 
141 #endif // SE_MULTIRES_OFUSION_CORE_HPP
float field_t
The type of the stored field (e.g. TSDF, ESDF or occupancy)
Definition: type_util.hpp:50
void free_node(DataT &node_data, const ConfigT config)
Reduce the node data by the minimum log-odd occupancy update per iteration.
bool free_voxel(DataT &voxel_data, const ConfigT config)
Reduce the node data by the minimum log-odd occupancy update per iteration.
NodeT::DataType propagate_to_parent_node(se::OctantBase *octant_ptr, const unsigned int frame)
Propagate a summary of the eight nodes children to its parent.
float compute_three_sigma(const se::field_t depth_value, const float sigma_min, const float sigma_max, const ConfigT config)
Compute the estimated uncertainty boundary for a given depth measurement.
void propagate_block_to_coarsest_scale(se::OctantBase *octant_ptr)
Summariese the values from the current integration scale recursively up to the block&#39;s max scale...
se::field_t weight_t
The type of the field type weight.
Definition: type_util.hpp:54
This class only helps to dynamic cast the octant to the right type and builds the base of nodes and b...
Definition: octant.hpp:24
bool update_voxel(DataT &data, const float range_diff, const float tau, const float three_sigma, const ConfigT config)
Update a field with a new measurement, a weighting of 1 is considered for the new measurement...
Helper wrapper to allocate and de-allocate octants in the octree.
Definition: colour_utils.hpp:17
float compute_tau(const se::field_t depth_value, const float tau_min, const float tau_max, const ConfigT config)
Compute the estimated wall thickness tau for a given depth measurement.
bool weighted_mean_update(DataT &data, const se::field_t sample_value, const se::weight_t max_weight)
Update the weighted mean log-odd octant occupancy and set the octant to observed. ...