8#ifndef SE_VOLUME_CARVER_HPP
9#define SE_VOLUME_CARVER_HPP
11#include <Eigen/Geometry>
31template<
typename MapT,
typename SensorT>
37 const Eigen::Isometry3f& ,
51template<se::Colour ColB, se::Semantics SemB,
int BlockSize,
typename SensorT>
57 typedef typename OctreeType::NodeType
NodeType;
65 struct VolumeCarverConfig {
67 sigma_min(map.getDataConfig().field.sigma_min_factor * map.getRes()),
68 sigma_max(map.getDataConfig().field.sigma_max_factor * map.getRes()),
69 tau_min(map.getDataConfig().field.tau_min_factor * map.getRes()),
70 tau_max(map.getDataConfig().field.tau_max_factor * map.getRes())
95 const Eigen::Isometry3f&
T_WS,
103 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
115 bool crossesFrustum(std::vector<srl::projection::ProjectionStatus>&
proj_corner_stati);
126 bool cameraInNode(
const Eigen::Vector3i&
node_coord,
128 const Eigen::Isometry3f&
T_WS);
159 template<
class SensorTDummy = SensorT>
160 typename std::enable_if_t<std::is_same<SensorTDummy, se::PinholeCamera>::value,
void>
177 template<
class SensorTDummy = SensorT>
178 typename std::enable_if_t<std::is_same<SensorTDummy, se::OusterLidar>::value,
void>
194 const Eigen::Isometry3f T_SW_;
195 const float map_res_;
196 VolumeCarverConfig config_;
197 const float max_depth_value_;
198 const float zero_depth_band_;
199 const float size_to_radius_;
207#include "impl/volume_carver_impl.hpp"
The base class of all octants (se::Node and se::Block) in an se::Octree.
Definition octant.hpp:19
OctreeType::NodeType NodeType
Definition volume_carver.hpp:57
Map< Data< se::Field::Occupancy, ColB, SemB >, se::Res::Multi, BlockSize > MapType
Definition volume_carver.hpp:55
VolumeCarverAllocation operator()()
Allocate the frustum using a map-to-camera volume carving approach.
OctreeType::BlockType BlockType
Definition volume_carver.hpp:58
MapType::OctreeType OctreeType
Definition volume_carver.hpp:56
VolumeCarver(MapType &map, const SensorT &sensor, const se::Image< float > &depth_img, const se::Image< float > &depth_sigma_img, const Eigen::Isometry3f &T_WS, const timestamp_t timestamp)
Setup the volume carver.
Unimplemented on purpose so that the template specialization is used.
Definition volume_carver.hpp:32
VolumeCarver(MapT &, const SensorT &, const se::Image< float > &, const Eigen::Isometry3f &, const timestamp_t)
Helper wrapper to allocate and de-allocate octants in the octree.
Definition bounded_vector.hpp:14
VarianceState
Definition volume_carver.hpp:19
Definition volume_carver.hpp:21
std::vector< se::OctantBase * > block_list
Definition volume_carver.hpp:23
std::vector< bool > projects_inside_list
Definition volume_carver.hpp:25
std::vector< se::OctantBase * > node_list
Definition volume_carver.hpp:22
std::vector< se::VarianceState > variance_state_list
Definition volume_carver.hpp:24
VolumeCarverConfig(const MapType &map)
Definition volume_carver.hpp:66
const float tau_max
Definition volume_carver.hpp:77
const float sigma_min
Definition volume_carver.hpp:74
const float sigma_max
Definition volume_carver.hpp:75
const float tau_min
Definition volume_carver.hpp:76