Skip to content

hsfl/boson-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Boson Thermal Camera Viewer

Cross-platform terminal-based tool for the FLIR Boson 320+ thermal camera. Supports live streaming and video capture with raw data export.

Files

  • boson_stream.py — CLI tool for camera streaming and recording
  • requirements.txt — Python dependencies

Installation

  1. Download this repo from Github

  2. setup a python virtual environment in the project folder

python -m venv .venv
  1. activate your virtual environment. you'll know it's activated if you see (.venv) followed by your username.
# for Linux/macOS:
source .venv/bin/activate

# for Windows:
.venv/Scripts/activate.ps1
  1. install python dependencies
pip install -r requirements.txt

Usage

  1. run source .venv/bin/activate if not already activated.

IMPORTANT: make sure (.venv) is activated before running any commands!!

Commands

  1. help: To view a help menu with a list of available commands
python boson_stream.py help
  1. list: To list available camera devices:
python boson_stream.py list

sample output (on macOS):

Listing available camera devices...
  Camera index 0: FLIR Camera
  Camera index 1: FaceTime HD Camera

Depending on your device, the Boson camera will be named differently. Generally, you'll see something like "FLIR Camera" or "Boson Video"

  1. stream: to view the video stream only. if camera_index is not specified, the camera at index 0 will be selected by default.
python boson_stream.py stream [camera_index]

This will pop up a window with a live stream from the camera. TO END STREAMING: click on the window and press q.

note: this command does NOT save any data.

  1. record: to record videos and save raw data in ./data/<filename>/. if filename is not specified, it will save to a folder with the current timestamp in ./data/. if the camera_index is not specified, the camera at index 0 will be selected by default. if -n NUM_FRAMES is not specified, it will record indefinitely until you click on the window and press q to stop.
python boson_stream.py record [filename] [camera_index] [-n NUM_FRAMES]

WARNING: do NOT click X or use Ctrl+C to close the window. This will NOT save the files!!!

generally as a good practice, run the list and stream commands first before recording. this ensures that the camera is properly connected and you are using the correct index. also good practice to specify the number of frames to avoid very very large files!

examples:

# to save data to folder ./data/test, using camera at index 2, recording 100 frames
python boson_stream.py record test 2 -n 100

# to save data to folder ./data/<timestamp>, using camera at index 2, recording 100 frames
python boson_stream.py record 2 -n 100

# to save data to folder ./data/<timestamp>, using camera at index 0, recording 100 frames
python boson_stream.py record -n 100

# to save data to folder ./data/<timestamp>, using camera at index 0, recording until I press 'q'
python boson_stream.py record

After recording ends, the terminal will output the location of your files.

Recording 100 frames from camera index 0. Press "q" to stop early.

Captured 100 frames.
Recording stopped. 
        Video saved to: /Users/samanthamallari/Desktop/boson-viewer/data/20260305_154028/20260305_154028.avi
        Raw data saved to: /Users/samanthamallari/Desktop/boson-viewer/data/20260305_154028/20260305_154028_raw.npy
        CSV saved to: /Users/samanthamallari/Desktop/boson-viewer/data/20260305_154028/20260305_154028_raw_frame0.csv
  1. view: to view a playback of a previously recording .avi or .npy file. to exit, click on the window and press q.
python boson_stream.py view <path/to/file>

currently, CSV is not suppported by the playback viewer.

examples:

python boson_stream.py data/20260305_154028/20260305_154028.avi

python boson_stream.py data/20260305_154028/20260305_154028_raw.npy

View Controls

  • c — pause / resume playback
  • z — go back 1 frame (while paused)
  • x — go forward 1 frame (while paused)
  • Trackbar — scrub to any frame
  • q — quit viewer

Saved File Format

Files are saved into ./data/<filename>/:

data/<filename>/
    <filename>_<YYYYMMDD_HHMMSS>.avi                # video recording
    <filename>_<YYYYMMDD_HHMMSS>_raw.npy            # raw data (full bit depth)
    <filename>_<YYYYMMDD_HHMMSS>_raw_frame0.csv     # raw data as CSV (first frame only)

If a filename is not specified,

data/<YYYYMMDD_HHMMSS>/
    <YYYYMMDD_HHMMSS>.avi                # video recording
    <YYYYMMDD_HHMMSS>_raw.npy            # raw data (full bit depth)
    <YYYYMMDD_HHMMSS>_raw_frame0.csv     # raw data as CSV (first frame only)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages