Visualize Computer Vision Results Neatly in 2D

Documentation Status License MIT

Warning

viren2d has not yet reached a stable v1.0 release.

A stable, mostly feature-complete version might be released in early 2023 (this is only a hobby project). I do not recommend using this toolbox before v1.0. Until then, the API may and will change anytime, many features are still not properly tested, python bindings & documentation might be incomplete, etc.

viren2d is my Swiss Army knife to visualize the results of common computer vision tasks in 2D. It is designed to be swiftly integrated into both C++ and Python environments.

What is it good for?

This library is designed to overlay detections, trajectories, hand & body poses and more on image data. Additionally, it provides several colorization options to represent data by false colors, useful to inspect or highlight structure and features in your data more easily. Finally, it can be used as a simplistic drawing toolbox, if basic shapes are all you need.

How to get started?
What’s under the hood?

The heavy lifting to ensure proper rendering of the visualizations is done via the Cairo 2D graphics library.

Linear algebra needed to support 3D 2D projections is handled via Eigen.

Python bindings are realized via pybind11.

How to pronounce viren2d?

vi-ren-2d”, with vi as in vision and ren as in rendering. This is by the way also how you pronounce the German word Viren (viruses). I might have been affected by the aftermath of the pandemic when picking a name…

Which features are available?

Already implemented, documented & tested features in the following list are marked by . See also the up-to-date list of drawing functions.

  • Drawing Arcs

  • Drawing Arrows

  • Drawing Bounding Boxes (2D)

  • Drawing Circles

  • Drawing Coordinate System Axes - WIP (implemented, but not tested/documented)

  • Drawing Ellipses

  • Drawing Lines

  • Drawing Markers

  • Drawing Polygons

  • Drawing Rectangles

  • Drawing Text (single-/multi-line)

  • Drawing Text Boxes (single-/multi-line)

  • Drawing Trajectories

  • Image Overlay - WIP (implemented, but not tested/documented)

  • Label Image Colorization

  • Optical Flow Colorization

  • Pixelation

  • Relief Shading - WIP (implemented, but not tested)

  • Scaled Colorization (Pseudo/False Colors)

Which features will be added in the future?

  • Drawing Bounding Boxes (3D)

  • Camera calibration-related: Ground plane, horizon, axes, …

  • Drawing Body/Hand Poses