Skip to content

mask_isolated

Alexandre Marcireau edited this page May 31, 2018 · 8 revisions

In header "../third_party/tarsier/source/mask_isolated.hpp"

tarsier::mask_isolated propagates only events that are not isolated spatially or temporally.

namespace tarsier {
    template <typename Event, typename HandleEvent>
    class mask_isolated {
        public:
        mask_isolated(uint16_t width, uint16_t height, uint64_t temporal_window, HandleEvent handle_event);

        /// operator() handles an event.
        virtual void operator()(Event event);
    };
}
  • Event is the input type. It must have at least the properties t, x and y.
  • The expression handle_event(event), where event is an Event object, must be valid.
  • width and height are the maximum x and y coordinates plus one (if x is in the integer range [0, 319], width must be 320).
  • temporal_window is the oldest an event can be to validate a neighboring one.

Event must be specified when using make_mask_isolated:

struct event {
    uint64_t t;
    uint16_t x;
    uint16_t y;
};

auto mask_isolated = tarsier::make_mask_isolated<event>(
    320,
    240,
    1e6,
    [](event event) {
        // do something with event
    });
Clone this wiki locally