Menu

Visualizing custom data in cAER

Developers
2016-04-12
2016-05-13
  • Marek Otahal, CTU Prague

    Hi,

    I'd like to visualize custom data along with the visualizations from "cAER/trunk/modules/visualizer/visualizer.h".
    For simplicity take I'd like to show a text "MyValue: val" and optionally a bar (the val is a float on defined range).

    Do you think it would be useful to add this to the Visualizer?
    If so, how? I could just add a call "updateValue(newVal)"? Or should this be a new special event (that holds only event's name and new value) and add a code to visualize these events? Is something like that already available (the vis. in jAER shows values & bars with the statistics)?

    Thanks a lot,
    M.

     
  • Federico Corradi

    Hi Marek,

    visualizing custom data in cAER it is possible. In fact, the visualizer is abstracted in such a way that you could open a new window and displays your own data.

    For example, the imagestreamervisualizer module (https://svn.code.sf.net/p/jaer/code/cAER/trunk/modules/imagestreamervisualizer/), accumulates a fixed amount of spikes and produces images that are made by histograms of spikes.
    My suggestion is to start from this module (imagestreamervisualizer) and adapt it to your needs. The current version of cAER uses allegro5 libraries: a video library used to develop video games and multimedia programming. (http://liballeg.org/) I guess, displaying a bar and update it can be done easily.

    In jAER there are already many statistic filters (https://sourceforge.net/p/jaer/wiki/FilterIndex_1/) like the ISIhistrogrammer or others. In jAER, from the HW configuration window you can enable or disable a simple histogram of Inter Spike Intervals.

    Is this what you needed? please let me know how it goes.

    happy coding,
    Federico

     

    Last edit: Federico Corradi 2016-04-12
  • Marek Otahal, CTU Prague

    Hello again Federico!

    thank you very much for help and the pointer to imagestreamervisualizer (I was looking only at visualizer somehow).

    What I want is to display the DVS and frame events (as in visualizer) + a bar for my custom variable; I'll look at the examples and post back.

    Thanks a lot! Mark

     
  • Luca Longinotti

    Luca Longinotti - 2016-04-13

    Currently the visualizer is easy to work with if you want to visualize polarity events or frames or IMU events, but it doesn't yet easily support custom data. Adding a user-defined call-back so you can supply your own drawing function is on the TODO list. In any case, start by taking a look at Allegro, since you'd have to use it anyway then to do what you want. For text and bars, al_draw_line() and al_draw_text() are very easy to use.

     
  • Marek Otahal, CTU Prague

    Toying with the Visualizer, I've reported several bugs, would be great if you could take a look. Thanks in advance!

     
  • Luca Longinotti

    Luca Longinotti - 2016-05-03

    WIll do, though most bugs with the visualizer have turned out to be problems with old graphics drivers. And I'm pretty certain that's what you're seeing.

     
  • Marek Otahal, CTU Prague

    Thank you. Though my drivers are up-to-date (linux versions of Intel and NV).

    Can the problem be similar as with jOGL in jAER on intel? How can I run caer in dual-GPU notebook on nVidia driver? (I have a primusrun utility..)

    Tried and problems persist, intel or NV.

    I really think it's an issue with IMU:
    a) cam in default position (the hole for fit-screw is down) - works OK
    b) same as a) but when I rotate the cam -> crash "rx >= 0 Failed"
    c) cam on its "back"(=the largest side) -> instant crash as above.

     
  • Luca Longinotti

    Luca Longinotti - 2016-05-09

    OK I've done a major overhaul of the visualizer. Now you can easily enable/disable each visualizer if they give you problems, but even IMU should work fine now.
    It really depends a lot on the drivers, the current code works perfectly on recent systems but randomly segfaults on Fedora 22+Intel for example, and debugging always shows the crash inside some Intel Mesa driver function. The 3D stack is just too old on Fedora 22 or Ubuntu 14.04 to reliably work. I now check for Allegro 5.0.11 at least, which is only present in newer Ubuntu/Fedora releases. And I won't accept bug reports if the 3D stack is older than late 2015.
    Now the Visualizer also supports custom renderer and event handler call-backs, so you can do your own drawing if needed.

     
  • Marek Otahal, CTU Prague

    Hi Luca,
    thank you very much for fixing the Visualizer issues and adding the custom callback from drawing!
    I'll test it again now.
    Best, Mark