Skip to content

Commit 6a19ab7

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

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

OpenCV-4-7-0.sh

+20-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
#!/bin/bash
22
set -e
33
install_opencv () {
4-
echo "Installing OpenCV 4.7.0 on your Raspberry Pi 64-bit OS"
4+
echo ""
5+
case `cat /etc/debian_version` in
6+
10*) echo "Detecting Debian 10, Buster. "
7+
;;
8+
11*) echo "Detecting Debian 11, Bullseye. "
9+
;;
10+
12*) echo "Detecting Debian 12, Bookworm. "
11+
;;
12+
esac
13+
echo ""
14+
echo "Installing OpenCV 4.7.0"
515
echo "It will take minimal 2.5 hour !"
616
cd ~
717
# install the dependencies
@@ -13,12 +23,20 @@ sudo apt-get install -y libgstreamer1.0-dev gstreamer1.0-gtk3
1323
sudo apt-get install -y libgstreamer-plugins-base1.0-dev gstreamer1.0-gl
1424
sudo apt-get install -y libxvidcore-dev libx264-dev
1525
sudo apt-get install -y python3-dev python3-numpy python3-pip
16-
sudo apt-get install -y libtbb2 libtbb-dev libdc1394-22-dev
1726
sudo apt-get install -y libv4l-dev v4l-utils
1827
sudo apt-get install -y libopenblas-dev libatlas-base-dev libblas-dev
1928
sudo apt-get install -y liblapack-dev gfortran libhdf5-dev
2029
sudo apt-get install -y libprotobuf-dev libgoogle-glog-dev libgflags-dev
2130
sudo apt-get install -y protobuf-compiler
31+
#get TBB
32+
case `cat /etc/debian_version` in
33+
10*) sudo apt-get install -y libtbb2 libtbb-dev libdc1394-22-dev
34+
;;
35+
11*) sudo apt-get install -y libtbb2 libtbb-dev libdc1394-22-dev
36+
;;
37+
12*) sudo apt-get install -y libtbbmalloc2 libtbb-dev
38+
;;
39+
esac
2240

2341
# download the latest version
2442
cd ~

0 commit comments

Comments
 (0)