antmicro / raviewer

Raw image/video data analyzer
https://antmicro.github.io/raviewer/
Apache License 2.0
44 stars 3 forks source link
python reverse-engineering v4l2 video-processing video-streaming

Raviewer

Copyright (c) 2021-2024 Antmicro

Raviewer is an open-source utility dedicated to parsing and displaying binary data acquired straight from a camera.

Main window

Installation

Requirements

Installation

Arch Linux

sudo pacman -Sy python-pip git
pip install git+https://github.com/antmicro/raviewer.git

Debian

sudo apt-get install python3-pip git python3-pil.imagetk
pip install git+https://github.com/antmicro/raviewer.git

Usage

To start an empty GUI (without any data loaded) use:

raviewer

You can also start the GUI with already loaded data and parameters (like width and color format). More information about available arguments can be found in command-line help:

raviewer --help

Core Features

Supported formats information

Currently supported color formats and planned ones can be found in the documentation.

Extending supported color formats

Adding new color formats

Currently there are two classes that can describe color formats: ColorFormat and SubsampledColorFormat (found in app/image/color_format.py). To create a new color format, simply:

Step 1.

Under AVAILABLE_FORMATS list in color_format.py add new instance of one of the color format classes with proper fields filled.

Step 2.

Provide parsing and displaying function by extending AbstractParser found in common.py or by using an existing one. If you choose to implement a new one remember that parse() should return one dimensional ndarray with values read from the binary file. display() on the other hand should return RGB-formatted 3-dimensional ndarray consisting of original color format values converted to RGB24.

Step 3.

The utility provides proper parser by checking color format parameters (mainly PixelFormat), so make sure, that your new color format has a valid translation of parameters to one of the parsers (this functionality can be found in app/parser/factory.py).

License

The utility is licensed under the Apache-2 license. For details, please read the LICENSE file.