05 Hybrid vision algo API
Overview
Hybrid vision algo is a high-performance algorithm library designed specifically for Event Cameras, providing a variety of advanced event denoising algorithms. This document details the usage of all public APIs in the library.
Namespace
All algorithms are located under the Shimeta::Algorithm namespace, further divided by functional modules:
Shimeta::Algorithm::Denoise- Denoising algorithm moduleShimeta::Algorithm::CV- Computer vision moduleShimeta::Algorithm::CV3D- 3D vision moduleShimeta::Algorithm::Restoration- Image restoration module
Denoising Algorithm Module (Denoise)
1. DoubleWindowFilter
The double window filter uses two circular buffers to classify CD events.
Class Definition
class DoubleWindowFilter {
public:
explicit DoubleWindowFilter(
const size_t bufferSize = 36,
const size_t searchRadius = 9,
const size_t intThreshold = 1
);
void initialize();
size_t countNearbyEvents(const Metavision::EventCD &event);
bool evaluate(const Metavision::EventCD &event);
bool retain(const Metavision::EventCD &event) noexcept;
std::vector<Metavision::EventCD> process_events(const std::vector<Metavision::EventCD> &events);
};Constructor Parameters
bufferSize: Circular buffer size (Default: 36)searchRadius: Search radius, maximum L1 distance to consider nearby events (Default: 9)intThreshold: Minimum number of nearby events to classify an event as real (Default: 1)
Main Methods
initialize(): Initialize the filtercountNearbyEvents(): Count the number of nearby events in the two windowsevaluate(): Evaluate whether the event is signal or noiseretain(): Inline method to process a single eventprocess_events(): Batch process event vector
Usage Example
#include <denoise/double_window_filter.h>
// Create filter
Shimeta::Algorithm::Denoise::DoubleWindowFilter filter(36, 9, 1);
filter.initialize();
// Process single event
Metavision::EventCD event;
bool isSignal = filter.evaluate(event);
// Batch process
std::vector<Metavision::EventCD> events;
auto filteredEvents = filter.process_events(events);2. EventFlowFilter
Noise suppression filter based on event flow density and flow velocity characteristics.
Class Definition
class EventFlowFilter {
public:
explicit EventFlowFilter(
const size_t bufferSize = 100,
const size_t searchRadius = 1,
const double floatThreshold = 20.0,
const int64_t duration = 2000
);
void initialize();
double fitEventFlow(const Metavision::EventCD &event);
bool evaluate(const Metavision::EventCD &event);
bool retain(const Metavision::EventCD &event) noexcept;
std::vector<Metavision::EventCD> process_events(const std::vector<Metavision::EventCD> &events);
};Constructor Parameters
bufferSize: Buffer size (Default: 100)searchRadius: Spatial neighborhood radius (Default: 1)
