This class arranges any event container into a grid of MxN cells covering the sensor.
More...
#include <grid.hpp>
|
| using | EventType = typename Container::value_type |
| using | T = typename EventType::value_type |
|
| template<typename... Args> |
| | Grid_ (const cv::Size sensor, const cv::Size cells, Args &&...args) |
| | Construct a grid of cells covering the sensor.
|
| bool | insert (const EventType &e) |
| | Insert an event into the cell its coordinates fall into.
|
| cv::Point | cell (const EventType &e) const |
| | Cell an event falls into.
|
| Container & | operator() (const int row, const int col) |
| | Access a cell.
|
| const Container & | operator() (const int row, const int col) const |
| | Access a cell.
|
| Container & | operator() (const cv::Point c) |
| | Access a cell.
|
| const Container & | operator() (const cv::Point c) const |
| | Access a cell.
|
|
void | clear () |
| | Reset every cell to its freshly constructed state.
|
| int | rows () const |
| | Number of rows of the grid.
|
| int | cols () const |
| | Number of columns of the grid.
|
| cv::Size | size () const |
| | Number of cells: width columns and height rows.
|
| cv::Size | cellSize () const |
| | Size of each cell in pixels.
|
| cv::Size | sensorSize () const |
| | Size of the sensor in pixels.
|
template<typename Container>
class ev::Grid_< Container >
This class arranges any event container into a grid of MxN cells covering the sensor.
Any container that offers push() or push_back() can be used as cell; push() takes precedence, so containers such as ev::SlidingWindow_ keep their own insertion policy:
This class arranges any event container into a grid of MxN cells covering the sensor.
Definition grid.hpp:44
◆ EventType
template<typename Container>
| using ev::Grid_< Container >::EventType = typename Container::value_type |
Event type held by the cells
template<typename Container>
| using ev::Grid_< Container >::T = typename EventType::value_type |
Coordinate type of the events
◆ Grid_()
template<typename Container>
template<typename... Args>
| ev::Grid_< Container >::Grid_ |
( |
const cv::Size | sensor, |
|
|
const cv::Size | cells, |
|
|
Args &&... | args ) |
|
inlineexplicit |
Construct a grid of cells covering the sensor.
- Parameters
-
| sensor | Sensor size in pixels |
| cells | Number of cells: width columns and height rows |
| args | Arguments forwarded to the constructor of every cell |
◆ cell()
template<typename Container>
Cell an event falls into.
- Parameters
-
- Returns
- Cell as (column, row), or (-1, -1) if the event is outside the sensor
◆ cellSize()
template<typename Container>
| cv::Size ev::Grid_< Container >::cellSize |
( |
| ) |
const |
|
inlinenodiscard |
Size of each cell in pixels.
- Returns
- Cell size
◆ cols()
template<typename Container>
Number of columns of the grid.
- Returns
- Columns
◆ insert()
template<typename Container>
Insert an event into the cell its coordinates fall into.
- Parameters
-
- Returns
- True if the event is inside the sensor and was inserted
◆ operator()() [1/4]
template<typename Container>
| Container & ev::Grid_< Container >::operator() |
( |
const cv::Point | c | ) |
|
|
inlinenodiscard |
Access a cell.
- Parameters
-
- Returns
- Reference to the cell container
◆ operator()() [2/4]
template<typename Container>
| const Container & ev::Grid_< Container >::operator() |
( |
const cv::Point | c | ) |
const |
|
inlinenodiscard |
Access a cell.
- Parameters
-
- Returns
- Const reference to the cell container
◆ operator()() [3/4]
template<typename Container>
| Container & ev::Grid_< Container >::operator() |
( |
const int | row, |
|
|
const int | col ) |
|
inlinenodiscard |
Access a cell.
- Parameters
-
| row | Row index |
| col | Column index |
- Returns
- Reference to the cell container
◆ operator()() [4/4]
template<typename Container>
| const Container & ev::Grid_< Container >::operator() |
( |
const int | row, |
|
|
const int | col ) const |
|
inlinenodiscard |
Access a cell.
- Parameters
-
| row | Row index |
| col | Column index |
- Returns
- Const reference to the cell container
◆ rows()
template<typename Container>
Number of rows of the grid.
- Returns
- Rows
◆ sensorSize()
template<typename Container>
| cv::Size ev::Grid_< Container >::sensorSize |
( |
| ) |
const |
|
inlinenodiscard |
Size of the sensor in pixels.
- Returns
- Sensor size
◆ size()
template<typename Container>
| cv::Size ev::Grid_< Container >::size |
( |
| ) |
const |
|
inlinenodiscard |
Number of cells: width columns and height rows.
- Returns
- Grid shape
The documentation for this class was generated from the following file:
- modules/containers/include/openev/containers/grid.hpp