forked from groupgets/purethermal1-uvc-capture
-
Notifications
You must be signed in to change notification settings - Fork 21
/
build_pi_thermal_app.sh
executable file
·67 lines (54 loc) · 1.8 KB
/
build_pi_thermal_app.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/env bash
#File Created by Jerry Pierre and Edited by Karl Parks
#sudo chmod 775 build_pi_thermal_app.sh
#sudo ./build_pi_thermal_app.sh
install_system_updates(){
echo "updating system."
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y --autoremove
}
install_thermal_dependencies(){
echo "Installing thermal dependencies."
sudo apt install python3-pip -y
sudo apt-get install -y python3-pyqt5
sudo apt-get install -y python3-h5py
sudo apt-get install -y python3-psutil
#sudo pip3 install opencv-contrib-python
#sudo apt install python3-opencv
git clone https://github.com/Itseez/opencv_contrib.git
cd opencv_contrib
git checkout 3.1.0
cd ..
sudo pip3 install --no-cache-dir tifffile
sudo apt-get install -y python3-matplotlib
sudo apt-get install -y libatlas-base-dev
sudo apt-get install -y libjasper-dev
sudo apt-get install -y libqtgui4
sudo apt-get install -y libqt4-test
}
install_thermal_app(){
echo "Installing and building thermal app."
sudo apt install git -y
git clone https://github.com/Kheirlb/purethermal1-uvc-capture.git
git clone https://github.com/groupgets/libuvc
sudo apt-get install cmake -y
sudo apt-get install libusb-1.0-0-dev -y
sudo apt-get install libjpeg-dev -y
cd libuvc
mkdir build
cd build
cmake ..
make && sudo make install
sudo ldconfig -v
cd ../..
sudo sh -c "echo 'SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"1e4e\", ATTRS{idProduct}==\"0100\", SYMLINK+=\"pt1\", GROUP=\"usb\", MODE=\"666\"' > /etc/udev/rules.d/99-pt1.rules"
cd purethermal1-uvc-capture/ui_software/Parabilis_Thermal
sudo chmod +x RecordIR_v18.3.py
}
main () {
#install_system_updates
install_thermal_dependencies
install_thermal_app
}
main "$@"