-
Notifications
You must be signed in to change notification settings - Fork 5
blob tracker
example files: examples/blob_tracker
You can either create a similar directory and install the Sepia, Tarsier and Chameleon dependencies as in the basics tutorials, or run:
git clone https://github.com/neuromorphic-paris/tutorials
cd tutorials/examples/blob_tracker
git submodule update --init --recursive -- third_party/sepia
git submodule update --init --recursive -- third_party/tarsier
git submodule update --init --recursive -- third_party/chameleon
premake4 gmake
cd build
make && release/blob_tracker
The Chameleon library's displays have two kinds of architectures : most of them provide shaders (programs for the GPU), but the blob_display uses the higher-level Qt API to draw polygons.
This example implements an object tracker based on Gaussian blobs. It can be used as an inspiration to implement an algorithm visualizer using primitives, such as points, lines or polygons.
The generated events must trigger two observables:
- the
tarsier::track_blob
event handler, to update the blob's parameters (which are, in turn, pushed to the blob display) - a lambda function to push the events to the DVS display
The tarsier::replicate
's constructor takes an arbitrary number of observables as parameters. When it receives an event, it triggers all its observables, and provides them with a copy of the original event.
Chameleon's shader-based displays internally use two areas: the clear area fills the component's width and height, with a changing shape factor, whereas the paint area fits the clear area while keeping the same shape factor as the display's canvas size. The blob display must overlay the paint area, hence its position, width and height must be updated when the paint area changes. This behavior is implemented using the QML onPaintAreaChanged
callback.