OpenEV
Extending OpenCV to event-based vision
Loading...
Searching...
No Matches
ev::HotPixelFilter Class Reference

Hot pixel filter for event noise removal. More...

#include <filtering.hpp>

Public Member Functions

 HotPixelFilter (const cv::Size &size, ev::TimeType window, double factor=DEFAULT_FACTOR, std::size_t limit=DISABLED)
 HotPixelFilter (const HotPixelFilter &)=default
 HotPixelFilter (HotPixelFilter &&) noexcept=default
HotPixelFilter & operator= (const HotPixelFilter &)=default
HotPixelFilter & operator= (HotPixelFilter &&) noexcept=default
void setWindow (const ev::TimeType window)
 Set the duration of the time windows.
void setFactor (const double factor)
 Set the criterion relative to the mean count.
void setLimit (const std::size_t limit)
 Set the absolute criterion.
const cv::Mat_< uchar > & mask () const
 Get the pixels marked as hot when the last window ended.
void reset ()
 Forget every recorded event and every hot pixel.
bool operator() (const ev::Event &e)

Static Public Attributes

static constexpr double DEFAULT_FACTOR = 10.0
static constexpr std::size_t DISABLED = 0

Detailed Description

Hot pixel filter for event noise removal.

Constructor & Destructor Documentation

◆ HotPixelFilter()

ev::HotPixelFilter::HotPixelFilter ( const cv::Size & size,
ev::TimeType window,
double factor = DEFAULT_FACTOR,
std::size_t limit = DISABLED )

Constructor.

Parameters
sizeSensor resolution (width x height)
windowDuration of the time windows over which events are counted
factorNumber of times the mean count a pixel has to exceed to be marked as hot; 0 disables this criterion
limitNumber of events per window a pixel has to exceed to be marked as hot; 0 disables this criterion

Member Function Documentation

◆ mask()

const cv::Mat_< uchar > & ev::HotPixelFilter::mask ( ) const
inlinenodiscard

Get the pixels marked as hot when the last window ended.

Returns
Mask with non-zero values on the hot pixels

◆ operator()()

bool ev::HotPixelFilter::operator() ( const ev::Event & e)
nodiscard

Test and record a single event.

Parameters
eEvent to evaluate
Returns
True if the event passes (its pixel is not marked as hot)

◆ setFactor()

void ev::HotPixelFilter::setFactor ( const double factor)
inline

Set the criterion relative to the mean count.

Parameters
factorNumber of times the mean count a pixel has to exceed to be marked as hot; 0 disables this criterion

◆ setLimit()

void ev::HotPixelFilter::setLimit ( const std::size_t limit)
inline

Set the absolute criterion.

Parameters
limitNumber of events per window a pixel has to exceed to be marked as hot; 0 disables this criterion

◆ setWindow()

void ev::HotPixelFilter::setWindow ( const ev::TimeType window)
inline

Set the duration of the time windows.

Parameters
windowDuration of the time windows over which events are counted

The documentation for this class was generated from the following files: