-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
440 additions
and
574 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Flir-Lepton | ||
|
||
This Qt-based project allows the interface between the Flir Lepton 2.5 camera and Raspicam to be part of my thesis project for the Master's Degree in Mechatronics, by title _Enanching UAV capabilities with machine learning on board_. | ||
|
||
## Prerequisites | ||
|
||
* Qt | ||
* gcc 6.3 (c++14 or above) | ||
* cmake (3.7 or above) | ||
* Flir Lepton Guide [product page](https://learn.sparkfun.com/tutorials/flir-lepton-hookup-guide) | ||
+ Lepton Flir 2.0 [reference](https://groupgets.com/manufacturers/flir/products/lepton-2-0) | ||
* [RaspiCam](https://www.uco.es/investiga/grupos/ava/node/40): C++ API for using Raspberry | ||
+ Raspicam [source](https://sourceforge.net/projects/raspicam/files/?) | ||
|
||
### Configuration | ||
|
||
Connections: | ||
1. match your female to female jumpers wires to the images below (_note: your jumper wires may differ in color_), You can also use the list below. | ||
|
||
<center> | ||
|
||
| Raspberry GPIO | Breakout Board | | ||
|:----------------|-----------------:| | ||
|(Pin 1) +3.3V| VIN| | ||
|(Pin 3) SDA | SDA| | ||
|(Pin5) SCL | SCL| | ||
|(Pin6) GND |GND| | ||
|(Pin 19)MOSI |MOSI| | ||
|(Pin 21) MISO| MISO| | ||
|(Pin 23) SCLK | CLK| | ||
|(Pin 24) CE0 |CS| | ||
|
||
</center> | ||
<br> | ||
<div class="row" align="center"> | ||
<div class="column"> | ||
<img src="./images/breakoutboard.jpg" style="width:35%"> | ||
</div> | ||
<div class="column"> | ||
<img src="./images/gpioconnection.jpg" style="width:35%"> | ||
</div> | ||
</div> | ||
|
||
2. Now install the Raspberry Pi Camera, the camera should face towards the IO ports. | ||
<br> | ||
<div class="row" align="center"> | ||
<div class="column"> | ||
<img src="./images/camera.jpg" style="width:35%"> | ||
</div> | ||
</div> | ||
|
||
This configuration works well and avoids the red rectangle on the screen most of the time. | ||
* I preferred a method that would automatically decide whether to use: _"/dev/spidev0.1" or "/dev/spidev0.1"_ | ||
|
||
## Run | ||
|
||
To run the project in release mode: | ||
|
||
```sh | ||
git clone https://github.com/frank1789/Flir-Lepton.git | ||
cd Flir-Lepton | ||
./build | ||
``` | ||
|
||
otherwise in debug mode: | ||
|
||
```sh | ||
git clone https://github.com/frank1789/Flir-Lepton.git | ||
cd Flir-Lepton | ||
./build Debug | ||
``` | ||
|
||
The software has a single main window in which the images acquired by the thermal camera and Raspicam are displayed. | ||
you can edit the color map for the thermal image from the main widget and save photos. | ||
it is possible to modify the fusion filter between the images, these however require that the cameras are perfectly aligned with a support structure. | ||
|
||
Inside there is a TCP server to send images to clients connected using the default port 52693, while the address is shown in the main widget. | ||
|
||
<div class="row" align="center"> | ||
<div class="column"> | ||
<img src="./images/lava.png" style="width:35%"> | ||
</div> | ||
<div class="column"> | ||
<img src="./images/grayscale.png" style="width:35%"> | ||
</div> | ||
<div class="column"> | ||
<img src="./images/rainbow.png" style="width:35%"> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,63 @@ | ||
#!/usr/bin/env sh | ||
|
||
rm -rf build | ||
mkdir build && cd build | ||
cmake -D CMAKE_BUILD_TYPE=Debug .. | ||
make -j3 | ||
EXECUTABLE=$(find $PWD -name "FlirLepton") | ||
${EXECUTABLE} | ||
|
||
|
||
# //////////////////////////////////////////////////////////////////////////// | ||
# declare function | ||
# //////////////////////////////////////////////////////////////////////////// | ||
|
||
compile_debug() { | ||
DIRECTORY=build_debug | ||
clear_old_build | ||
echo "create new directory $DIRECTORY" | ||
mkdir $DIRECTORY && cd $DIRECTORY | ||
cmake -D CMAKE_BUILD_TYPE=Debug .. | ||
make -j3 | ||
EXECUTABLE=$(find $PWD -name "FlirLepton") | ||
${EXECUTABLE} | ||
} | ||
|
||
compile_release() { | ||
DIRECTORY=build_release | ||
clear_old_build | ||
echo "create new directory $DIRECTORY" | ||
mkdir $DIRECTORY && cd $DIRECTORY | ||
cmake -D CMAKE_BUILD_TYPE=Release .. | ||
make -j3 | ||
EXECUTABLE=$(find $PWD -name "FlirLepton") | ||
${EXECUTABLE} | ||
} | ||
|
||
clear_old_build() { | ||
DIR_BUILD_DEBUG=build_debug | ||
DIR_BUILD_RELES=build_release | ||
# check for previuous debug build | ||
if [ -d "$DIR_BUILD_DEBUG" ]; then | ||
echo "remove previus build debug" | ||
rm -rf $DIR_BUILD_DEBUG | ||
|
||
# check for previus release build | ||
elif [ -d "$DIR_BUILD_RELES" ]; then | ||
echo "remove previus build release" | ||
rm -rf $DIR_BUILD_RELES | ||
fi | ||
|
||
if [ -d "build" ]; then | ||
echo "remove previus build" | ||
rm -rf build | ||
fi | ||
} | ||
|
||
# //////////////////////////////////////////////////////////////////////////// | ||
# main script | ||
# //////////////////////////////////////////////////////////////////////////// | ||
|
||
if [ "$#" -eq "0" ]; then | ||
echo "build release version" | ||
compile_release | ||
else | ||
if [ "$1" = "Debug" ] || [ "$1" = "debug" ]; then | ||
echo "build release version" | ||
compile_debug | ||
fi | ||
fi |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#include "Lepton_I2C.h" | ||
|
||
#include "log/logger.h" | ||
|
||
bool _connected{false}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.