Skip to main content

A package which connects an MLX90640 Thermal IR Camera to a Raspberry Pi for viewing or web streaming.

Project description

README

Documentation of the pithermalcam project and accompanying PyPI package, which connects an MLX90640 thermal camera up to a Raspberry Pi. (Built on a Pi 4)

Setup based primarily off the articles by Joshua Hrisko at MakerPortal and by Валерий Курышев’s under the name Walker2000 at Habr and flask pieces based on the work of Adrian Rosebrock at pyimagesearch. Many thanks these people for their great work.

Full details for this project are available at https://tomshaffner.github.io/PiThermalCam/, including comprehensive hardware/software setup, install, usage instructions, and examples of potential results. A cursory overview for development purposes only is included here.

Manual Install/Setup

This section discusses software setup only, and assumes you have hardware set up, the MLX90640 correctly wired up, I2C turned on, and the I2C baudrate increased to 400k. Refer to the above full details link for detailed instructions on both the hardware and software installs.

The below install is for manual operation of the library. For the Pip install from PyPi skip the below and simply execute pip3 install pithermalcam.

  1. Install, using apt-get, the following items: libatlas-base-dev python-smbus i2c-tools

  2. Install remaining requirements using either: a. pip3 install the requirements.txt or b. pip3 install the requirements_without_opencv.txt

    Download, build, and install OpenCV locally (painstaking process, but results in more optimized code.).

    Install cmapy using --no-deps pip3 flag to avoid installing OpenCV via pip3.

Usage

Pip Library Install

If you install the library via Pip you can follow the usage shown in the examples folder to see usage instructions.

Clone library locally

If you wish to clone the library, execute this clone command:

git clone -b master --single-branch https://github.com/tomshaffner/PiThermalCam.git

This clones the code without cloning the pictures for the accompanying article (which take up excessive space).

To operate from here:

  1. Copy the icons to your desktop and make executable.

or

  1. Run the files directly in python3:

Run pithermalcam/web_server.py to set up a flask server and stream live video over the local network.

Run pithermalcam/pi_therm_cam.py to display the video feed onscreen.

Check sequential_versions folder for sequential running approaches that are easier to track/follow (i.e. sequential running rather than object-oriented classes). These are less robust, but can be easier to understand/track/edit, particularly for those coming from a scientific background. Again, refer to the link at top for a detailed discussion.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pithermalcam-1.0.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

pithermalcam-1.0.0-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file pithermalcam-1.0.0.tar.gz.

File metadata

  • Download URL: pithermalcam-1.0.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for pithermalcam-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d73cba30cab47bb0fae8bb475b85d3853cc99c7759fbe6d57813cb0f03d6b24e
MD5 35eac2e264e2f77dae1973b6b8b5902e
BLAKE2b-256 af20b6bf779aaa174c4f2a101dea2965834206214c9bb400d1decf32982d6b16

See more details on using hashes here.

File details

Details for the file pithermalcam-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pithermalcam-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for pithermalcam-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2dfb26bc48fcaa3e933d6fbc3b93c5b9bd13f351426e97e7fc515dc2f0a2c2a
MD5 bbfd0e6368c5387988485a98d6958cfc
BLAKE2b-256 860da7578ce08b841ba9a3c11ba9959af52a1dbfe6db5b2d2a83a12c5c520da7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page