diff --git a/install_wolf.sh b/install_wolf.sh index fb67a2a329b981d590f940896745128e84e81295..1ee168ae205f2ff7855f442664a448a98335a1ea 100755 --- a/install_wolf.sh +++ b/install_wolf.sh @@ -453,30 +453,14 @@ if [ $INSTALL_VISION == "undefined" ]; then fi if [ $INSTALL_VISION == "y" ]; then - func_echo "Installing plugin vision dependencies..." + func_echo "Installing OpenCV (required by vision plugin)..." # opencv - cd $DEPS_PATH - wget https://github.com/opencv/opencv/archive/3.3.0.zip -O temp.zip - unzip temp.zip - rm temp.zip - cd opencv-3.3.0 - git clone --depth 1 -b 3.3.0 https://github.com/opencv/opencv_contrib.git - mkdir build - cd build - sed -i 's/char\* str = PyString_AsString(obj)/const char\* str = PyString_AsString(obj)/g' ../modules/python/src2/cv2.cpp - cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D CMAKE_CXX_FLAGS="-fPIC -std=c++14" -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules -D WITH_FFMPEG=OFF .. - make -j$CORES - func_make_install - - # vision_utils - cd $DEPS_PATH - git clone https://gitlab.iri.upc.edu/labrobotica/algorithms/vision_utils.git - cd vision_utils - mkdir -pv build && cd build - cmake -DCMAKE_BUILD_TYPE=Release .. - make -j$CORES - func_make_install + if [ "$UID" -eq 0 -o "$EUID" -eq 0 ]; then + apt install -y libopencv-dev + else + sudo apt install -y libopencv-dev + fi func_echo "Cloning plugin vision..." cd $WOLF_PATH