Skip to content

Commit 6f0b92c

Browse files
authored
Update OpenCV-4-8-0.sh
1 parent 7f57deb commit 6f0b92c

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

OpenCV-4-8-0.sh

+23-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
#!/bin/bash
22
set -e
33
install_opencv () {
4-
echo "Installing OpenCV 4.8.0 on your Raspberry Pi 64-bit OS"
4+
echo ""
5+
6+
case `cat /etc/debian_version` in
7+
10*) echo "Detecting Debian 10, Buster. "
8+
;;
9+
11*) echo "Detecting Debian 11, Bullseye. "
10+
;;
11+
12*) echo "Detecting Debian 12, Bookworm. "
12+
;;
13+
esac
14+
15+
echo ""
16+
echo "Installing OpenCV 4.8.0"
517
echo "It will take minimal 2 hour !"
618
cd ~
719
# install the dependencies
@@ -13,13 +25,22 @@ sudo apt-get install -y libgstreamer1.0-dev gstreamer1.0-gtk3
1325
sudo apt-get install -y libgstreamer-plugins-base1.0-dev gstreamer1.0-gl
1426
sudo apt-get install -y libxvidcore-dev libx264-dev
1527
sudo apt-get install -y python3-dev python3-numpy python3-pip
16-
sudo apt-get install -y libtbb2 libtbb-dev libdc1394-22-dev
1728
sudo apt-get install -y libv4l-dev v4l-utils
1829
sudo apt-get install -y libopenblas-dev libatlas-base-dev libblas-dev
1930
sudo apt-get install -y liblapack-dev gfortran libhdf5-dev
2031
sudo apt-get install -y libprotobuf-dev libgoogle-glog-dev libgflags-dev
2132
sudo apt-get install -y protobuf-compiler
2233

34+
#get TBB
35+
case `cat /etc/debian_version` in
36+
10*) sudo apt-get install -y libtbb2 libtbb-dev libdc1394-22-dev
37+
;;
38+
11*) sudo apt-get install -y libtbb2 libtbb-dev libdc1394-22-dev
39+
;;
40+
12*) sudo apt-get install -y libtbbmalloc2 libtbb-dev
41+
;;
42+
esac
43+
2344
# download the latest version
2445
cd ~
2546
sudo rm -rf opencv*

0 commit comments

Comments
 (0)