Raw image data previewer is an open-source utility dedicated to parsing and displaying binary data acquired straight from a camera.
This simple utility provides features like:
- previewing most used raw color formats
- RGB-like formats
- YUVs (packed, semiplanar, planar)
- Grayscales
- Bayer RGBs
- exporting raw image data to more complex formats (ie. PNG, JPG)
- Python >=v3.9
- numpy
- opencv
- PIL
sudo pacman -Sy python-pip git
git clone https://github.com/antmicro-labs/raw-image-data-previewer.git
cd raw-image-data-previewer
pip install -r requirements.txtsudo apt-get install python3-pip git python3-pil.imagetk
git clone https://github.com/antmicro-labs/raw-image-data-previewer.git
cd raw-image-data-previewer
python3 -m pip install -r requirements.txtTo start an empty GUI (without any data loaded) use:
cd raw-image-data-previewer
python3 -m appYou 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:
cd raw-image-data-previewer
python3 -m app --helpThe utility also provides a way to convert binary files containing image data to more complex formats (ie. PNG, JPG) without starting the grahpical interface.
To use this option simply add the --export argument with the target filename with extension.
Currently supported color formats and planned ones can be found in the documentation.
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:
- Under
AVAILABLE_FORMATSlist incolor_format.pyadd new instance of one of the color format classes with proper fields filled. - Provide parsing and displaying function by extending
AbstractParserfound incommon.pyor by using an existing one.- If you choose to implement a new one remember that
parse()should return one dimensionalndarraywith values read from the binary file.display()on the other hand should return RGB-formatted 3-dimensionalndarrayconsisting of original color format values converted to RGB24.
- If you choose to implement a new one remember that
- 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 inapp/parser/factory.py).
- Błażej Ułanowicz (blazejulanowicz)
- Dawid Dopart (DopartDawid)
- Maciej Tylak (Ty7ak)
- Maciej Franikowski (MaciejFranikowski)
The utility is licensed under the Apache-2 license. For details, please read the LICENSE file.
