A simple project that uses OpenCV to stream image data and perform facial recognition.
Please see FEATURES.md
for all current and future app features.
- Git Bash
- CMake - Make sure to add to PATH variable when prompted!
- Python 2 and Python 3
- Microsoft Visual Studio 2019
-
Navigate to
Externals/opencv
and open a Git Bash window. Input the following:./install-opencv-windows.sh
You can have a coffee or two while this builds.
-
Navigate to the root of the project and run the
Generate_VS2019_Project.bat
file. All VS2019 project files will be generated.- If you use VS2017, there is a project generator for it as well.
-
Open the generated
.sln
file, choose your build configuration (Debug, Release or Distribution) and build usingCtrl
+Shift
+B
, or by navigating toBuild > Build Solution
.
To test in the VS2019 environment, simply click "Local Windows Debugger" at the top, or press F5
(Ctrl
+ F5
if you want to start without the debugger).
-
Latest version of Raspbian Stretch. For instructions on how to update your Raspberry Pi to Raspbian Stretch, follow this official guide.
-
Build essentials and developer tools:
build-essential git cmake pkg-config
-
Developer image and video libraries:
libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev
-
GTK GUI backend:
libgtk-3-dev libcanberra-gtk*
-
Numerical optimization libraries:
libatlas-base-dev gfortran
-
USB device access:
libusb-1.0-0-dev
NOTE: Running the script below with --install-dependencies
will install and/or update these dependencies on your system automatically.
Before building it is STRONGLY recommended to do perform the following procedures. If you believe these are not necessary or you have already performed these procedures, skip to Building.
-
If you're using a brand-new install of Raspbian Stretch, expand your filesystem. Open a terminal window and type:
$ sudo raspi-config
Navigate to
7 Advanced Options
, and selectA1 Expand Filesystem
. Once you've done this, reboot your Raspberry Pi:$ sudo reboot
NOTE: On a NOOBS install of Raspbian, this step is already done for you.
-
If you don't need them, remove Wolfram and Libre Office from your system. This is especially useful on systems with low capacity SD cards. Removing these two programs will restore ~1 GB of space to your Raspberry Pi.
$ sudo apt-get purge wolfram-engine $ sudo apt-get purge libreoffice* $ sudo apt-get clean $ sudo apt-get autoremove
-
Increase the swap. This procedure will create a swap file that is about 2x the size of your Raspberry Pi's RAM. Open a terminal and type:
$ sudo nano /etc/dphys-swapfile
Uncomment the following lines:
CONF_SWAPFILE=/var/swap [...] CONF_SWAPFACTOR=2
Then comment the line:
#CONF_SWAPSIZE=100
Press
Ctrl
+X
to exit,Y
to save changes, andEnter
to confirm. Then in the terminal, type:$ sudo dphys-swapfile setup $ sudo dphys-swapfile swapon
to restart the service and use the increased swap size.
-
Open a terminal window and input the following (
<Thermocheck repo location>
being the location where you cloned this repo to):$ cd <Thermocheck repo location>/Externals/opencv # --install-dependencies will install and/or upgrade all necessary dependencies automatically # Make sure to have sudo privileges if using this switch (the "pi" user should have this by default) $ ./install-opencv-rpi.sh [--install-dependencies]
You can have a coffee or two while this builds. Maybe even three. Or four. This will take a while.
-
Navigate to the libuvc folder and run
install-libuvc.sh
:$ cd <Thermocheck repo location>/Externals/libuvc $ ./install-libuvc.sh
Make sure
libusb-1.0-0-dev
is installed before you run this, or else it won't work. -
Navigate to the root of the project and run the
Generate_GMake_Files.sh
:$ cd <Thermocheck repo location> $ ./Generate_GMake_Files.sh
This will generate all the necessary Makefiles for the project
-
Build the project (using GCC):
$ make -j3 -k # For debug builds $ make config=release -j3 -k # For release builds $ make config=distribution -j3 -k # For distribution builds
Navigate to Thermocheck/Build/bin/ARM/{config}
and run the Thermocheck executable.
ImGui window with options, log, and video feed viewer.