Skip to content

Instantly share code, notes, and snippets.

@fengyuentau
Last active December 15, 2023 09:58
Show Gist options
  • Save fengyuentau/360eeb649d9539b83e4f0676b7333ca2 to your computer and use it in GitHub Desktop.
Save fengyuentau/360eeb649d9539b83e4f0676b7333ca2 to your computer and use it in GitHub Desktop.
Quick setup for opencv+openvino dev environment
# Installation
wget -q https://storage.openvinotoolkit.org/repositories/openvino/packages/2023.2/linux/l_openvino_toolkit_ubuntu22_2023.2.0.13089.cfd42bd2cb0_x86_64.tgz -O openvino.tgz
sudo mkdir -p /opt/intel/openvino
sudo tar -xf openvino.tgz -C /opt/intel/openvino --strip-components=1
sudo apt-get install -y libtbb2 libpugixml1v5

# Install dependencies
cd /opt/intel/openvino/install_dependencies
sudo -E ./install_openvino_dependencies.sh

#source /opt/intel/openvino/setupvars.sh

# Build OpenCV with OpenVINO
export OpenVINO_DIR=/opt/intel/openvino/runtime/cmake
cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=$HOME/opencv_install \
    -DBUILD_LIST=ts,python3,dnn \
    -DWITH_OPENVINO=ON \
    -DBUILD_TESTS=ON \
    -S opencv -B opencv_build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment