123Dante123 / Lepton3_Jetson

Library and examples to connect the FLIR Lepton3 thermal camera to Nvidia Jetson embedded boards

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lepton3_Jetson

Library and examples to connect the FLIR Lepton3 thermal camera to Nvidia Jetson embedded boards

More info on Myzhar website blog post

Prerequisites

Software Installation

Clone this repository

$ git clone https://github.com/Myzhar/Lepton3_Jetson.git

Install build requirements

$ sudo apt install build-essential cmake g++ libopencv-dev

Compile

$ mkdir build
$ cd build
$ cmake ..
$ make
$ cd ..

Camera connection

Detailed instruction about how to connect the Lepton3 module to a Nvidia Jetson Nano are available on Myzhar website

SPI buffer size change

The default buffer size use for SPI communication is set to 4096 bytes by the spidev module. Lepton3 requires 20KB of buffer to retrieve a full segment of data that composes the thermal image.

You can get the procedure to change the size of the SPI buffer for the Jetson Nano on the Myzhar's blog.

Run the Demos

Two examples are provided to illustrate how to use the lepton3_grabber static library available in the folder build/grabber_lib.

OpenCV Demo

With this sample you can see how to use OpenCV to display the thermal stream and control the camera behaviors

$ cd build/opencv_demo
$ ./opencv_demo

Keyboard commands:

  • c -> RGB mode (24bit RGB color images)
  • r -> Radiometry mode (16 bit gray image containing 14 bit linear thermal values )
  • h -> High gain mode (-10°C to 140°C with 5°C of accuracy)
  • l -> Low gain mode ( -10°C to 400°C with 10°C of accuracy)
  • a -> Auto gain mode
  • f -> Perform FFC normalization
  • F -> Perform FFC radiometry normalization

Fever control demo

With this demo you can see how to estimate temperatures from 16 bit gray images to evaluate the temperature of a person and get alarms in case of fever. I created this demo as a security sample application to be used in the COVID19 period.

$ cd build/check_fever_app
$ ./check_fever_app

Using keyboard u/d you can increase/decrease the estimated temperature su simulate person fever.

See the demo on YouTube

| |

About

Library and examples to connect the FLIR Lepton3 thermal camera to Nvidia Jetson embedded boards

License:MIT License


Languages

Language:C 81.4%Language:C++ 15.0%Language:Objective-C 3.1%Language:CMake 0.6%