From ba68f9b4a807e59bf4555efd4cbfc4197b412779 Mon Sep 17 00:00:00 2001 From: Natenael Kelkay Date: Sat, 24 Feb 2018 13:19:28 -0500 Subject: [PATCH 1/2] added folder and files to download openCv with contrib modules --- installOpencvWithModules/README.txt | 1 + installOpencvWithModules/installopenCV.sh | 35 +++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 installOpencvWithModules/README.txt create mode 100755 installOpencvWithModules/installopenCV.sh diff --git a/installOpencvWithModules/README.txt b/installOpencvWithModules/README.txt new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/installOpencvWithModules/README.txt @@ -0,0 +1 @@ + diff --git a/installOpencvWithModules/installopenCV.sh b/installOpencvWithModules/installopenCV.sh new file mode 100755 index 0000000..626ef06 --- /dev/null +++ b/installOpencvWithModules/installopenCV.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +if [[ $(/usr/bin/id -u) -ne 0 ]]; then + echo "Not run as root, exiting." + exit +fi +mkdir installOpenCV +cd installOpenCV +apt update +apt install -y unzip git +git clone https://github.com/opencv/opencv_contrib.git +cd opencv_contrib +git checkout 3.3.1 +cd ../ +wget https://github.com/opencv/opencv/archive/3.3.1.zip +unzip 3.3.1.zip +cd opencv-3.3.1 +apt install -y build-essential +apt install -y cmake libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev +apt install -y python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev +apt install -y libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev +apt install -y libxine2-dev libv4l-dev +apt install -y qt5-default libgtk2.0-dev libtbb-dev +apt install -y libatlas-base-dev +apt install -y libfaac-dev libmp3lame-dev libtheora-dev +apt install -y libvorbis-dev libxvidcore-dev +apt install -y libopencore-amrnb-dev libopencore-amrwb-dev +apt install -y x264 v4l-utils +mkdir build +cd build +cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_C_EXAMPLES=ON D WITH_TBB=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules .. +make -j$(nproc) +make install +ldconfig +cd ../../.. +rm -rf installOpenCV From ea03a9cd6430b7246d564ca6de7b3f07dc746a83 Mon Sep 17 00:00:00 2001 From: Natenael Kelkay <32095086+N-kelkay@users.noreply.github.com> Date: Sat, 24 Feb 2018 13:59:22 -0500 Subject: [PATCH 2/2] Added instructions to install opencv --- installOpencvWithModules/README.md | 12 ++++++++++++ installOpencvWithModules/README.txt | 1 - 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 installOpencvWithModules/README.md delete mode 100644 installOpencvWithModules/README.txt diff --git a/installOpencvWithModules/README.md b/installOpencvWithModules/README.md new file mode 100644 index 0000000..db8db81 --- /dev/null +++ b/installOpencvWithModules/README.md @@ -0,0 +1,12 @@ +# Install opencv with contrib modules for [ArUco](https://docs.opencv.org/3.4.0/db/da9/tutorial_aruco_board_detection.html) and [ChArUco](https://docs.opencv.org/3.1.0/df/d4a/tutorial_charuco_detection.html) boards +opencv_dnn module is placed in the secondary opencv_contrib repository, which isn't distributed in binary form, therefore you need to build it manually. + +### For Windows and Mac users +I recommend you follow these [steps](https://docs.opencv.org/3.2.0/de/d25/tutorial_dnn_build.html). Liunx users can also follow but there is a faster way + +### Linux users +if you go back to the folder, ["installOpencvWithModules"](https://github.com/N-kelkay/opencv-installer/tree/master/installOpencvWithModules), you will see a shell file called installopenCV.sh. all you need to do is +- Download that file, by either cloning the repository and taking it out or some other method. +- Open terminal or another command-line interpreter, then get to the directory where you saved the file +- Then type: `sudo chmod -x _path_installOpenCV.sh`. for "_path_" replace it with the path file starting from your home folder Example: `sudo chmod -x /home/"compuername"/Desktop/installOpenCV.sh` +- The type `sudo sh ./installopenCV.sh`. This will actually install it. It might take while, and it might also ask for admin password so make sure to watch for that diff --git a/installOpencvWithModules/README.txt b/installOpencvWithModules/README.txt deleted file mode 100644 index 8d1c8b6..0000000 --- a/installOpencvWithModules/README.txt +++ /dev/null @@ -1 +0,0 @@ -