pcod-common v1.0.0
Shared preprocessing and postprocessing for point-cloud object detection
Loading...
Searching...
No Matches
pillar_grid.hpp
Go to the documentation of this file.
1// Copyright Institute for Automotive Engineering (ika), RWTH Aachen University
2// SPDX-License-Identifier: Apache-2.0
3
4#pragma once
5
6#include <array>
7#include <vector>
8
9namespace pcod_common {
10
12struct PillarGrid {
13 int grid_x = 0;
14 int grid_y = 0;
15 float x_min = 0.0f;
16 float x_max = 0.0f;
17 float y_min = 0.0f;
18 float y_max = 0.0f;
19 float z_min = 0.0f;
20 float z_max = 0.0f;
21 std::vector<float> centers;
22
24 const float* center_at(int idx) const { return centers.data() + static_cast<std::size_t>(idx) * 3; }
25};
26
35PillarGrid BuildPillarGrid(const std::array<int, 2>& pillar_map_size,
36 const std::array<std::array<float, 2>, 3>& pillar_map_range,
37 int first_up_stride,
38 int stride);
39
40} // namespace pcod_common
PillarGrid BuildPillarGrid(const std::array< int, 2 > &pillar_map_size, const std::array< std::array< float, 2 >, 3 > &pillar_map_range, int first_up_stride, int stride)
float z_min
Minimum Z coordinate.
float z_max
Maximum Z coordinate.
const float * center_at(int idx) const
int grid_x
Number of grid cells along X.
float x_min
Minimum X coordinate.
float y_min
Minimum Y coordinate.
int grid_y
Number of grid cells along Y.
std::vector< float > centers
Flat center array with shape [num_pillars, 3].
float x_max
Maximum X coordinate.
float y_max
Maximum Y coordinate.