Runs a FLIR Lepton 3.5 on a Purethermal3 in Windows 10.
Project description
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Lepton3.5_Purethermal3
Software to run a FLIR Lepton 3.5 mounted on a Groupgets Purethermal3 board running on Windows 10.
Installation
From PyPi (Reccomended)
It is reccomended that you use either Anaconda or Miniconda.
Run the commands below to create a fresh conda environment named lepton.
conda create -n lepton -y
conda activate lepton
Install pip in the environment.
conda install pip -y
Install lepton-pt
pip install lepton-pt
From Source
It is reccomended that you use either Anaconda or Miniconda.
Run the commands below to create a fresh conda environment named lepton.
conda create -n lepton -y
conda activate lepton
Install pip and git in the environment.
conda install pip git -y
Clone the Lepton3.5_Purethermal3 repository.
git clone https://github.com/GrayKS3248/Lepton3.5_Purethermal3.git
Navigate to the repository directory and install the package.
cd Lepton3.5_Purethermal3
pip install .
Usage
Streaming
After the Lepton is seated in the Purethermal board and connected to a device via a USB-C, activate the Conda environment in which this package is installed and start streaming the camera using the leprun command.
conda activate lepton
leprun
When you are finshed streaming, press the esc while the viewing window is active to terminate the streaming.
Recording
After the Lepton is seated in the Purethermal board and connected to a device via a USB-C, activate the Conda environment in which this package is installed and start streaming the camera using the leprun command and the -r flag.
conda activate lepton
leprun -r
The -r flag indicates that you want to record what is being streamed. All generated data is saved in a folder named rec_data in the current directory and after the recording is terminated, will be rendered into a .avi video also in the current directory.
When you are finshed recording, press the esc while the viewing window is active to terminate recording. Note that it will take some time after the recording is terminated to render the captured video.
Other
You can use the -h flag to explore addtional flags and functionality.
leprun -h
Homography Transform
This software supports post-processing image warping to focus on a quadrilateral region of interest (qROI). To begin, press f while the viewer window is active to open the focus window, shown in cyan. The aspect ratio and size of the focus window are adjusted using the mouse scroll wheel (the middle mouse button can be used to toggle between fast edit and slow edit). You can switch between which parameter you are adjusting using the right mouse click.
Once the focus window is set, use the left mouse button to define the four corners of the qROI, shown in magenta. The corner of the focus box to which the selected qROI corner will be transformed is shown as a magenta dot on one of the focus box corners. Once all four corners are defined, a homography transformation will be applied so the qROI occupies the focus box.
To reset the qROI, press r.
To toggle the homography transform, press f.
Common Errors
Port and Socket
ImageShapeException
In function: _stream()
Captured image shape (358, 640) does not equal expected image shape
(160, 120). Are you sure the selected port is correct? NOTE: If captured
image shape is (61,80) the Lepton may be seated incorrectly and you
should reseat its socket.
-
The incorrect port is selected.
To fix, try instead running:
leprun -p A_PORT_NUMBER_THAT_IS_NOT_0
Where
A_PORT_NUMBER_THAT_IS_NOT_0is any integer that is not0. Each camera device has its own unique port identifier. This code defaults to using port0but if you have multiple cameras, the Lepton might be at a higher port number. The-pflag allows a users to change the selected port. -
The lepton is not seated properly in the Purethermal socket.
To fix, disconnect the Purethermal from power, completely remove the Lepton from the Purethermal socket, and reinsert it. After power is restored, you can try
leprunagain.
Failed Recording
In some cases, a video may fail to gen generated after the recording is finished. This occurs most commonly when the recording frame rate was too low for the renderer to handle. To correct this issue avoid setting target frame rates below 5 fps.
Lost Frames Every 3 Minutes
The FLIR Lepton camera uses automatic flat field correction (FFC) during operation to ensure image fidelity and prevent pixel drift. These automatic FFCs occur every 3 minutes and are predicated by a box reading "FFC" in the top left corner of the viewing window. They last approximately 3 seconds during which no thermal or telemetry data are transmitted by the camera resulting in dropped frames. This is unavoidable for proper Lepton function. Note the renderer automatically detects the dropped frames and locally adjusts the frame rate to maintain true playback speed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lepton_pt-0.1a1.tar.gz.
File metadata
- Download URL: lepton_pt-0.1a1.tar.gz
- Upload date:
- Size: 13.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
104d2b9f9717046f2f84388105c41a803d3ab2046dba188e7715c7e101274db0
|
|
| MD5 |
f3420e45846b895f1a4e48c7db78984c
|
|
| BLAKE2b-256 |
4a1bf1fc71c6992999172cdada34f7608213365382cd24d1eaff66b8a7d6bbf3
|
File details
Details for the file lepton_pt-0.1a1-py3-none-any.whl.
File metadata
- Download URL: lepton_pt-0.1a1-py3-none-any.whl
- Upload date:
- Size: 14.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a4a84c7e1b138eaa91ed6452a6b5773787b2884826aab6a88ac013574cda110
|
|
| MD5 |
287629ca3db72b497c597a4c4a7086e5
|
|
| BLAKE2b-256 |
03dc21079776becb3389fe4c5f4d7fbffaca6a9c5062faa01397f654adee53a0
|