Last active
March 31, 2023 06:09
-
-
Save pabsan-0/1bf9d69f978e437692ef10cb5d77e466 to your computer and use it in GitHub Desktop.
Install instructions for opencv with gstreamer support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OPENCV_VER="master" | |
TMPDIR=$(mktemp -d) | |
# Build and install OpenCV from source. | |
cd "${TMPDIR}" | |
git clone --branch ${OPENCV_VER} --depth 1 --recurse-submodules --shallow-submodules https://github.com/opencv/opencv-python.git opencv-python-${OPENCV_VER} | |
cd opencv-python-${OPENCV_VER} | |
export ENABLE_CONTRIB=1 | |
export ENABLE_HEADLESS=0 | |
# We want GStreamer support enabled. | |
export CMAKE_ARGS="-DWITH_GSTREAMER=ON" | |
python3 -m pip wheel . --verbose | |
# Install OpenCV | |
python3 -m pip install opencv_*python*.whl | |
# Purge some stuff | |
rm -rf .git | |
rm -rf ./opencv_extra/testdata |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment