diff --git a/old-setup.sh b/old-setup.sh new file mode 100644 index 0000000..7859ee5 --- /dev/null +++ b/old-setup.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +PROJECT_DIR=/home/$(whoami)/iot-mini + +# Install dependencies +sudo apt update +sudo apt install -y python3 python3-pip python3.11-venv python3-picamera2 python3-opencv # Python +sudo apt install -y build-essential cmake pkg-config # Developer tools and packages +sudo apt install -y libjpeg8-dev libtiff4-dev libjasper-dev libpng12-dev # Image I/O packages +sudo apt install -y libgtk2.0-dev libcap-dev # GTK development library & picamera2 dependency +sudo apt install -y libavcodec-dev libavformat-dev libswscale-dev libv4l-dev # Video I/O packages +sudo apt install -y libatlas-base-dev gfortran # Optimize OpenCV operation + + +cd $PROJECT_DIR +python3 -m venv . +source $PROJECT_DIR/bin/activate +pip install numpy opencv-python picamera picamera2 # for camera vision +pip install requests # for notifications +pip install virtualenvwrapper # virtual env +wget https://github.com/opencv/opencv/archive/refs/tags/4.10.0.tar.gz +tar -xvf 4.10.0.tar.gz +cd opencv-4.10.0/ +mkdir build/ +cd build/ +cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_NEW_PYTHON_SUPPORT=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON .. +make # For compiling OpenCV +sudo make install +sudo ldconfig diff --git a/setup.sh b/setup.sh deleted file mode 100644 index 075b537..0000000 --- a/setup.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -PROJECT_DIR=/home/$(whoami)/iot-mini - -# Install dependencies -sudo apt update -sudo apt install -y python3 python3-pip python3-opencv python3-opencv - -cd $PROJECT_DIR -python3 -m venv . -source $PROJECT_DIR/bin/activate -pip install requests