Builder for an elevation map.
More...
#include <elevation_map.hpp>
|
| | ElevationMapBuilder (double resolution, const Eigen::Vector2i &size, const Eigen::Vector2f &origin) |
| | Constructor.
|
| | ~ElevationMapBuilder () |
| | Destructor.
|
| template<typename Vector> |
| std::vector< std::uint64_t > | calc_cell_indices (const std::vector< Vector > &cells) const |
| | Calculate the cell indices for a given set of cells.
|
| template<typename Vector> |
| void | set_elevation (const std::vector< Vector > &cells, int elevation_index, const std::vector< std::uint64_t > &cell_indices, bool average=false) |
| | Set the elevation values for the given cells in the elevation map.
|
| template<typename Vector> |
| void | set_cmap (const std::vector< Vector > &cells, int cmap_index, const std::vector< std::uint64_t > &cell_indices, bool average=false) |
| | Set the color values for the given cells in the elevation map.
|
| template<int WindowSize = 3> |
| void | filter_elevation_map (bool process_valid_cells=true) |
| | Apply local averaging filter to the elevation (and color) map.
|
| template<int WindowSize = 3> |
| void | calc_cmap_gradient () |
| | Replace the color map with its gradient magnitude.
|
Builder for an elevation map.
◆ ElevationMapBuilder()
| glk::ElevationMapBuilder::ElevationMapBuilder |
( |
double | resolution, |
|
|
const Eigen::Vector2i & | size, |
|
|
const Eigen::Vector2f & | origin ) |
Constructor.
- Parameters
-
| resolution | Resolution of the map (size of each cell) |
| size | Size of the map in number of cells (width, height) |
| origin | Top-left corner of the map in world coordinates |
◆ ~ElevationMapBuilder()
| glk::ElevationMapBuilder::~ElevationMapBuilder |
( |
| ) |
|
◆ calc_cell_indices()
template<typename Vector>
| std::vector< std::uint64_t > glk::ElevationMapBuilder::calc_cell_indices |
( |
const std::vector< Vector > & | cells | ) |
const |
Calculate the cell indices for a given set of cells.
- Parameters
-
| cells | Cells for which to calculate the indices. cell[0] and cell[1] are the x and y coordinates of the cell in world coordinates. |
- Returns
- Indices of the cells in the elevation map.
◆ calc_cmap_gradient()
template<int WindowSize = 3>
| void glk::ElevationMapBuilder::calc_cmap_gradient |
( |
| ) |
|
Replace the color map with its gradient magnitude.
◆ filter_elevation_map()
template<int WindowSize = 3>
| void glk::ElevationMapBuilder::filter_elevation_map |
( |
bool | process_valid_cells = true | ) |
|
Apply local averaging filter to the elevation (and color) map.
- Template Parameters
-
| WindowSize | Size of the filter window (must be odd). |
- Parameters
-
| process_valid_cells | If true, all cells will be processed (smoothed). If false, only invalid cells (NaN) will be processed. |
◆ set_cmap()
template<typename Vector>
| void glk::ElevationMapBuilder::set_cmap |
( |
const std::vector< Vector > & | cells, |
|
|
int | cmap_index, |
|
|
const std::vector< std::uint64_t > & | cell_indices, |
|
|
bool | average = false ) |
Set the color values for the given cells in the elevation map.
- Parameters
-
| cells | Cells |
| cmap_index | Index of the color value in the cell vector (i.e., cells[i][cmap_index] is the color value of i-th cell). |
| cell_indices | Indices of the cells in the elevation map. |
| average | If false, the color values will be set directly. Otherwise, the color values of each cell will be averaged. |
◆ set_elevation()
template<typename Vector>
| void glk::ElevationMapBuilder::set_elevation |
( |
const std::vector< Vector > & | cells, |
|
|
int | elevation_index, |
|
|
const std::vector< std::uint64_t > & | cell_indices, |
|
|
bool | average = false ) |
Set the elevation values for the given cells in the elevation map.
- Parameters
-
| cells | Cells |
| elevation_index | Index of the elevation value in the cell vector (i.e., cells[i][elevation_index] is the elevation value of i-th cell). |
| cell_indices | Indices of the cells in the elevation map. |
| average | If false, the elevation values will be set directly. Otherwise, the elevation values of each cell will be averaged. |
◆ color_map
| Eigen::Array<float, -1, -1, Eigen::RowMajor> glk::ElevationMapBuilder::color_map |
◆ count_map
| Eigen::Array<float, -1, -1, Eigen::RowMajor> glk::ElevationMapBuilder::count_map |
◆ elevation_map
| Eigen::Array<float, -1, -1, Eigen::RowMajor> glk::ElevationMapBuilder::elevation_map |
◆ inv_resolution
| double glk::ElevationMapBuilder::inv_resolution |
◆ origin
| Eigen::Vector2f glk::ElevationMapBuilder::origin |
◆ resolution
| double glk::ElevationMapBuilder::resolution |
◆ size
| Eigen::Vector2i glk::ElevationMapBuilder::size |
The documentation for this struct was generated from the following file: