https://github.com/jonathanschilling/irb
InfraTec IRBIS thermographic image (*.irb) file reader in Java
https://github.com/jonathanschilling/irb
fileformat infrared irb
Last synced: 12 months ago
JSON representation
InfraTec IRBIS thermographic image (*.irb) file reader in Java
- Host: GitHub
- URL: https://github.com/jonathanschilling/irb
- Owner: jonathanschilling
- License: apache-2.0
- Created: 2020-04-08T23:04:52.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-07T20:19:30.000Z (almost 2 years ago)
- Last Synced: 2024-07-08T11:55:47.319Z (almost 2 years ago)
- Topics: fileformat, infrared, irb
- Language: Java
- Homepage:
- Size: 5.46 MB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# irb
A reader in pure Java for the `*.irb` file format by InfraTec,
inspired by https://github.com/tomsoftware/Irbis-File-Format .
This program can be used either as a Maven dependency within another program
or as a stand-alone commandline utility.
The ready-to-use jar can be downloaded here:
[irb-1.1.0.jar](https://github.com/jonathanschilling/irb/releases/download/v1.1.0/irb-1.1.0.jar)
## Legal disclaimer
This is a pure hobby project. No copyright infringements or similar is intended.
Please inform the author about possible legal issues before turning to a lawyer.
## Building
1. Download and install build dependencies
1. JDK 1.8 (or any newer version)
2. Maven
2. Build a runnable self-contained jar file:
```bash
> mvn clean package
```
The output will be at `target/irb-1.1.0.jar`.
## Use as a Maven dependency
You can include this project as a dependency in Maven:
```xml
de.labathome
irb
1.0.3
```
FIXME: The latest released version on Maven Central is still `1.0.3`.
## Command-line Usage
Run-time dependencies for use with JyPlot:
- Python3 packages
- matplotlib
- Requires libjpeg and zlib development headers for *pillow*
- numpy
Execute the jar with the `*.irb` file as first command line argument:
```bash
> java -jar irb-1.1.0.jar AB020300.irb
```
It can also be run in headless mode, where no attempt will be made to plot the image using JyPlot:
```bash
> java -jar irb-1.1.0.jar --headless AB020300.irb
```
This will generate two text output files and a direct PNG equivalent of the data:
* `AB020300.irb.img_0.dat` contains the raw image data in degree Celsius as a two-dimensional matrix.
Each line in the file contains the temperatures for each pixel of the corresponding line of the image.
The first line corresponds to the top of the image for easy plotting with e.g. Gnuplot:
```
plot 'AB020300.irb.img_0.dat' matrix w image
```
* `AB020300.irb.meta_0.json` contains the meta-data of the image in the JSON format.
* `AB020300.irb.img_0.png` contains a direct PNG export of the image data
with the temperature in degree Celsius mapped to a `jet`-like colorbar.
If not run in headless mode, a direct plot of the image is tried using JyPlot.
This requires to have a Python installation with `matplotlib` and `numpy` on your `$PATH`.
A temporary Python script file is created in a folder `PythonScript` in your home directory.
This will be executed by the default `python` command.
If JyPlot cannot find your `python` installation, it will print a corresponding stack trace of error messages.
You can fix this by telling JyPlot about your Python installation by creating a text file
`~/PythonScript/PYTHON_PATH.txt` which contains the absolute path to your Python executable
(`python` on Linux and Mac, `python.exe` on Windows).
The text output files should nevertheless get created.
## Video Files
Since `v1.1.0`, this tool can read and export video files.
If video data is detected, each frame found in the given file is exported
in the same way as the headless data (see above).
Assuming the input file is `video_file.irb`, the output files would be named as follows:
* `video_file___img.dat` is the text file containing a `height`x`width` matrix of the temperature in degrees Celsius
* `video_file___meta.json` is the JSON file containing the meta-data of the respective frame
* `video_file__.png` is a raw PNG for quickly having a look. No colorbar is plotted yet
In these file names, `` is the frame index, counting the frames up from 0.
Similarly, `` is the index of the exported image in the given frame.
(I don't know why there would be more than one image per video frame, but you never know...)
## Contributers
* [jonathanschilling](https://github.com/jonathanschilling)
* [benjaminSchilling33](https://github.com/benjaminschilling33)
* [uhoefel](https://github.com/uhoefel)
## License
SPDX-License-Identifier: Apache-2.0