This is an auxiliary class. This class cannot be instanced.
More...
#include <stats.hpp>
|
|
using | ResultType = TimeType |
|
| ResultType | duration () const |
| | Time difference between the last and the first event.
|
| ResultType | rate () const |
| | Compute event rate as the ratio between the number of events and the time difference between the last and the first event.
|
| ResultType | density (const cv::Size size) const |
| | Compute event density as the ratio between the number of events and the number of pixels.
|
| std::size_t | activePixels () const |
| | Count the pixels with at least one event.
|
| ResultType | fillRatio (const cv::Size size) const |
| | Compute fill ratio as the fraction of pixels with at least one event.
|
| ResultType | polarityRatio (const PolarityType p) const |
| | Compute polarity ratio as the fraction of events with the given polarity.
|
| Event_< ResultType > | mean () const |
| | Compute the mean of the events.
|
| cv::Point_< ResultType > | meanPoint () const |
| | Compute the mean x,y point of the events.
|
| cv::Matx< ResultType, 2, 2 > | covariance () const |
| | Compute the covariance of the x,y coordinates of the events around meanPoint().
|
| cv::Rect | boundingBox () const |
| | Compute the smallest rectangle of pixels containing the events.
|
| ResultType | meanTime () const |
| | Compute the mean time of the events.
|
| ResultType | midTime () const |
| | Calculate the midpoint time between the oldest and the newest event.
|
| std::size_t | peak () const |
| | Find the largest number of events on a single pixel.
|
| ResultType | entropy () const |
| | Compute the Shannon entropy of the spatial distribution of the events.
|
template<typename Derived>
class ev::Stats_< Derived >
This is an auxiliary class. This class cannot be instanced.
- Note
- Each statistic uses the getters of its ingredients when the class offers them.
◆ activePixels()
template<typename Derived>
| std::size_t ev::Stats_< Derived >::activePixels |
( |
| ) |
const |
|
inlinenodiscard |
Count the pixels with at least one event.
- Returns
- Number of active pixels
◆ boundingBox()
template<typename Derived>
| cv::Rect ev::Stats_< Derived >::boundingBox |
( |
| ) |
const |
|
inlinenodiscard |
Compute the smallest rectangle of pixels containing the events.
- Returns
- Bounding box in pixels
◆ covariance()
template<typename Derived>
| cv::Matx< ResultType, 2, 2 > ev::Stats_< Derived >::covariance |
( |
| ) |
const |
|
inlinenodiscard |
Compute the covariance of the x,y coordinates of the events around meanPoint().
- Returns
- Covariance matrix, with the variances of x and y in the diagonal
◆ density()
template<typename Derived>
| ResultType ev::Stats_< Derived >::density |
( |
const cv::Size | size | ) |
const |
|
inlinenodiscard |
Compute event density as the ratio between the number of events and the number of pixels.
- Parameters
-
- Returns
- Events per square pixel
◆ duration()
template<typename Derived>
| ResultType ev::Stats_< Derived >::duration |
( |
| ) |
const |
|
inlinenodiscard |
Time difference between the last and the first event.
- Returns
- Time difference
◆ entropy()
template<typename Derived>
| ResultType ev::Stats_< Derived >::entropy |
( |
| ) |
const |
|
inlinenodiscard |
Compute the Shannon entropy of the spatial distribution of the events.
- Returns
- Entropy in bits
- Note
- \( H = -\sum_i p_i \log_2 p_i \), where \( p_i \) is the fraction of events falling on the i-th pixel.
◆ fillRatio()
template<typename Derived>
| ResultType ev::Stats_< Derived >::fillRatio |
( |
const cv::Size | size | ) |
const |
|
inlinenodiscard |
Compute fill ratio as the fraction of pixels with at least one event.
- Parameters
-
- Returns
- Fraction of active pixels, between 0 and 1
◆ mean()
template<typename Derived>
Compute the mean of the events.
- Returns
- An Eventd object containing the mean values of x, y, t, and p attributes.
◆ meanPoint()
template<typename Derived>
| cv::Point_< ResultType > ev::Stats_< Derived >::meanPoint |
( |
| ) |
const |
|
inlinenodiscard |
Compute the mean x,y point of the events.
- Returns
- Mean point
◆ meanTime()
template<typename Derived>
| ResultType ev::Stats_< Derived >::meanTime |
( |
| ) |
const |
|
inlinenodiscard |
Compute the mean time of the events.
- Returns
- Mean time
◆ midTime()
template<typename Derived>
| ResultType ev::Stats_< Derived >::midTime |
( |
| ) |
const |
|
inlinenodiscard |
Calculate the midpoint time between the oldest and the newest event.
- Returns
- Midpoint time
◆ peak()
template<typename Derived>
Find the largest number of events on a single pixel.
- Returns
- Peak count
◆ polarityRatio()
template<typename Derived>
| ResultType ev::Stats_< Derived >::polarityRatio |
( |
const PolarityType | p | ) |
const |
|
inlinenodiscard |
Compute polarity ratio as the fraction of events with the given polarity.
- Parameters
-
| p | Polarity, POSITIVE or NEGATIVE |
- Returns
- Fraction of events with that polarity, between 0 and 1
◆ rate()
template<typename Derived>
Compute event rate as the ratio between the number of events and the time difference between the last and the first event.
- Returns
- Event rate
The documentation for this class was generated from the following file: