Feel free to contact me if you have any questions about the sensor or the research.
If you need to use this module to work with Heimann HTPA32x32d, I suggest forking the repo because maintaining backwards compatibility (as well as documentation) is not my priority at the moment.
This repository contains tools to work with thermopile sensor array Heimann HTPA 32x32d and UDP communication module (included in the starting kit) in multi-view setup. Because it is still uner development for my research, there might be no backward compability between the commits.
Thermopile sensor array is an extremely low-resolution far-infrared imaging sensor (camera). This sensor can preserve the privacy of people captured, so I use this sensor in my on-going research on using thermopile sensor arrays in monitoring systems capable of early event detection/risk assessment/accident prevention.
This repo is developed for HTPA 32x32d but can be easily modifed to generalize to any device resolution.
You can learn about the sensor more by visiting Heimann Sensor's website, or you can learn more about me and my research on my website. You can also contact me on LinkedIn.
A collection of useful functions and data structures for working with data captured by Heimann HTPA32x32d and other thermopile sensor arrays.
- Call
SUPPORTED_EXTENSIONS
to see the list of currently supported types.- txt ⟵ currently the only extension that can copy file headers (the first line in Heimanns HTPA recordings)
- csv
- pickle (.pickle, .pkl, .p)
read_tpa_file
reads files with supported extensions (deduced from filename extension given as argument)write_tpa_file
writes files with supported extensions (deduced from filename extension given as argument)
apply_heatmap
applies opencv (cv2) heatmapsnp2pc
temperature numpy array to pseudocolored numpy arraywrite_pc2gif
pseudocolored RGB sequence to animated gif, timing between frames is kept if duration is passed- use
timestamps2frame_durations
if you need to convert timestamps to frame durations
- use
match_timesteps
to get indexes of timestamps so that timestamp[corresponding_index_list] is aligned with other given timestampsresampling
crop_center
to keep only center portion of the sequence, e.g. 28x28 out of 32x32 pixels
Samples now support visualization by using write_gif() [given that the data is aligned].
TPA_Sample_from_data
TPA_Sample_from_filepaths
TPA_RGB_Sample_from_data
TPA_RGB_Sample_from_filepaths
See examples/dataset_making and examples/dataset_making/README.md.
Python program that connects to Heimann HTPA sensors given their IP addresses (in settings file) and records data captured to TXT files. Supports recording mutliple sensors at the same time. This tool is supposed to help developing multi-view thermopile sensor array monitoring system. Number of the cameras it can connect to is unlimited.
Python program that converts TXT files recorded by Heimann HTPA sensors and
To get help run (depedning on the OS, you might need to change python
to python3
):
python converter.py --help
python converter.py --csv --gif --bmp --crop=26 --overwrite DIRECTORY_CONTAINING_FILES__OR__SINGLE_FILE_PATH
Equivalent to:
python converter.py -c -g -b --crop=26 --overwrite DIRECTORY_CONTAINING_FILES__OR__SINGLE_FILE_PATH
Converts all TXT files in a given directory or a given file:
--csv
to CSV file,
--gif
to GIF annimation preserving original frame durations,
--bmp
extracts frames to a directory named after the filename,
--crop
in pixels, data frames are cropped to a patch of a given size in the center of the frame (note: CSV is never affected by this flag),
--overwrite
overwrites the files if they already exists.
--debug
debugs corrupted .TXT files.
Python program that connects to Heimann HTPA sensors given their IP addresses (in settings file) and captures data (single frames) to TXT files. Supports recording mutliple sensors at the same time. This tool is supposed to help developing multi-view thermopile sensor array monitoring system. Number of the cameras it can connect to is unlimited.
Python program that converts TXT files (single-frame files) recorded by Heimann HTPA sensors and calculates and saves histograms.
@misc{im2020HTPA32x32d,
author = {Igor Morawski},
title = {HTPA32x32d tools},
howpublished = {\url{https://github.com/igor-morawski/HTPA32x32d/}},
year = {2020}
}